Chromium Code Reviews| Index: remoting/host/remoting_me2me_host.cc |
| diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc |
| index cde2684a86c5be003ad21b0f60d3165e091040a1..cee47b305f3046ac56704c856b052dbafcf586b4 100644 |
| --- a/remoting/host/remoting_me2me_host.cc |
| +++ b/remoting/host/remoting_me2me_host.cc |
| @@ -39,6 +39,7 @@ |
| #include "remoting/base/service_urls.h" |
| #include "remoting/base/util.h" |
| #include "remoting/host/branding.h" |
| +// #include "remoting/host/cast_extension.h" |
| #include "remoting/host/chromoting_host.h" |
| #include "remoting/host/chromoting_host_context.h" |
| #include "remoting/host/chromoting_messages.h" |
| @@ -114,6 +115,10 @@ const char kAudioPipeSwitchName[] = "audio-pipe-name"; |
| // The command line switch used to pass name of the unix domain socket used to |
| // listen for gnubby requests. |
| const char kAuthSocknameSwitchName[] = "ssh-auth-sockname"; |
| + |
| +// The command line switch used to enable casting in linux. |
| +const char kEnableCastSwitchName[] = "enable-cast"; |
| + |
| #endif // defined(OS_LINUX) |
| // The command line switch used by the parent to request the host to signal it |
| @@ -287,6 +292,7 @@ class HostProcess |
| std::string host_owner_; |
| bool use_service_account_; |
| bool enable_vp9_; |
| + bool enable_cast_; |
| scoped_ptr<policy_hack::PolicyWatcher> policy_watcher_; |
| std::string host_domain_; |
| @@ -332,6 +338,7 @@ HostProcess::HostProcess(scoped_ptr<ChromotingHostContext> context, |
| state_(HOST_INITIALIZING), |
| use_service_account_(false), |
| enable_vp9_(false), |
| + enable_cast_(false), |
| host_username_match_required_(false), |
| allow_nat_traversal_(true), |
| allow_relay_(true), |
| @@ -446,6 +453,10 @@ bool HostProcess::InitWithCommandLine(const base::CommandLine* cmd_line) { |
| signal_parent_ = cmd_line->HasSwitch(kSignalParentSwitchName); |
| +#if defined(OS_LINUX) |
| + enable_cast_ = cmd_line->HasSwitch(kEnableCastSwitchName); |
| +#endif // !defined(OS_LINUX) |
| + |
| return true; |
| } |
| @@ -1208,6 +1219,18 @@ void HostProcess::StartHost() { |
| // TODO(simonmorris): Get the maximum session duration from a policy. |
| #if defined(OS_LINUX) |
| host_->SetMaximumSessionDuration(base::TimeDelta::FromHours(20)); |
| + |
| + // Enable Cast if specified on the command-line. |
| + // TODO(aiguha): The way the enable_cast flag is propagated through to the |
| + // ChromotingHost and ClientSession could be made cleaner. |
| + if (enable_cast_) { |
| + LOG(INFO) << "Cast Enabled."; |
| + // scoped_ptr<HostExtension> extension(new CastExtension( |
| + // network_settings, context_->url_request_context_getter())); |
| + // host_->AddExtension(extension.Pass()); |
|
Wez
2014/07/17 22:56:37
You shouldn't need to do this; you can land the CL
aiguha
2014/07/18 21:30:37
Done.
|
| + host_->set_enable_cast(enable_cast_); |
|
Wez
2014/07/17 22:56:37
As implemented this CL causes the host to disable
|
| + } |
|
aiguha
2014/07/17 17:51:03
Lines 1228-1230 are commented out only so I could
|
| + |
| #endif |
| heartbeat_sender_.reset(new HeartbeatSender( |