remoting_me2me_host: Don't try to display UI on top of Mac login screen

Trying to display the Disconnect window causes rejection from the Window Server on
OS X 10.7.4, preventing the capturer from working.

BUG=140984
TEST=Verify Chromoting works on the system login screen.


Review URL: https://chromiumcodereview.appspot.com/10883033

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153610 0039d316-1c4b-4281-b951-d872f2087c98
parent 210f33c8
......@@ -246,8 +246,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();
......@@ -517,9 +534,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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment