OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/host/curtain_mode.h" | 5 #include "remoting/host/curtain_mode.h" |
6 | 6 |
7 #include <ApplicationServices/ApplicationServices.h> | 7 #include <ApplicationServices/ApplicationServices.h> |
8 #include <Carbon/Carbon.h> | 8 #include <Carbon/Carbon.h> |
9 #include <Security/Security.h> | 9 #include <Security/Security.h> |
10 #include <unistd.h> | 10 #include <unistd.h> |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 on_error_(on_error), | 58 on_error_(on_error), |
59 event_handler_(NULL) { | 59 event_handler_(NULL) { |
60 } | 60 } |
61 | 61 |
62 CurtainModeMac::~CurtainModeMac() { | 62 CurtainModeMac::~CurtainModeMac() { |
63 SetActivated(false); | 63 SetActivated(false); |
64 } | 64 } |
65 | 65 |
66 void CurtainModeMac::SetActivated(bool activated) { | 66 void CurtainModeMac::SetActivated(bool activated) { |
67 if (activated) { | 67 if (activated) { |
68 if (!ActivateCurtain()) { | 68 // Curtain-mode has issues on Mac OS X 10.7, so is currently disabled. |
69 on_error_.Run(); | 69 //if (!ActivateCurtain()) { |
70 } | 70 on_error_.Run(); |
| 71 //} |
71 } else { | 72 } else { |
72 RemoveEventHandler(); | 73 RemoveEventHandler(); |
73 } | 74 } |
74 } | 75 } |
75 | 76 |
76 bool CurtainModeMac::ActivateCurtain() { | 77 bool CurtainModeMac::ActivateCurtain() { |
77 // Try to install the switch-in handler. Do this before switching out the | 78 // Try to install the switch-in handler. Do this before switching out the |
78 // current session so that the console session is not affected if it fails. | 79 // current session so that the console session is not affected if it fails. |
79 if (!InstallEventHandler()) { | 80 if (!InstallEventHandler()) { |
80 return false; | 81 return false; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 142 |
142 // static | 143 // static |
143 scoped_ptr<CurtainMode> CurtainMode::Create( | 144 scoped_ptr<CurtainMode> CurtainMode::Create( |
144 const base::Closure& on_session_activate, | 145 const base::Closure& on_session_activate, |
145 const base::Closure& on_error) { | 146 const base::Closure& on_error) { |
146 return scoped_ptr<CurtainMode>( | 147 return scoped_ptr<CurtainMode>( |
147 new CurtainModeMac(on_session_activate, on_error)); | 148 new CurtainModeMac(on_session_activate, on_error)); |
148 } | 149 } |
149 | 150 |
150 } // namespace remoting | 151 } // namespace remoting |
OLD | NEW |