| Index: remoting/host/remoting_me2me_host.cc
|
| ===================================================================
|
| --- remoting/host/remoting_me2me_host.cc (revision 154033)
|
| +++ remoting/host/remoting_me2me_host.cc (working copy)
|
| @@ -50,6 +50,7 @@
|
| #include "remoting/protocol/me2me_host_authenticator_factory.h"
|
|
|
| #if defined(OS_MACOSX)
|
| +#include "base/mac/scoped_cftyperef.h"
|
| #include "base/mac/scoped_nsautorelease_pool.h"
|
| #include "remoting/host/sighup_listener_mac.h"
|
| #endif
|
| @@ -209,9 +210,26 @@
|
| }
|
|
|
| #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();
|
|
|
| #if defined(OS_MACOSX) || defined(OS_WIN)
|
| @@ -441,9 +459,11 @@
|
| 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();
|
|
|