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

Side by Side Diff: chromeos/display/output_configurator.h

Issue 12367007: Don't handle display change event/requests to avoid being killed by session manager (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
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 #ifndef CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ 5 #ifndef CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_
6 #define CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ 6 #define CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 OutputState output_state() const { return output_state_; } 68 OutputState output_state() const { return output_state_; }
69 69
70 // Initialization, must be called right after constructor. 70 // Initialization, must be called right after constructor.
71 // |is_panel_fitting_enabled| indicates hardware panel fitting support. 71 // |is_panel_fitting_enabled| indicates hardware panel fitting support.
72 // If |background_color_argb| is non zero and there are multiple displays, 72 // If |background_color_argb| is non zero and there are multiple displays,
73 // OutputConfigurator sets the background color of X's RootWindow to this 73 // OutputConfigurator sets the background color of X's RootWindow to this
74 // color. 74 // color.
75 void Init(bool is_panel_fitting_enabled, uint32 background_color_argb); 75 void Init(bool is_panel_fitting_enabled, uint32 background_color_argb);
76 76
77 // Stop handling display configuration events/requests.
78 void Stop();
79
77 // Called when the user hits ctrl-F4 to request a display mode change. 80 // Called when the user hits ctrl-F4 to request a display mode change.
78 // This method should only return false if it was called in a single-head or 81 // This method should only return false if it was called in a single-head or
79 // headless mode. 82 // headless mode.
80 bool CycleDisplayMode(); 83 bool CycleDisplayMode();
81 84
82 // Called when powerd notifies us that some set of displays should be turned 85 // Called when powerd notifies us that some set of displays should be turned
83 // on or off. This requires enabling or disabling the CRTC associated with 86 // on or off. This requires enabling or disabling the CRTC associated with
84 // the display(s) in question so that the low power state is engaged. 87 // the display(s) in question so that the low power state is engaged.
85 bool ScreenPowerSet(bool power_on, bool all_displays); 88 bool ScreenPowerSet(bool power_on, bool all_displays);
86 89
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 static bool IsInternalOutput(const XRROutputInfo* output_info); 174 static bool IsInternalOutput(const XRROutputInfo* output_info);
172 175
173 // Returns output's native mode, None if not found. 176 // Returns output's native mode, None if not found.
174 static RRMode GetOutputNativeMode(const XRROutputInfo* output_info); 177 static RRMode GetOutputNativeMode(const XRROutputInfo* output_info);
175 178
176 // This is detected by the constructor to determine whether or not we should 179 // This is detected by the constructor to determine whether or not we should
177 // be enabled. If we aren't running on ChromeOS, we can't assume that the 180 // be enabled. If we aren't running on ChromeOS, we can't assume that the
178 // Xrandr X11 extension is supported. 181 // Xrandr X11 extension is supported.
179 // If this flag is set to false, any attempts to change the output 182 // If this flag is set to false, any attempts to change the output
180 // configuration to immediately fail without changing the state. 183 // configuration to immediately fail without changing the state.
181 bool is_running_on_chrome_os_; 184 bool configure_display_;
182 185
183 // This is set externally in Init, 186 // This is set externally in Init,
184 // and is used to enable modes which rely on panel fitting. 187 // and is used to enable modes which rely on panel fitting.
185 bool is_panel_fitting_enabled_; 188 bool is_panel_fitting_enabled_;
186 189
187 // The number of outputs that are connected. 190 // The number of outputs that are connected.
188 int connected_output_count_; 191 int connected_output_count_;
189 192
190 // The base of the event numbers used to represent XRandr events used in 193 // The base of the event numbers used to represent XRandr events used in
191 // decoding events regarding output add/remove. 194 // decoding events regarding output add/remove.
(...skipping 18 matching lines...) Expand all
210 213
211 // Indicates the time at which |output_state_| was entered. 214 // Indicates the time at which |output_state_| was entered.
212 base::TimeTicks last_enter_state_time_; 215 base::TimeTicks last_enter_state_time_;
213 216
214 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); 217 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator);
215 }; 218 };
216 219
217 } // namespace chromeos 220 } // namespace chromeos
218 221
219 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ 222 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/lifetime/application_lifetime_aura.cc ('k') | chromeos/display/output_configurator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698