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

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

Issue 12036092: Implement support for monitor suspend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@git-svn
Patch Set: Fixed nits Created 7 years, 11 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
« no previous file with comments | « chromeos/dbus/power_manager_client.cc ('k') | chromeos/display/output_configurator.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 #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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // to our own reconfiguration operations so spurious events are common. 94 // to our own reconfiguration operations so spurious events are common.
95 // Spurious events will have no effect. 95 // Spurious events will have no effect.
96 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; 96 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
97 97
98 void AddObserver(Observer* observer); 98 void AddObserver(Observer* observer);
99 void RemoveObserver(Observer* observer); 99 void RemoveObserver(Observer* observer);
100 100
101 // Tells if the output specified by |name| is for internal display. 101 // Tells if the output specified by |name| is for internal display.
102 static bool IsInternalOutputName(const std::string& name); 102 static bool IsInternalOutputName(const std::string& name);
103 103
104 // Set all the displays into pre-suspend mode; usually this means configure
105 // them for their resume state. This allows faster resume on machines where
106 // display configuration is slow.
107 void SuspendDisplays();
108
104 private: 109 private:
105 // Fires OnDisplayModeChanged() event to the observers. 110 // Fires OnDisplayModeChanged() event to the observers.
106 void NotifyOnDisplayChanged(); 111 void NotifyOnDisplayChanged();
107 112
108 // Returns a vector filled with properties of the first two connected outputs 113 // Returns a vector filled with properties of the first two connected outputs
109 // found on |display| and |screen|. 114 // found on |display| and |screen|.
110 std::vector<OutputSnapshot> GetDualOutputs(Display* display, 115 std::vector<OutputSnapshot> GetDualOutputs(Display* display,
111 XRRScreenResources* screen); 116 XRRScreenResources* screen);
112 117
113 // Looks for a mode on internal and external outputs having same resolution. 118 // Looks for a mode on internal and external outputs having same resolution.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 206
202 // Indicates the time at which |output_state_| was entered. 207 // Indicates the time at which |output_state_| was entered.
203 base::TimeTicks last_enter_state_time_; 208 base::TimeTicks last_enter_state_time_;
204 209
205 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); 210 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator);
206 }; 211 };
207 212
208 } // namespace chromeos 213 } // namespace chromeos
209 214
210 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ 215 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/power_manager_client.cc ('k') | chromeos/display/output_configurator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698