| 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 #include "remoting/host/win/chromoting_module.h" | 5 #include "remoting/host/win/chromoting_module.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 // Register class objects. | 109 // Register class objects. |
| 110 HRESULT result = RegisterClassObjects(CLSCTX_LOCAL_SERVER, | 110 HRESULT result = RegisterClassObjects(CLSCTX_LOCAL_SERVER, |
| 111 REGCLS_MULTIPLEUSE | REGCLS_SUSPENDED); | 111 REGCLS_MULTIPLEUSE | REGCLS_SUSPENDED); |
| 112 if (FAILED(result)) { | 112 if (FAILED(result)) { |
| 113 LOG(ERROR) << "Failed to register class objects, result=0x" | 113 LOG(ERROR) << "Failed to register class objects, result=0x" |
| 114 << std::hex << result << std::dec << "."; | 114 << std::hex << result << std::dec << "."; |
| 115 return false; | 115 return false; |
| 116 } | 116 } |
| 117 | 117 |
| 118 // Arrange to run |message_loop| until no components depend on it. | 118 // Arrange to run |message_loop| until no components depend on it. |
| 119 MessageLoop message_loop(MessageLoop::TYPE_UI); | 119 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI); |
| 120 base::RunLoop run_loop; | 120 base::RunLoop run_loop; |
| 121 g_module_task_runner.Get() = new AutoThreadTaskRunner( | 121 g_module_task_runner.Get() = new AutoThreadTaskRunner( |
| 122 message_loop.message_loop_proxy(), run_loop.QuitClosure()); | 122 message_loop.message_loop_proxy(), run_loop.QuitClosure()); |
| 123 | 123 |
| 124 // Start accepting activations. | 124 // Start accepting activations. |
| 125 result = CoResumeClassObjects(); | 125 result = CoResumeClassObjects(); |
| 126 if (FAILED(result)) { | 126 if (FAILED(result)) { |
| 127 LOG(ERROR) << "CoResumeClassObjects() failed, result=0x" | 127 LOG(ERROR) << "CoResumeClassObjects() failed, result=0x" |
| 128 << std::hex << result << std::dec << "."; | 128 << std::hex << result << std::dec << "."; |
| 129 return false; | 129 return false; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 201 |
| 202 ATL::_ATL_OBJMAP_ENTRY rdp_client_entry[] = { | 202 ATL::_ATL_OBJMAP_ENTRY rdp_client_entry[] = { |
| 203 OBJECT_ENTRY(__uuidof(RdpDesktopSession), RdpDesktopSession) | 203 OBJECT_ENTRY(__uuidof(RdpDesktopSession), RdpDesktopSession) |
| 204 }; | 204 }; |
| 205 | 205 |
| 206 ChromotingModule module(rdp_client_entry, rdp_client_entry + 1); | 206 ChromotingModule module(rdp_client_entry, rdp_client_entry + 1); |
| 207 return module.Run() ? kSuccessExitCode : kInitializationFailed; | 207 return module.Run() ? kSuccessExitCode : kInitializationFailed; |
| 208 } | 208 } |
| 209 | 209 |
| 210 } // namespace remoting | 210 } // namespace remoting |
| OLD | NEW |