| OLD | NEW |
| 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 ASH_DISPLAY_PROJECTING_OBSERVER_CHROMEOS_H_ | 5 #ifndef ASH_DISPLAY_PROJECTING_OBSERVER_CHROMEOS_H_ |
| 6 #define ASH_DISPLAY_PROJECTING_OBSERVER_CHROMEOS_H_ | 6 #define ASH_DISPLAY_PROJECTING_OBSERVER_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ui/display/chromeos/output_configurator.h" | 9 #include "ui/display/chromeos/display_configurator.h" |
| 10 | 10 |
| 11 namespace ash { | 11 namespace ash { |
| 12 | 12 |
| 13 class ASH_EXPORT ProjectingObserver : public ui::OutputConfigurator::Observer { | 13 class ASH_EXPORT ProjectingObserver : public ui::DisplayConfigurator::Observer { |
| 14 public: | 14 public: |
| 15 ProjectingObserver(); | 15 ProjectingObserver(); |
| 16 virtual ~ProjectingObserver(); | 16 virtual ~ProjectingObserver(); |
| 17 | 17 |
| 18 // Called when a casting session is started or stopped. | 18 // Called when a casting session is started or stopped. |
| 19 void OnCastingSessionStartedOrStopped(bool started); | 19 void OnCastingSessionStartedOrStopped(bool started); |
| 20 | 20 |
| 21 // OutputConfigurator::Observer implementation: | 21 // DisplayConfigurator::Observer implementation: |
| 22 virtual void OnDisplayModeChanged( | 22 virtual void OnDisplayModeChanged( |
| 23 const ui::OutputConfigurator::DisplayStateList& outputs) OVERRIDE; | 23 const ui::DisplayConfigurator::DisplayStateList& outputs) OVERRIDE; |
| 24 | 24 |
| 25 private: | 25 private: |
| 26 // Sends the current projecting state to power manager. | 26 // Sends the current projecting state to power manager. |
| 27 void SetIsProjecting(); | 27 void SetIsProjecting(); |
| 28 | 28 |
| 29 // True if at least one output is internal. This value is updated when | 29 // True if at least one output is internal. This value is updated when |
| 30 // |OnDisplayModeChanged| is called. | 30 // |OnDisplayModeChanged| is called. |
| 31 bool has_internal_output_; | 31 bool has_internal_output_; |
| 32 | 32 |
| 33 // Keeps track of the number of connected outputs. | 33 // Keeps track of the number of connected outputs. |
| 34 int output_count_; | 34 int output_count_; |
| 35 | 35 |
| 36 // Number of outstanding casting sessions. | 36 // Number of outstanding casting sessions. |
| 37 int casting_session_count_; | 37 int casting_session_count_; |
| 38 | 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(ProjectingObserver); | 39 DISALLOW_COPY_AND_ASSIGN(ProjectingObserver); |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 } // namespace ash | 42 } // namespace ash |
| 43 | 43 |
| 44 #endif // ASH_DISPLAY_PROJECTING_OBSERVER_CHROMEOS_H_ | 44 #endif // ASH_DISPLAY_PROJECTING_OBSERVER_CHROMEOS_H_ |
| OLD | NEW |