| OLD | NEW |
| 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 #include "remoting/host/me2me_desktop_environment.h" | 5 #include "remoting/host/me2me_desktop_environment.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 bool want_user_interface = false; | 93 bool want_user_interface = false; |
| 94 #elif defined(OS_MACOSX) | 94 #elif defined(OS_MACOSX) |
| 95 // Don't try to display any UI on top of the system's login screen as this | 95 // Don't try to display any UI on top of the system's login screen as this |
| 96 // is rejected by the Window Server on OS X 10.7.4, and prevents the | 96 // is rejected by the Window Server on OS X 10.7.4, and prevents the |
| 97 // capturer from working (http://crbug.com/140984). | 97 // capturer from working (http://crbug.com/140984). |
| 98 | 98 |
| 99 // TODO(lambroslambrou): Use a better technique of detecting whether we're | 99 // TODO(lambroslambrou): Use a better technique of detecting whether we're |
| 100 // running in the LoginWindow context, and refactor this into a separate | 100 // running in the LoginWindow context, and refactor this into a separate |
| 101 // function to be used here and in CurtainMode::ActivateCurtain(). | 101 // function to be used here and in CurtainMode::ActivateCurtain(). |
| 102 bool want_user_interface = getuid() != 0; | 102 bool want_user_interface = getuid() != 0; |
| 103 #elif defined(OS_WIN) | 103 #else |
| 104 bool want_user_interface = true; | 104 bool want_user_interface = true; |
| 105 #endif // defined(OS_WIN) | 105 #endif |
| 106 | 106 |
| 107 // Create the disconnect window. | 107 // Create the disconnect window. |
| 108 if (want_user_interface) { | 108 if (want_user_interface) { |
| 109 // Create the local input monitor. | 109 // Create the local input monitor. |
| 110 local_input_monitor_ = LocalInputMonitor::Create(caller_task_runner(), | 110 local_input_monitor_ = LocalInputMonitor::Create(caller_task_runner(), |
| 111 input_task_runner(), | 111 input_task_runner(), |
| 112 ui_task_runner(), | 112 ui_task_runner(), |
| 113 client_session_control); | 113 client_session_control); |
| 114 | 114 |
| 115 disconnect_window_ = HostWindow::CreateDisconnectWindow(); | 115 disconnect_window_ = HostWindow::CreateDisconnectWindow(); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 return std::move(desktop_environment); | 150 return std::move(desktop_environment); |
| 151 } | 151 } |
| 152 | 152 |
| 153 void Me2MeDesktopEnvironmentFactory::SetEnableCurtaining(bool enable) { | 153 void Me2MeDesktopEnvironmentFactory::SetEnableCurtaining(bool enable) { |
| 154 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 154 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
| 155 | 155 |
| 156 curtain_enabled_ = enable; | 156 curtain_enabled_ = enable; |
| 157 } | 157 } |
| 158 | 158 |
| 159 } // namespace remoting | 159 } // namespace remoting |
| OLD | NEW |