OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef REMOTING_HOST_WIN_CHROMOTING_MODULE_H_ | 5 #ifndef REMOTING_HOST_WIN_CHROMOTING_MODULE_H_ |
6 #define REMOTING_HOST_WIN_CHROMOTING_MODULE_H_ | 6 #define REMOTING_HOST_WIN_CHROMOTING_MODULE_H_ |
7 | 7 |
8 #include <atlbase.h> | 8 #include <atlbase.h> |
9 #include <atlcom.h> | 9 #include <atlcom.h> |
10 #include <atlctl.h> | 10 #include <atlctl.h> |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 // Returns the task runner used by the module. Returns NULL if the task runner | 41 // Returns the task runner used by the module. Returns NULL if the task runner |
42 // hasn't been registered yet or if the server is shutting down. | 42 // hasn't been registered yet or if the server is shutting down. |
43 static scoped_refptr<AutoThreadTaskRunner> task_runner(); | 43 static scoped_refptr<AutoThreadTaskRunner> task_runner(); |
44 | 44 |
45 // Registers COM classes and runs the main message loop until there are | 45 // Registers COM classes and runs the main message loop until there are |
46 // components using it. | 46 // components using it. |
47 bool Run(); | 47 bool Run(); |
48 | 48 |
49 // ATL::CAtlModuleT<> overrides | 49 // ATL::CAtlModuleT<> overrides |
50 virtual LONG Unlock() OVERRIDE; | 50 virtual LONG Unlock() override; |
51 | 51 |
52 DECLARE_LIBID(LIBID_ChromotingLib) | 52 DECLARE_LIBID(LIBID_ChromotingLib) |
53 | 53 |
54 private: | 54 private: |
55 // Registers/unregisters class objects from |classes_| - |classes_end_|. | 55 // Registers/unregisters class objects from |classes_| - |classes_end_|. |
56 HRESULT RegisterClassObjects(DWORD class_context, DWORD flags); | 56 HRESULT RegisterClassObjects(DWORD class_context, DWORD flags); |
57 HRESULT RevokeClassObjects(); | 57 HRESULT RevokeClassObjects(); |
58 | 58 |
59 // Used to initialize COM library. | 59 // Used to initialize COM library. |
60 base::win::ScopedCOMInitializer com_initializer_; | 60 base::win::ScopedCOMInitializer com_initializer_; |
61 | 61 |
62 // Point to the vector of classes registered by this module. | 62 // Point to the vector of classes registered by this module. |
63 ATL::_ATL_OBJMAP_ENTRY* classes_; | 63 ATL::_ATL_OBJMAP_ENTRY* classes_; |
64 ATL::_ATL_OBJMAP_ENTRY* classes_end_; | 64 ATL::_ATL_OBJMAP_ENTRY* classes_end_; |
65 | 65 |
66 DISALLOW_COPY_AND_ASSIGN(ChromotingModule); | 66 DISALLOW_COPY_AND_ASSIGN(ChromotingModule); |
67 }; | 67 }; |
68 | 68 |
69 } // namespace remoting | 69 } // namespace remoting |
70 | 70 |
71 #endif // REMOTING_HOST_WIN_CHROMOTING_MODULE_H_ | 71 #endif // REMOTING_HOST_WIN_CHROMOTING_MODULE_H_ |
OLD | NEW |