| OLD | NEW |
| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // it. | 50 // it. |
| 51 class CHROMEOS_EXPORT OutputConfigurator : public MessageLoop::Dispatcher { | 51 class CHROMEOS_EXPORT OutputConfigurator : public MessageLoop::Dispatcher { |
| 52 public: | 52 public: |
| 53 class Observer { | 53 class Observer { |
| 54 public: | 54 public: |
| 55 // Called when the change of the display mode finished. It will usually | 55 // Called when the change of the display mode finished. It will usually |
| 56 // start the fading in the displays. | 56 // start the fading in the displays. |
| 57 virtual void OnDisplayModeChanged() {} | 57 virtual void OnDisplayModeChanged() {} |
| 58 | 58 |
| 59 // Called when the change of the display mode is issued but failed. | 59 // Called when the change of the display mode is issued but failed. |
| 60 virtual void OnDisplayModeChangeFailed() {} | 60 // |failed_new_state| is the new state which the system failed to enter. |
| 61 virtual void OnDisplayModeChangeFailed(OutputState failed_new_state) {} |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 OutputConfigurator(); | 64 OutputConfigurator(); |
| 64 virtual ~OutputConfigurator(); | 65 virtual ~OutputConfigurator(); |
| 65 | 66 |
| 66 int connected_output_count() const { return connected_output_count_; } | 67 int connected_output_count() const { return connected_output_count_; } |
| 67 | 68 |
| 68 OutputState output_state() const { return output_state_; } | 69 OutputState output_state() const { return output_state_; } |
| 69 | 70 |
| 70 // Initialization, must be called right after constructor. | 71 // Initialization, must be called right after constructor. |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 | 214 |
| 214 // Indicates the time at which |output_state_| was entered. | 215 // Indicates the time at which |output_state_| was entered. |
| 215 base::TimeTicks last_enter_state_time_; | 216 base::TimeTicks last_enter_state_time_; |
| 216 | 217 |
| 217 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); | 218 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); |
| 218 }; | 219 }; |
| 219 | 220 |
| 220 } // namespace chromeos | 221 } // namespace chromeos |
| 221 | 222 |
| 222 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ | 223 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ |
| OLD | NEW |