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

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

Issue 22875019: chromeos: Notify observers after display power changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make NotifyObservers take a success argument Created 7 years, 4 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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 } 340 }
341 341
342 // Configure outputs with |kConfigureDelayMs| delay, 342 // Configure outputs with |kConfigureDelayMs| delay,
343 // so that time-consuming ConfigureOutputs() won't be called multiple times. 343 // so that time-consuming ConfigureOutputs() won't be called multiple times.
344 void ScheduleConfigureOutputs(); 344 void ScheduleConfigureOutputs();
345 345
346 private: 346 private:
347 // Configure outputs. 347 // Configure outputs.
348 void ConfigureOutputs(); 348 void ConfigureOutputs();
349 349
350 // Fires OnDisplayModeChanged() event to the observers. 350 // Notifies observers about an attempted state change.
351 void NotifyOnDisplayChanged(); 351 void NotifyObservers(bool success, OutputState attempted_state);
352 352
353 // Switches to the state specified in |output_state| and |power_state|. 353 // Switches to the state specified in |output_state| and |power_state|.
354 // If the hardware mirroring failed and |mirroring_controller_| is set, 354 // If the hardware mirroring failed and |mirroring_controller_| is set,
355 // it switches to |STATE_DUAL_EXTENDED| and calls |SetSoftwareMirroring()| 355 // it switches to |STATE_DUAL_EXTENDED| and calls |SetSoftwareMirroring()|
356 // to enable software based mirroring. 356 // to enable software based mirroring.
357 // On success, updates |output_state_|, |power_state_|, and |cached_outputs_| 357 // On success, updates |output_state_|, |power_state_|, and |cached_outputs_|
358 // and returns true. 358 // and returns true.
359 bool EnterStateOrFallBackToSoftwareMirroring( 359 bool EnterStateOrFallBackToSoftwareMirroring(
360 OutputState output_state, 360 OutputState output_state,
361 DisplayPowerState power_state, 361 DisplayPowerState power_state,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 scoped_ptr<base::OneShotTimer<OutputConfigurator> > configure_timer_; 424 scoped_ptr<base::OneShotTimer<OutputConfigurator> > configure_timer_;
425 425
426 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); 426 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator);
427 }; 427 };
428 428
429 typedef std::vector<OutputConfigurator::OutputSnapshot> OutputSnapshotList; 429 typedef std::vector<OutputConfigurator::OutputSnapshot> OutputSnapshotList;
430 430
431 } // namespace chromeos 431 } // namespace chromeos
432 432
433 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ 433 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_
OLDNEW
« no previous file with comments | « no previous file | chromeos/display/output_configurator.cc » ('j') | chromeos/display/output_configurator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698