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

Unified Diff: remoting/host/me2me_desktop_environment.cc

Issue 13461029: The continue window is owned by the desktop environment now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/me2me_desktop_environment.h ('k') | remoting/host/plugin/host_script_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/me2me_desktop_environment.cc
diff --git a/remoting/host/me2me_desktop_environment.cc b/remoting/host/me2me_desktop_environment.cc
index 5ecb0461fefb3ccd83ada08845616bf5a09fefe1..8d693d79c76f62fc5148bc61b39df8d959ec8380 100644
--- a/remoting/host/me2me_desktop_environment.cc
+++ b/remoting/host/me2me_desktop_environment.cc
@@ -10,9 +10,16 @@
#include "remoting/host/client_session_control.h"
#include "remoting/host/desktop_resizer.h"
#include "remoting/host/host_window.h"
+#include "remoting/host/host_window.h"
+#include "remoting/host/host_window_proxy.h"
+#include "remoting/host/local_input_monitor.h"
#include "remoting/host/resizing_host_observer.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 {
@@ -43,17 +50,44 @@ Me2MeDesktopEnvironment::Me2MeDesktopEnvironment(
scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
base::WeakPtr<ClientSessionControl> client_session_control,
- const UiStrings* ui_strings)
+ const UiStrings& ui_strings)
: BasicDesktopEnvironment(caller_task_runner,
input_task_runner,
ui_task_runner,
+ client_session_control,
ui_strings) {
DCHECK(caller_task_runner->BelongsToCurrentThread());
- // On Linux Me2Me sessions are virtualized and don't need UI.
-#if !defined(OS_LINUX)
- InitNonCurtainedSessionUI(client_session_control);
-#endif
+ // Create the local input monitor.
+ local_input_monitor_ = LocalInputMonitor::Create(caller_task_runner,
+ input_task_runner,
+ ui_task_runner,
+ client_session_control);
+
+ // The host UI should be created on the UI thread.
+ bool want_user_interface = true;
+#if defined(OS_LINUX)
+ want_user_interface = false;
+#elif 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().
+ want_user_interface = getuid() != 0;
+#endif // defined(OS_MACOSX)
+
+ // Create the disconnect window.
+ if (want_user_interface) {
+ 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);
+ }
}
Me2MeDesktopEnvironmentFactory::Me2MeDesktopEnvironmentFactory(
@@ -79,7 +113,7 @@ scoped_ptr<DesktopEnvironment> Me2MeDesktopEnvironmentFactory::Create(
input_task_runner(),
ui_task_runner(),
client_session_control,
- &ui_strings()));
+ ui_strings()));
}
} // namespace remoting
« no previous file with comments | « remoting/host/me2me_desktop_environment.h ('k') | remoting/host/plugin/host_script_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698