Chromium Code Reviews| Index: remoting/host/it2me_desktop_environment.cc |
| diff --git a/remoting/host/it2me_desktop_environment.cc b/remoting/host/it2me_desktop_environment.cc |
| index ffe768f02cd1b604ef06ccc067defa3fe1fdfe9e..fb83323df1ec2608a5356f40af7c6ad1a3dcd549 100644 |
| --- a/remoting/host/it2me_desktop_environment.cc |
| +++ b/remoting/host/it2me_desktop_environment.cc |
| @@ -6,6 +6,7 @@ |
| #include <utility> |
| +#include "base/command_line.h" |
|
joedow
2016/05/03 22:28:29
Can you remove this header now?
Hzj_jie
2016/05/04 02:11:56
Done.
|
| #include "base/logging.h" |
| #include "base/memory/ptr_util.h" |
| #include "base/single_thread_task_runner.h" |
| @@ -32,7 +33,8 @@ It2MeDesktopEnvironment::It2MeDesktopEnvironment( |
| scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, |
| scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
| base::WeakPtr<ClientSessionControl> client_session_control, |
| - bool supports_touch_events) |
| + bool supports_touch_events, |
| + bool enable_user_interface) |
| : BasicDesktopEnvironment(caller_task_runner, |
| video_capture_task_runner, |
| input_task_runner, |
| @@ -47,7 +49,6 @@ It2MeDesktopEnvironment::It2MeDesktopEnvironment( |
| client_session_control); |
| // The host UI should be created on the UI thread. |
| - bool want_user_interface = true; |
| #if defined(OS_MACOSX) |
| // Don't try to display any UI on top of the system's login screen as this |
| // is rejected by the Window Server on OS X 10.7.4, and prevents the |
| @@ -56,11 +57,11 @@ It2MeDesktopEnvironment::It2MeDesktopEnvironment( |
| // TODO(lambroslambrou): Use a better technique of detecting whether we're |
| // running in the LoginWindow context, and refactor this into a separate |
| // function to be used here and in CurtainMode::ActivateCurtain(). |
| - want_user_interface = getuid() != 0; |
| + enable_user_interface = getuid() != 0; |
| #endif // defined(OS_MACOSX) |
| // Create the continue and disconnect windows. |
| - if (want_user_interface) { |
| + if (enable_user_interface) { |
| continue_window_ = HostWindow::CreateContinueWindow(); |
| continue_window_.reset(new HostWindowProxy( |
| caller_task_runner, ui_task_runner, std::move(continue_window_))); |
| @@ -91,7 +92,8 @@ std::unique_ptr<DesktopEnvironment> It2MeDesktopEnvironmentFactory::Create( |
| return base::WrapUnique(new It2MeDesktopEnvironment( |
| caller_task_runner(), video_capture_task_runner(), input_task_runner(), |
| - ui_task_runner(), client_session_control, supports_touch_events())); |
| + ui_task_runner(), client_session_control, supports_touch_events(), |
| + enable_user_interface_)); |
| } |
| } // namespace remoting |