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. |
(...skipping 13 matching lines...) Expand all Loading... |
24 : public chromeos::OutputConfigurator::StateController, | 24 : public chromeos::OutputConfigurator::StateController, |
25 public chromeos::OutputConfigurator::Observer, | 25 public chromeos::OutputConfigurator::Observer, |
26 public ShellObserver { | 26 public ShellObserver { |
27 public: | 27 public: |
28 DisplayChangeObserverX11(); | 28 DisplayChangeObserverX11(); |
29 virtual ~DisplayChangeObserverX11(); | 29 virtual ~DisplayChangeObserverX11(); |
30 | 30 |
31 // chromeos::OutputConfigurator::StateController overrides: | 31 // chromeos::OutputConfigurator::StateController overrides: |
32 virtual chromeos::OutputState GetStateForDisplayIds( | 32 virtual chromeos::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, |
| 35 int* width, |
| 36 int* height) const OVERRIDE; |
34 | 37 |
35 // Overriden from chromeos::OutputConfigurator::Observer: | 38 // Overriden from chromeos::OutputConfigurator::Observer: |
36 virtual void OnDisplayModeChanged() OVERRIDE; | 39 virtual void OnDisplayModeChanged() OVERRIDE; |
37 | 40 |
38 // Overriden from ShellObserver: | 41 // Overriden from ShellObserver: |
39 virtual void OnAppTerminating() OVERRIDE; | 42 virtual void OnAppTerminating() OVERRIDE; |
40 | 43 |
41 private: | 44 private: |
42 Display* xdisplay_; | 45 Display* xdisplay_; |
43 | 46 |
44 ::Window x_root_window_; | 47 ::Window x_root_window_; |
45 | 48 |
46 int xrandr_event_base_; | 49 int xrandr_event_base_; |
47 | 50 |
48 DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserverX11); | 51 DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserverX11); |
49 }; | 52 }; |
50 | 53 |
51 // Returns true if the size info in the output_info isn't valid | |
52 // and should be ignored. This is exposed for testing. | |
53 // |mm_width| and |mm_height| are given in millimeters. | |
54 ASH_EXPORT bool ShouldIgnoreSize(unsigned long mm_width, | |
55 unsigned long mm_height); | |
56 | |
57 } // namespace internal | 54 } // namespace internal |
58 } // namespace ash | 55 } // namespace ash |
59 | 56 |
60 #endif // ASH_DISPLAY_AURA_DISPLAY_CHANGE_OBSERVER_X11_H | 57 #endif // ASH_DISPLAY_AURA_DISPLAY_CHANGE_OBSERVER_X11_H |
OLD | NEW |