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

Side by Side Diff: ash/display/projecting_observer_chromeos.h

Issue 187073002: Refactoring display configuration state to allow generic state objects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 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 "chromeos/display/output_configurator.h" 9 #include "chromeos/display/output_configurator.h"
10 10
11 namespace ash { 11 namespace ash {
12 12
13 namespace internal { 13 namespace internal {
14 14
15 class ASH_EXPORT ProjectingObserver 15 class ASH_EXPORT ProjectingObserver
16 : public chromeos::OutputConfigurator::Observer { 16 : public chromeos::OutputConfigurator::Observer {
17 public: 17 public:
18 ProjectingObserver(); 18 ProjectingObserver();
19 virtual ~ProjectingObserver(); 19 virtual ~ProjectingObserver();
20 20
21 // Called when a casting session is started or stopped. 21 // Called when a casting session is started or stopped.
22 void OnCastingSessionStartedOrStopped(bool started); 22 void OnCastingSessionStartedOrStopped(bool started);
23 23
24 // OutputConfigurator::Observer implementation: 24 // OutputConfigurator::Observer implementation:
25 virtual void OnDisplayModeChanged(const std::vector< 25 virtual void OnDisplayModeChanged(const std::vector<
26 chromeos::OutputConfigurator::OutputSnapshot>& outputs) OVERRIDE; 26 chromeos::OutputConfigurator::InternalDisplayState>& outputs) OVERRIDE;
27 27
28 private: 28 private:
29 // Sends the current projecting state to power manager. 29 // Sends the current projecting state to power manager.
30 void SetIsProjecting(); 30 void SetIsProjecting();
31 31
32 // True if at least one output is internal. This value is updated when 32 // True if at least one output is internal. This value is updated when
33 // |OnDisplayModeChanged| is called. 33 // |OnDisplayModeChanged| is called.
34 bool has_internal_output_; 34 bool has_internal_output_;
35 35
36 // Keeps track of the number of connected outputs. 36 // Keeps track of the number of connected outputs.
37 int output_count_; 37 int output_count_;
38 38
39 // Number of outstanding casting sessions. 39 // Number of outstanding casting sessions.
40 int casting_session_count_; 40 int casting_session_count_;
41 41
42 DISALLOW_COPY_AND_ASSIGN(ProjectingObserver); 42 DISALLOW_COPY_AND_ASSIGN(ProjectingObserver);
43 }; 43 };
44 44
45 } // namespace internal 45 } // namespace internal
46 46
47 } // namespace ash 47 } // namespace ash
48 48
49 #endif // ASH_DISPLAY_PROJECTING_OBSERVER_CHROMEOS_H_ 49 #endif // ASH_DISPLAY_PROJECTING_OBSERVER_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698