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

Side by Side Diff: remoting/host/remoting_me2me_host.cc

Issue 11761019: Tiny little refactoring of DesktopEnvironment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/plugin/host_script_object.cc ('k') | remoting/host/video_scheduler.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 a standalone host process for Me2Me. 5 // This file implements a standalone host process for Me2Me.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 } 562 }
563 #endif // defined(OS_LINUX) 563 #endif // defined(OS_LINUX)
564 564
565 // Create a desktop environment factory appropriate to the build type & 565 // Create a desktop environment factory appropriate to the build type &
566 // platform. 566 // platform.
567 #if defined(OS_WIN) 567 #if defined(OS_WIN)
568 568
569 #if defined(REMOTING_MULTI_PROCESS) 569 #if defined(REMOTING_MULTI_PROCESS)
570 IpcDesktopEnvironmentFactory* desktop_environment_factory = 570 IpcDesktopEnvironmentFactory* desktop_environment_factory =
571 new IpcDesktopEnvironmentFactory( 571 new IpcDesktopEnvironmentFactory(
572 daemon_channel_.get(),
573 context_->audio_task_runner(),
574 context_->input_task_runner(),
575 context_->network_task_runner(), 572 context_->network_task_runner(),
576 context_->ui_task_runner(), 573 daemon_channel_.get());
577 context_->video_capture_task_runner());
578 desktop_session_connector_ = desktop_environment_factory; 574 desktop_session_connector_ = desktop_environment_factory;
579 #else // !defined(REMOTING_MULTI_PROCESS) 575 #else // !defined(REMOTING_MULTI_PROCESS)
580 DesktopEnvironmentFactory* desktop_environment_factory = 576 DesktopEnvironmentFactory* desktop_environment_factory =
581 new SessionDesktopEnvironmentFactory( 577 new SessionDesktopEnvironmentFactory(
582 context_->input_task_runner(), context_->ui_task_runner(), 578 context_->network_task_runner(),
583 base::Bind(&HostProcess::SendSasToConsole, this)); 579 base::Bind(&HostProcess::SendSasToConsole, this));
584 #endif // !defined(REMOTING_MULTI_PROCESS) 580 #endif // !defined(REMOTING_MULTI_PROCESS)
585 581
586 #else // !defined(OS_WIN) 582 #else // !defined(OS_WIN)
587 DesktopEnvironmentFactory* desktop_environment_factory = 583 DesktopEnvironmentFactory* desktop_environment_factory =
588 new DesktopEnvironmentFactory( 584 new DesktopEnvironmentFactory(context_->network_task_runner());
589 context_->input_task_runner(), context_->ui_task_runner());
590 #endif // !defined(OS_WIN) 585 #endif // !defined(OS_WIN)
591 586
592 desktop_environment_factory_.reset(desktop_environment_factory); 587 desktop_environment_factory_.reset(desktop_environment_factory);
593 588
594 // The host UI should be created on the UI thread. 589 // The host UI should be created on the UI thread.
595 bool want_user_interface = true; 590 bool want_user_interface = true;
596 #if defined(OS_LINUX) || defined(REMOTING_MULTI_PROCESS) 591 #if defined(OS_LINUX) || defined(REMOTING_MULTI_PROCESS)
597 want_user_interface = false; 592 want_user_interface = false;
598 #elif defined(OS_MACOSX) 593 #elif defined(OS_MACOSX)
599 // Don't try to display any UI on top of the system's login screen as this 594 // Don't try to display any UI on top of the system's login screen as this
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 network_settings.min_port = NetworkSettings::kDefaultMinPort; 882 network_settings.min_port = NetworkSettings::kDefaultMinPort;
888 network_settings.max_port = NetworkSettings::kDefaultMaxPort; 883 network_settings.max_port = NetworkSettings::kDefaultMaxPort;
889 } 884 }
890 885
891 host_ = new ChromotingHost( 886 host_ = new ChromotingHost(
892 signal_strategy_.get(), 887 signal_strategy_.get(),
893 desktop_environment_factory_.get(), 888 desktop_environment_factory_.get(),
894 CreateHostSessionManager(network_settings, 889 CreateHostSessionManager(network_settings,
895 context_->url_request_context_getter()), 890 context_->url_request_context_getter()),
896 context_->audio_task_runner(), 891 context_->audio_task_runner(),
892 context_->input_task_runner(),
897 context_->video_capture_task_runner(), 893 context_->video_capture_task_runner(),
898 context_->video_encode_task_runner(), 894 context_->video_encode_task_runner(),
899 context_->network_task_runner()); 895 context_->network_task_runner(),
896 context_->ui_task_runner());
900 897
901 // TODO(simonmorris): Get the maximum session duration from a policy. 898 // TODO(simonmorris): Get the maximum session duration from a policy.
902 #if defined(OS_LINUX) 899 #if defined(OS_LINUX)
903 host_->SetMaximumSessionDuration(base::TimeDelta::FromHours(20)); 900 host_->SetMaximumSessionDuration(base::TimeDelta::FromHours(20));
904 #endif 901 #endif
905 902
906 heartbeat_sender_.reset(new HeartbeatSender( 903 heartbeat_sender_.reset(new HeartbeatSender(
907 this, host_id_, signal_strategy_.get(), &key_pair_)); 904 this, host_id_, signal_strategy_.get(), &key_pair_));
908 905
909 log_to_server_.reset( 906 log_to_server_.reset(
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 user32.GetFunctionPointer("SetProcessDPIAware")); 1137 user32.GetFunctionPointer("SetProcessDPIAware"));
1141 set_process_dpi_aware(); 1138 set_process_dpi_aware();
1142 } 1139 }
1143 1140
1144 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting 1141 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting
1145 // the command line from GetCommandLineW(), so we can safely pass NULL here. 1142 // the command line from GetCommandLineW(), so we can safely pass NULL here.
1146 return main(0, NULL); 1143 return main(0, NULL);
1147 } 1144 }
1148 1145
1149 #endif // defined(OS_WIN) 1146 #endif // defined(OS_WIN)
OLDNEW
« no previous file with comments | « remoting/host/plugin/host_script_object.cc ('k') | remoting/host/video_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698