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 ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_X11_H | 5 #ifndef ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_X11_H |
6 #define ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_X11_H | 6 #define ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_X11_H |
7 | 7 |
8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
9 | 9 |
10 // Xlib.h defines RootWindow. | 10 // Xlib.h defines RootWindow. |
11 #undef RootWindow | 11 #undef RootWindow |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "chromeos/display/output_configurator.h" | 14 #include "chromeos/display/output_configurator.h" |
15 | 15 |
16 namespace ash { | 16 namespace ash { |
17 namespace internal { | 17 namespace internal { |
18 | 18 |
19 // An object that observes changes in display configuration and | 19 // An object that observes changes in display configuration and |
20 // update DisplayManagers. | 20 // update DisplayManagers. |
21 class DisplayChangeObserverX11 : public chromeos::OutputConfigurator::Observer { | 21 class DisplayChangeObserverX11 : public chromeos::OutputConfigurator::Delegate, |
| 22 public chromeos::OutputConfigurator::Observer { |
22 public: | 23 public: |
23 DisplayChangeObserverX11(); | 24 DisplayChangeObserverX11(); |
24 virtual ~DisplayChangeObserverX11(); | 25 virtual ~DisplayChangeObserverX11(); |
25 | 26 |
| 27 // chromeos::OutputConfigurator::Delegate overrides: |
| 28 virtual chromeos::OutputState GetStateForOutputs( |
| 29 const std::vector<RROutput>& outputs) const OVERRIDE; |
| 30 |
26 // Overriden from chromeos::OutputConfigurator::Observer: | 31 // Overriden from chromeos::OutputConfigurator::Observer: |
27 virtual void OnDisplayModeChanged() OVERRIDE; | 32 virtual void OnDisplayModeChanged() OVERRIDE; |
28 | 33 |
29 private: | 34 private: |
30 Display* xdisplay_; | 35 Display* xdisplay_; |
31 | 36 |
32 ::Window x_root_window_; | 37 ::Window x_root_window_; |
33 | 38 |
34 int xrandr_event_base_; | 39 int xrandr_event_base_; |
35 | 40 |
36 DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserverX11); | 41 DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserverX11); |
37 }; | 42 }; |
38 | 43 |
39 } // namespace internal | 44 } // namespace internal |
40 } // namespace ash | 45 } // namespace ash |
41 | 46 |
42 #endif // ASH_DISPLAY_AURA_DISPLAY_CHANGE_OBSERVER_X11_H | 47 #endif // ASH_DISPLAY_AURA_DISPLAY_CHANGE_OBSERVER_X11_H |
OLD | NEW |