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

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

Issue 16780006: Moved remoting::win::MessageWindow to base::win::MessageWindow so that it could be re-used outside … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 7 years, 6 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/win/host_service.h ('k') | remoting/host/win/message_window.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This file implements the Windows service controlling Me2Me host processes 5 // This file implements the Windows service controlling Me2Me host processes
6 // running within user sessions. 6 // running within user sessions.
7 7
8 #include "remoting/host/win/host_service.h" 8 #include "remoting/host/win/host_service.h"
9 9
10 #include <sddl.h> 10 #include <sddl.h>
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 } 313 }
314 314
315 // Subscribe to Ctrl-C and other console events. 315 // Subscribe to Ctrl-C and other console events.
316 if (!SetConsoleCtrlHandler(&HostService::ConsoleControlHandler, TRUE)) { 316 if (!SetConsoleCtrlHandler(&HostService::ConsoleControlHandler, TRUE)) {
317 LOG_GETLASTERROR(ERROR) 317 LOG_GETLASTERROR(ERROR)
318 << "Failed to set console control handler"; 318 << "Failed to set console control handler";
319 return result; 319 return result;
320 } 320 }
321 321
322 // Create a window for receiving session change notifications. 322 // Create a window for receiving session change notifications.
323 win::MessageWindow window; 323 base::win::MessageWindow window;
324 if (!window.Create(this)) { 324 if (!window.Create(this, NULL)) {
325 LOG_GETLASTERROR(ERROR) 325 LOG_GETLASTERROR(ERROR)
326 << "Failed to create the session notification window"; 326 << "Failed to create the session notification window";
327 goto cleanup; 327 goto cleanup;
328 } 328 }
329 329
330 // Subscribe to session change notifications. 330 // Subscribe to session change notifications.
331 if (WTSRegisterSessionNotification(window.hwnd(), 331 if (WTSRegisterSessionNotification(window.hwnd(),
332 NOTIFY_FOR_ALL_SESSIONS) != FALSE) { 332 NOTIFY_FOR_ALL_SESSIONS) != FALSE) {
333 CreateLauncher(scoped_refptr<AutoThreadTaskRunner>( 333 CreateLauncher(scoped_refptr<AutoThreadTaskRunner>(
334 new AutoThreadTaskRunner(main_task_runner_, 334 new AutoThreadTaskRunner(main_task_runner_,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 int DaemonProcessMain() { 434 int DaemonProcessMain() {
435 HostService* service = HostService::GetInstance(); 435 HostService* service = HostService::GetInstance();
436 if (!service->InitWithCommandLine(CommandLine::ForCurrentProcess())) { 436 if (!service->InitWithCommandLine(CommandLine::ForCurrentProcess())) {
437 return kUsageExitCode; 437 return kUsageExitCode;
438 } 438 }
439 439
440 return service->Run(); 440 return service->Run();
441 } 441 }
442 442
443 } // namespace remoting 443 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/win/host_service.h ('k') | remoting/host/win/message_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698