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( | |
35 int64 display_id, | |
36 size_t* width, | |
Daniel Erat
2013/07/31 17:34:05
why size_t? are you worried that these won't fit i
oshima
2013/07/31 21:59:49
sorry I forgot to fix this. I first thought this i
| |
37 size_t* height) const OVERRIDE; | |
34 | 38 |
35 // Overriden from chromeos::OutputConfigurator::Observer: | 39 // Overriden from chromeos::OutputConfigurator::Observer: |
36 virtual void OnDisplayModeChanged() OVERRIDE; | 40 virtual void OnDisplayModeChanged() OVERRIDE; |
37 | 41 |
38 // Overriden from ShellObserver: | 42 // Overriden from ShellObserver: |
39 virtual void OnAppTerminating() OVERRIDE; | 43 virtual void OnAppTerminating() OVERRIDE; |
40 | 44 |
41 private: | 45 private: |
42 Display* xdisplay_; | 46 Display* xdisplay_; |
43 | 47 |
44 ::Window x_root_window_; | 48 ::Window x_root_window_; |
45 | 49 |
46 int xrandr_event_base_; | 50 int xrandr_event_base_; |
47 | 51 |
48 DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserverX11); | 52 DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserverX11); |
49 }; | 53 }; |
50 | 54 |
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 | 55 } // namespace internal |
58 } // namespace ash | 56 } // namespace ash |
59 | 57 |
60 #endif // ASH_DISPLAY_AURA_DISPLAY_CHANGE_OBSERVER_X11_H | 58 #endif // ASH_DISPLAY_AURA_DISPLAY_CHANGE_OBSERVER_X11_H |
OLD | NEW |