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

Side by Side Diff: remoting/host/curtain_mode_mac.cc

Issue 11275178: Enforce the RemoteAccessHostRequireCurtain policy on all platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missing member to CurtainModeWin. Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/curtain_mode.h ('k') | remoting/host/curtain_mode_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « remoting/host/curtain_mode.h ('k') | remoting/host/curtain_mode_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698