| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 11 #include "ash/display/window_tree_host_manager.h" | 11 #include "ash/display/window_tree_host_manager.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
| 16 #include "ui/display/display_observer.h" | 16 #include "ui/display/display_observer.h" |
| 17 #include "ui/gfx/geometry/size.h" | 17 #include "ui/gfx/geometry/size.h" |
| 18 | 18 |
| 19 namespace chromeos { | 19 namespace chromeos { |
| 20 FORWARD_DECLARE_TEST(DisplayPreferencesTest, PreventStore); | 20 FORWARD_DECLARE_TEST(DisplayPreferencesTest, PreventStore); |
| 21 } // namespace chromeos | 21 } // namespace chromeos |
| 22 | 22 |
| 23 namespace views { | |
| 24 class Label; | |
| 25 class Widget; | |
| 26 } // namespace views | |
| 27 | |
| 28 namespace ash { | 23 namespace ash { |
| 29 | 24 |
| 30 class DisplayMode; | |
| 31 | |
| 32 // A class which manages the notification of display resolution change and | 25 // A class which manages the notification of display resolution change and |
| 33 // also manages the timeout in case the new resolution is unusable. | 26 // also manages the timeout in case the new resolution is unusable. |
| 34 class ASH_EXPORT ResolutionNotificationController | 27 class ASH_EXPORT ResolutionNotificationController |
| 35 : public display::DisplayObserver, | 28 : public display::DisplayObserver, |
| 36 public WindowTreeHostManager::Observer { | 29 public WindowTreeHostManager::Observer { |
| 37 public: | 30 public: |
| 38 ResolutionNotificationController(); | 31 ResolutionNotificationController(); |
| 39 ~ResolutionNotificationController() override; | 32 ~ResolutionNotificationController() override; |
| 40 | 33 |
| 41 // Prepare a resolution change notification for |display_id| from | 34 // Prepare a resolution change notification for |display_id| from |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 static void SuppressTimerForTest(); | 94 static void SuppressTimerForTest(); |
| 102 | 95 |
| 103 std::unique_ptr<ResolutionChangeInfo> change_info_; | 96 std::unique_ptr<ResolutionChangeInfo> change_info_; |
| 104 | 97 |
| 105 DISALLOW_COPY_AND_ASSIGN(ResolutionNotificationController); | 98 DISALLOW_COPY_AND_ASSIGN(ResolutionNotificationController); |
| 106 }; | 99 }; |
| 107 | 100 |
| 108 } // namespace ash | 101 } // namespace ash |
| 109 | 102 |
| 110 #endif // ASH_DISPLAY_RESOLUTION_NOTIFICATION_CONTROLLER_H_ | 103 #endif // ASH_DISPLAY_RESOLUTION_NOTIFICATION_CONTROLLER_H_ |
| OLD | NEW |