1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4  * License, v. 2.0. If a copy of the MPL was not distributed with this
5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 
7 #ifndef mozilla_mscom_MainThreadRuntime_h
8 #define mozilla_mscom_MainThreadRuntime_h
9 
10 #include "mozilla/Attributes.h"
11 #include "mozilla/mscom/COMApartmentRegion.h"
12 
13 namespace mozilla {
14 namespace mscom {
15 
16 class MOZ_NON_TEMPORARY_CLASS MainThreadRuntime
17 {
18 public:
19   MainThreadRuntime();
20 
21   explicit operator bool() const
22   {
23     return mStaRegion.IsValidOutermost() && SUCCEEDED(mInitResult);
24   }
25 
26   MainThreadRuntime(MainThreadRuntime&) = delete;
27   MainThreadRuntime(MainThreadRuntime&&) = delete;
28   MainThreadRuntime& operator=(MainThreadRuntime&) = delete;
29   MainThreadRuntime& operator=(MainThreadRuntime&&) = delete;
30 
31 private:
32   HRESULT InitializeSecurity();
33 
34   STARegion mStaRegion;
35   HRESULT mInitResult;
36 };
37 
38 } // namespace mscom
39 } // namespace mozilla
40 
41 #endif // mozilla_mscom_MainThreadRuntime_h
InterfaceTreeModel(QObject * parent)42 
43