OLD | NEW |
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 <stdint.h> |
| 9 |
8 #include <vector> | 10 #include <vector> |
9 | 11 |
10 #include "ash/ash_export.h" | 12 #include "ash/ash_export.h" |
11 #include "ash/shell_observer.h" | 13 #include "ash/shell_observer.h" |
12 #include "base/basictypes.h" | 14 #include "base/macros.h" |
13 #include "ui/display/chromeos/display_configurator.h" | 15 #include "ui/display/chromeos/display_configurator.h" |
14 #include "ui/events/devices/input_device_event_observer.h" | 16 #include "ui/events/devices/input_device_event_observer.h" |
15 | 17 |
16 namespace ash { | 18 namespace ash { |
17 | 19 |
18 class DisplayInfo; | 20 class DisplayInfo; |
19 struct DisplayMode; | 21 struct DisplayMode; |
20 class DisplaySnapshot; | 22 class DisplaySnapshot; |
21 | 23 |
22 // An object that observes changes in display configuration and | 24 // An object that observes changes in display configuration and |
(...skipping 11 matching lines...) Expand all Loading... |
34 // Returns the resolution list. | 36 // Returns the resolution list. |
35 ASH_EXPORT static std::vector<DisplayMode> GetExternalDisplayModeList( | 37 ASH_EXPORT static std::vector<DisplayMode> GetExternalDisplayModeList( |
36 const ui::DisplaySnapshot& output); | 38 const ui::DisplaySnapshot& output); |
37 | 39 |
38 DisplayChangeObserver(); | 40 DisplayChangeObserver(); |
39 ~DisplayChangeObserver() override; | 41 ~DisplayChangeObserver() override; |
40 | 42 |
41 // ui::DisplayConfigurator::StateController overrides: | 43 // ui::DisplayConfigurator::StateController overrides: |
42 ui::MultipleDisplayState GetStateForDisplayIds( | 44 ui::MultipleDisplayState GetStateForDisplayIds( |
43 const ui::DisplayConfigurator::DisplayStateList& outputs) const override; | 45 const ui::DisplayConfigurator::DisplayStateList& outputs) const override; |
44 bool GetResolutionForDisplayId(int64 display_id, | 46 bool GetResolutionForDisplayId(int64_t display_id, |
45 gfx::Size* size) const override; | 47 gfx::Size* size) const override; |
46 | 48 |
47 // Overriden from ui::DisplayConfigurator::Observer: | 49 // Overriden from ui::DisplayConfigurator::Observer: |
48 void OnDisplayModeChanged( | 50 void OnDisplayModeChanged( |
49 const ui::DisplayConfigurator::DisplayStateList& outputs) override; | 51 const ui::DisplayConfigurator::DisplayStateList& outputs) override; |
50 void OnDisplayModeChangeFailed( | 52 void OnDisplayModeChangeFailed( |
51 const ui::DisplayConfigurator::DisplayStateList& displays, | 53 const ui::DisplayConfigurator::DisplayStateList& displays, |
52 ui::MultipleDisplayState failed_new_state) override; | 54 ui::MultipleDisplayState failed_new_state) override; |
53 | 55 |
54 // Overriden from ui::InputDeviceEventObserver: | 56 // Overriden from ui::InputDeviceEventObserver: |
55 void OnTouchscreenDeviceConfigurationChanged() override; | 57 void OnTouchscreenDeviceConfigurationChanged() override; |
56 | 58 |
57 // Overriden from ShellObserver: | 59 // Overriden from ShellObserver: |
58 void OnAppTerminating() override; | 60 void OnAppTerminating() override; |
59 | 61 |
60 // Exposed for testing. | 62 // Exposed for testing. |
61 ASH_EXPORT static float FindDeviceScaleFactor(float dpi); | 63 ASH_EXPORT static float FindDeviceScaleFactor(float dpi); |
62 | 64 |
63 private: | 65 private: |
64 DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserver); | 66 DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserver); |
65 }; | 67 }; |
66 | 68 |
67 } // namespace ash | 69 } // namespace ash |
68 | 70 |
69 #endif // ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H_ | 71 #endif // ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H_ |
OLD | NEW |