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

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

Issue 15261005: Allow multiple base::MessagePumpForUI instances to be created simultanenously on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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/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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 return result; 399 return result;
400 400
401 // Subscribe to Ctrl-C and other console events. 401 // Subscribe to Ctrl-C and other console events.
402 if (!SetConsoleCtrlHandler(&HostService::ConsoleControlHandler, TRUE)) { 402 if (!SetConsoleCtrlHandler(&HostService::ConsoleControlHandler, TRUE)) {
403 LOG_GETLASTERROR(ERROR) 403 LOG_GETLASTERROR(ERROR)
404 << "Failed to set console control handler"; 404 << "Failed to set console control handler";
405 return result; 405 return result;
406 } 406 }
407 407
408 // Create a window for receiving session change notifications. 408 // Create a window for receiving session change notifications.
409 win::MessageWindow window; 409 base::win::MessageWindow window;
410 if (!window.Create(this)) { 410 if (!window.Create(this)) {
411 LOG_GETLASTERROR(ERROR) 411 LOG_GETLASTERROR(ERROR)
412 << "Failed to create the session notification window"; 412 << "Failed to create the session notification window";
413 goto cleanup; 413 goto cleanup;
414 } 414 }
415 415
416 // Subscribe to session change notifications. 416 // Subscribe to session change notifications.
417 if (WTSRegisterSessionNotification(window.hwnd(), 417 if (WTSRegisterSessionNotification(window.hwnd(),
418 NOTIFY_FOR_ALL_SESSIONS) != FALSE) { 418 NOTIFY_FOR_ALL_SESSIONS) != FALSE) {
419 CreateLauncher(scoped_refptr<AutoThreadTaskRunner>( 419 CreateLauncher(scoped_refptr<AutoThreadTaskRunner>(
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 int DaemonProcessMain() { 512 int DaemonProcessMain() {
513 HostService* service = HostService::GetInstance(); 513 HostService* service = HostService::GetInstance();
514 if (!service->InitWithCommandLine(CommandLine::ForCurrentProcess())) { 514 if (!service->InitWithCommandLine(CommandLine::ForCurrentProcess())) {
515 return kUsageExitCode; 515 return kUsageExitCode;
516 } 516 }
517 517
518 return service->Run(); 518 return service->Run();
519 } 519 }
520 520
521 } // namespace remoting 521 } // 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