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_RESOLUTION_NOTIFICATION_CONTROLLER_H_ | 5 #ifndef ASH_DISPLAY_RESOLUTION_NOTIFICATION_CONTROLLER_H_ |
6 #define ASH_DISPLAY_RESOLUTION_NOTIFICATION_CONTROLLER_H_ | 6 #define ASH_DISPLAY_RESOLUTION_NOTIFICATION_CONTROLLER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/display/display_controller.h" | 9 #include "ash/display/display_controller.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
12 #include "base/timer/timer.h" | 12 #include "base/timer/timer.h" |
13 #include "ui/gfx/display_observer.h" | 13 #include "ui/gfx/display_observer.h" |
14 #include "ui/gfx/size.h" | 14 #include "ui/gfx/size.h" |
15 | 15 |
16 namespace chromeos { | 16 namespace chromeos { |
17 FORWARD_DECLARE_TEST(DisplayPreferencesTest, PreventStore); | 17 FORWARD_DECLARE_TEST(DisplayPreferencesTest, PreventStore); |
18 } // namespace chromeos | 18 } // namespace chromeos |
19 | 19 |
20 namespace views { | 20 namespace views { |
21 class Label; | 21 class Label; |
22 class Widget; | 22 class Widget; |
23 } // namespace views | 23 } // namespace views |
24 | 24 |
25 namespace ash { | 25 namespace ash { |
26 namespace internal { | 26 |
27 // A class which manages the notification of display resolution change and | 27 // A class which manages the notification of display resolution change and |
28 // also manages the timeout in case the new resolution is unusable. | 28 // also manages the timeout in case the new resolution is unusable. |
29 class ASH_EXPORT ResolutionNotificationController | 29 class ASH_EXPORT ResolutionNotificationController |
30 : public gfx::DisplayObserver, | 30 : public gfx::DisplayObserver, |
31 public DisplayController::Observer { | 31 public DisplayController::Observer { |
32 public: | 32 public: |
33 ResolutionNotificationController(); | 33 ResolutionNotificationController(); |
34 virtual ~ResolutionNotificationController(); | 34 virtual ~ResolutionNotificationController(); |
35 | 35 |
36 // Updates the display resolution for |display_id| to |new_resolution| and | 36 // Updates the display resolution for |display_id| to |new_resolution| and |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // DisplayController::Observer overrides: | 86 // DisplayController::Observer overrides: |
87 virtual void OnDisplayConfigurationChanged() OVERRIDE; | 87 virtual void OnDisplayConfigurationChanged() OVERRIDE; |
88 | 88 |
89 static void SuppressTimerForTest(); | 89 static void SuppressTimerForTest(); |
90 | 90 |
91 scoped_ptr<ResolutionChangeInfo> change_info_; | 91 scoped_ptr<ResolutionChangeInfo> change_info_; |
92 | 92 |
93 DISALLOW_COPY_AND_ASSIGN(ResolutionNotificationController); | 93 DISALLOW_COPY_AND_ASSIGN(ResolutionNotificationController); |
94 }; | 94 }; |
95 | 95 |
96 } // namespace internal | |
97 } // namespace ash | 96 } // namespace ash |
98 | 97 |
99 #endif // ASH_DISPLAY_RESOLUTION_NOTIFICATION_CONTROLLER_H_ | 98 #endif // ASH_DISPLAY_RESOLUTION_NOTIFICATION_CONTROLLER_H_ |
OLD | NEW |