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

Side by Side Diff: ash/display/display_change_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: Rebased 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
« no previous file with comments | « ash/ash.gyp ('k') | ash/display/display_change_observer_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H 5 #ifndef ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H
6 #define ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H 6 #define ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/shell_observer.h" 9 #include "ash/shell_observer.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "ui/display/chromeos/output_configurator.h" 11 #include "ui/display/chromeos/output_configurator.h"
12 12
13 namespace ash { 13 namespace ash {
14 namespace internal { 14 namespace internal {
15 15
16 struct DisplayMode; 16 struct DisplayMode;
17 17
18 // An object that observes changes in display configuration and 18 // An object that observes changes in display configuration and
19 // update DisplayManagers. 19 // update DisplayManagers.
20 class DisplayChangeObserver : public ui::OutputConfigurator::StateController, 20 class DisplayChangeObserver : public ui::OutputConfigurator::StateController,
21 public ui::OutputConfigurator::Observer, 21 public ui::OutputConfigurator::Observer,
22 public ShellObserver { 22 public ShellObserver {
23 public: 23 public:
24 // Returns the resolution list. 24 // Returns the resolution list.
25 ASH_EXPORT static std::vector<DisplayMode> GetDisplayModeList( 25 ASH_EXPORT static std::vector<DisplayMode> GetDisplayModeList(
26 const ui::OutputConfigurator::OutputSnapshot& output); 26 const ui::OutputConfigurator::DisplayState& output);
27 27
28 DisplayChangeObserver(); 28 DisplayChangeObserver();
29 virtual ~DisplayChangeObserver(); 29 virtual ~DisplayChangeObserver();
30 30
31 // ui::OutputConfigurator::StateController overrides: 31 // ui::OutputConfigurator::StateController overrides:
32 virtual ui::OutputState GetStateForDisplayIds( 32 virtual ui::OutputState GetStateForDisplayIds(
33 const std::vector<int64>& outputs) const OVERRIDE; 33 const std::vector<int64>& outputs) const OVERRIDE;
34 virtual bool GetResolutionForDisplayId(int64 display_id, 34 virtual bool GetResolutionForDisplayId(int64 display_id,
35 int* width, 35 gfx::Size* size) const OVERRIDE;
36 int* height) const OVERRIDE;
37 36
38 // Overriden from ui::OutputConfigurator::Observer: 37 // Overriden from ui::OutputConfigurator::Observer:
39 virtual void OnDisplayModeChanged(const std::vector< 38 virtual void OnDisplayModeChanged(
40 ui::OutputConfigurator::OutputSnapshot>& outputs) OVERRIDE; 39 const ui::OutputConfigurator::DisplayStateList& outputs) OVERRIDE;
41 40
42 // Overriden from ShellObserver: 41 // Overriden from ShellObserver:
43 virtual void OnAppTerminating() OVERRIDE; 42 virtual void OnAppTerminating() OVERRIDE;
44 43
45 private: 44 private:
46 DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserver); 45 DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserver);
47 }; 46 };
48 47
49 } // namespace internal 48 } // namespace internal
50 } // namespace ash 49 } // namespace ash
51 50
52 #endif // ASH_DISPLAY_AURA_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H 51 #endif // ASH_DISPLAY_AURA_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/display/display_change_observer_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698