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

Unified Diff: remoting/host/remoting_me2me_host.cc

Issue 10883033: remoting_me2me_host: Don't try to display UI on top of Mac login screen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Linux compile, and refactor host_user_interface_ init Created 8 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/remoting_me2me_host.cc
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index be25fa363bd9e0e28aa3ef1fa00777313f1a5ae9..2231d357f677182fc56c88d371a4513693a010de 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -249,8 +249,25 @@ class HostProcess
}
#if defined(OS_MACOSX) || defined(OS_WIN)
- host_user_interface_.reset(new HostUserInterface(context_.get()));
-#endif
+ 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
+ // capturer from working (http://crbug.com/140984).
+ base::mac::ScopedCFTypeRef<CFDictionaryRef> session(
+ CGSessionCopyCurrentDictionary());
+ const void* logged_in = CFDictionaryGetValue(session,
+ kCGSessionLoginDoneKey);
+ if (logged_in != kCFBooleanTrue) {
+ want_user_interface = false;
+ }
+#endif // OS_MACOSX
+
+ if (want_user_interface) {
+ host_user_interface_.reset(new HostUserInterface(context_.get()));
+ }
+#endif // OS_MACOSX || OS_WIN
StartWatchingPolicy();
@@ -520,9 +537,11 @@ class HostProcess
host_event_logger_ = HostEventLogger::Create(host_, kApplicationName);
#if defined(OS_MACOSX) || defined(OS_WIN)
- host_user_interface_->Start(
- host_, base::Bind(&HostProcess::OnDisconnectRequested,
- base::Unretained(this)));
+ if (host_user_interface_.get()) {
+ host_user_interface_->Start(
+ host_, base::Bind(&HostProcess::OnDisconnectRequested,
+ base::Unretained(this)));
+ }
#endif
host_->Start();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698