| Index: remoting/host/basic_desktop_environment.cc
|
| diff --git a/remoting/host/basic_desktop_environment.cc b/remoting/host/basic_desktop_environment.cc
|
| index d715ddf3f32837e1bbd1bb8cb5d8ad3ea26854e8..b378479aef0056923a269f5342c0a8db28ed29eb 100644
|
| --- a/remoting/host/basic_desktop_environment.cc
|
| +++ b/remoting/host/basic_desktop_environment.cc
|
| @@ -10,17 +10,8 @@
|
| #include "media/video/capture/screen/screen_capturer.h"
|
| #include "remoting/host/audio_capturer.h"
|
| #include "remoting/host/client_session_control.h"
|
| -#include "remoting/host/host_window.h"
|
| -#include "remoting/host/host_window_proxy.h"
|
| #include "remoting/host/input_injector.h"
|
| -#include "remoting/host/local_input_monitor.h"
|
| #include "remoting/host/screen_controls.h"
|
| -#include "remoting/host/ui_strings.h"
|
| -
|
| -#if defined(OS_POSIX)
|
| -#include <sys/types.h>
|
| -#include <unistd.h>
|
| -#endif // defined(OS_POSIX)
|
|
|
| namespace remoting {
|
|
|
| @@ -66,45 +57,14 @@ BasicDesktopEnvironment::BasicDesktopEnvironment(
|
| scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
|
| scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
|
| scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
|
| - const UiStrings* ui_strings)
|
| + base::WeakPtr<ClientSessionControl> client_session_control,
|
| + const UiStrings& ui_strings)
|
| : caller_task_runner_(caller_task_runner),
|
| input_task_runner_(input_task_runner),
|
| - ui_task_runner_(ui_task_runner),
|
| - ui_strings_(ui_strings) {
|
| + ui_task_runner_(ui_task_runner) {
|
| DCHECK(caller_task_runner_->BelongsToCurrentThread());
|
| }
|
|
|
| -void BasicDesktopEnvironment::InitNonCurtainedSessionUI(
|
| - base::WeakPtr<ClientSessionControl> client_session_control) {
|
| - // Create the local input monitor.
|
| - local_input_monitor_ = LocalInputMonitor::Create(caller_task_runner_,
|
| - input_task_runner_,
|
| - ui_task_runner_,
|
| - client_session_control);
|
| -
|
| - bool show_disconnect_window = 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
|
| - // capturer from working (http://crbug.com/140984).
|
| -
|
| - // 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().
|
| - show_disconnect_window = getuid() != 0;
|
| -#endif // OS_MACOSX
|
| -
|
| - // Create the disconnect window.
|
| - if (show_disconnect_window) {
|
| - disconnect_window_ = HostWindow::CreateDisconnectWindow(*ui_strings_);
|
| - disconnect_window_.reset(new HostWindowProxy(
|
| - caller_task_runner_,
|
| - ui_task_runner_,
|
| - disconnect_window_.Pass()));
|
| - disconnect_window_->Start(client_session_control);
|
| - }
|
| -}
|
| -
|
| BasicDesktopEnvironmentFactory::BasicDesktopEnvironmentFactory(
|
| scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
|
| scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
|
| @@ -123,14 +83,12 @@ scoped_ptr<DesktopEnvironment> BasicDesktopEnvironmentFactory::Create(
|
| base::WeakPtr<ClientSessionControl> client_session_control) {
|
| DCHECK(caller_task_runner_->BelongsToCurrentThread());
|
|
|
| - scoped_ptr<BasicDesktopEnvironment> result(
|
| + return scoped_ptr<DesktopEnvironment>(
|
| new BasicDesktopEnvironment(caller_task_runner(),
|
| input_task_runner(),
|
| ui_task_runner(),
|
| - &ui_strings_));
|
| - result->InitNonCurtainedSessionUI(client_session_control);
|
| -
|
| - return result.PassAs<DesktopEnvironment>();
|
| + client_session_control,
|
| + ui_strings_));
|
| }
|
|
|
| bool BasicDesktopEnvironmentFactory::SupportsAudioCapture() const {
|
|
|