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

Side by Side Diff: ui/display/chromeos/display_configurator.h

Issue 2296003002: ABANDONED: chromeos: Resume displays when suspend is cancelled. (Closed)
Patch Set: fix comment Created 4 years, 3 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/fake_power_manager_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ 5 #ifndef UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_
6 #define UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ 6 #define UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 ~DisplayConfigurator() override; 168 ~DisplayConfigurator() override;
169 169
170 MultipleDisplayState display_state() const { return current_display_state_; } 170 MultipleDisplayState display_state() const { return current_display_state_; }
171 chromeos::DisplayPowerState requested_power_state() const { 171 chromeos::DisplayPowerState requested_power_state() const {
172 return requested_power_state_; 172 return requested_power_state_;
173 } 173 }
174 const gfx::Size framebuffer_size() const { return framebuffer_size_; } 174 const gfx::Size framebuffer_size() const { return framebuffer_size_; }
175 const std::vector<DisplaySnapshot*>& cached_displays() const { 175 const std::vector<DisplaySnapshot*>& cached_displays() const {
176 return cached_displays_; 176 return cached_displays_;
177 } 177 }
178 bool displays_suspended_for_test() const { return displays_suspended_; }
179
180 void set_state_controller(StateController* controller) {
181 state_controller_ = controller;
182 }
183 void set_mirroring_controller(SoftwareMirroringController* controller) {
184 mirroring_controller_ = controller;
185 }
178 186
179 // Called when an external process no longer needs to control the display 187 // Called when an external process no longer needs to control the display
180 // and Chrome can take control. 188 // and Chrome can take control.
181 void TakeControl(const DisplayControlCallback& callback); 189 void TakeControl(const DisplayControlCallback& callback);
182 190
183 // Called when an external process needs to control the display and thus 191 // Called when an external process needs to control the display and thus
184 // Chrome should relinquish it. 192 // Chrome should relinquish it.
185 void RelinquishControl(const DisplayControlCallback& callback); 193 void RelinquishControl(const DisplayControlCallback& callback);
186 194
187 void set_state_controller(StateController* controller) {
188 state_controller_ = controller;
189 }
190 void set_mirroring_controller(SoftwareMirroringController* controller) {
191 mirroring_controller_ = controller;
192 }
193
194 // Replaces |native_display_delegate_| with the delegate passed in and sets 195 // Replaces |native_display_delegate_| with the delegate passed in and sets
195 // |configure_display_| to true. Should be called before Init(). 196 // |configure_display_| to true. Should be called before Init().
196 void SetDelegateForTesting( 197 void SetDelegateForTesting(
197 std::unique_ptr<NativeDisplayDelegate> display_delegate); 198 std::unique_ptr<NativeDisplayDelegate> display_delegate);
198 199
199 // Sets the initial value of |power_state_|. Must be called before Start(). 200 // Sets the initial value of |power_state_|. Must be called before Start().
200 void SetInitialDisplayPower(chromeos::DisplayPowerState power_state); 201 void SetInitialDisplayPower(chromeos::DisplayPowerState power_state);
201 202
202 // Initialization, must be called right after constructor. 203 // Initialization, must be called right after constructor.
203 // |is_panel_fitting_enabled| indicates hardware panel fitting support. 204 // |is_panel_fitting_enabled| indicates hardware panel fitting support.
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 465
465 // This must be the last variable. 466 // This must be the last variable.
466 base::WeakPtrFactory<DisplayConfigurator> weak_ptr_factory_; 467 base::WeakPtrFactory<DisplayConfigurator> weak_ptr_factory_;
467 468
468 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); 469 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator);
469 }; 470 };
470 471
471 } // namespace ui 472 } // namespace ui
472 473
473 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ 474 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_power_manager_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698