Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Side by Side Diff: remoting/host/win/chromoting_module.cc

Issue 14314026: remoting: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/video_scheduler_unittest.cc ('k') | remoting/host/win/host_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « remoting/host/video_scheduler_unittest.cc ('k') | remoting/host/win/host_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698