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 <sddl.h> | 7 #include <sddl.h> |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 161 |
162 LONG ChromotingModule::Unlock() { | 162 LONG ChromotingModule::Unlock() { |
163 LONG count = ATL::CAtlModuleT<ChromotingModule>::Unlock(); | 163 LONG count = ATL::CAtlModuleT<ChromotingModule>::Unlock(); |
164 | 164 |
165 if (!count) { | 165 if (!count) { |
166 // Stop accepting activations. | 166 // Stop accepting activations. |
167 HRESULT hr = CoSuspendClassObjects(); | 167 HRESULT hr = CoSuspendClassObjects(); |
168 CHECK(SUCCEEDED(hr)); | 168 CHECK(SUCCEEDED(hr)); |
169 | 169 |
170 // Release the message loop reference, causing the message loop to exit. | 170 // Release the message loop reference, causing the message loop to exit. |
171 g_module_task_runner.Get() = NULL; | 171 g_module_task_runner.Get() = nullptr; |
172 } | 172 } |
173 | 173 |
174 return count; | 174 return count; |
175 } | 175 } |
176 | 176 |
177 HRESULT ChromotingModule::RegisterClassObjects(DWORD class_context, | 177 HRESULT ChromotingModule::RegisterClassObjects(DWORD class_context, |
178 DWORD flags) { | 178 DWORD flags) { |
179 for (ATL::_ATL_OBJMAP_ENTRY* i = classes_; i != classes_end_; ++i) { | 179 for (ATL::_ATL_OBJMAP_ENTRY* i = classes_; i != classes_end_; ++i) { |
180 HRESULT result = i->RegisterClassObject(class_context, flags); | 180 HRESULT result = i->RegisterClassObject(class_context, flags); |
181 if (FAILED(result)) | 181 if (FAILED(result)) |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 | 224 |
225 ATL::_ATL_OBJMAP_ENTRY rdp_client_entry[] = { | 225 ATL::_ATL_OBJMAP_ENTRY rdp_client_entry[] = { |
226 OBJECT_ENTRY(__uuidof(RdpDesktopSession), RdpDesktopSession) | 226 OBJECT_ENTRY(__uuidof(RdpDesktopSession), RdpDesktopSession) |
227 }; | 227 }; |
228 | 228 |
229 ChromotingModule module(rdp_client_entry, rdp_client_entry + 1); | 229 ChromotingModule module(rdp_client_entry, rdp_client_entry + 1); |
230 return module.Run() ? kSuccessExitCode : kInitializationFailed; | 230 return module.Run() ? kSuccessExitCode : kInitializationFailed; |
231 } | 231 } |
232 | 232 |
233 } // namespace remoting | 233 } // namespace remoting |
OLD | NEW |