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_MANAGER_H_ | 5 #ifndef ASH_DISPLAY_DISPLAY_MANAGER_H_ |
6 #define ASH_DISPLAY_DISPLAY_MANAGER_H_ | 6 #define ASH_DISPLAY_DISPLAY_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 // DisplayManager maintains the current display configurations, | 32 // DisplayManager maintains the current display configurations, |
33 // and notifies observers when configuration changes. | 33 // and notifies observers when configuration changes. |
34 // This is exported for unittest. | 34 // This is exported for unittest. |
35 // | 35 // |
36 // TODO(oshima): Make this non internal. | 36 // TODO(oshima): Make this non internal. |
37 class ASH_EXPORT DisplayManager : public aura::RootWindowObserver { | 37 class ASH_EXPORT DisplayManager : public aura::RootWindowObserver { |
38 public: | 38 public: |
39 DisplayManager(); | 39 DisplayManager(); |
40 virtual ~DisplayManager(); | 40 virtual ~DisplayManager(); |
41 | 41 |
| 42 // Returns the list of possible UI scales for the display. |
| 43 static std::vector<float> GetScalesForDisplay(const DisplayInfo& info); |
| 44 |
42 // Returns next valid UI scale. | 45 // Returns next valid UI scale. |
43 static float GetNextUIScale(const DisplayInfo& info, bool up); | 46 static float GetNextUIScale(const DisplayInfo& info, bool up); |
44 | 47 |
45 // When set to true, the MonitorManager calls OnDisplayBoundsChanged | 48 // When set to true, the MonitorManager calls OnDisplayBoundsChanged |
46 // even if the display's bounds didn't change. Used to swap primary | 49 // even if the display's bounds didn't change. Used to swap primary |
47 // display. | 50 // display. |
48 void set_force_bounds_changed(bool force_bounds_changed) { | 51 void set_force_bounds_changed(bool force_bounds_changed) { |
49 force_bounds_changed_ = force_bounds_changed; | 52 force_bounds_changed_ = force_bounds_changed; |
50 } | 53 } |
51 | 54 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 | 230 |
228 DISALLOW_COPY_AND_ASSIGN(DisplayManager); | 231 DISALLOW_COPY_AND_ASSIGN(DisplayManager); |
229 }; | 232 }; |
230 | 233 |
231 extern const aura::WindowProperty<int64>* const kDisplayIdKey; | 234 extern const aura::WindowProperty<int64>* const kDisplayIdKey; |
232 | 235 |
233 } // namespace internal | 236 } // namespace internal |
234 } // namespace ash | 237 } // namespace ash |
235 | 238 |
236 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ | 239 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ |
OLD | NEW |