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

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

Issue 12395018: Write an error message to the debug log when the host is shutting down because of a policy setting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/host/curtain_mode_mac.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 <X11/extensions/XInput.h> 7 #include <X11/extensions/XInput.h>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 XFreeDeviceList(devices); 88 XFreeDeviceList(devices);
89 XCloseDisplay(display); 89 XCloseDisplay(display);
90 return found_xvfb_mouse && found_xvfb_keyboard && !found_other_devices; 90 return found_xvfb_mouse && found_xvfb_keyboard && !found_other_devices;
91 } 91 }
92 92
93 void CurtainModeLinux::SetActivated(bool activated) { 93 void CurtainModeLinux::SetActivated(bool activated) {
94 // We can't curtain the session in run-time in Linux. 94 // We can't curtain the session in run-time in Linux.
95 // Either the session is running on Xvfb (i.e. always curtained), or it is 95 // Either the session is running on Xvfb (i.e. always curtained), or it is
96 // attached to the physical console (i.e. impossible to curtain). 96 // attached to the physical console (i.e. impossible to curtain).
97 if (activated && !IsXvfbSession()) { 97 if (activated && !IsXvfbSession()) {
98 LOG(ERROR) << "Curtain-mode is not supported when running on non-Xvfb "
99 "X server";
98 on_error_.Run(); 100 on_error_.Run();
99 } 101 }
100 } 102 }
101 103
102 // static 104 // static
103 scoped_ptr<CurtainMode> CurtainMode::Create( 105 scoped_ptr<CurtainMode> CurtainMode::Create(
104 const base::Closure& on_session_activate, 106 const base::Closure& on_session_activate,
105 const base::Closure& on_error) { 107 const base::Closure& on_error) {
106 return scoped_ptr<CurtainMode>( 108 return scoped_ptr<CurtainMode>(
107 new CurtainModeLinux(on_session_activate, on_error)); 109 new CurtainModeLinux(on_session_activate, on_error));
108 } 110 }
109 111
110 } // namespace remoting 112 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/host/curtain_mode_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698