| 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 UI_AURA_MONITOR_MANAGER_H_ | 5 #ifndef UI_AURA_MONITOR_MANAGER_H_ |
| 6 #define UI_AURA_MONITOR_MANAGER_H_ | 6 #define UI_AURA_MONITOR_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 static bool use_fullscreen_host_window() { | 36 static bool use_fullscreen_host_window() { |
| 37 return use_fullscreen_host_window_; | 37 return use_fullscreen_host_window_; |
| 38 } | 38 } |
| 39 | 39 |
| 40 // Creates a monitor from string spec. 100+200-1440x800 creates monitor | 40 // Creates a monitor from string spec. 100+200-1440x800 creates monitor |
| 41 // whose size is 1440x800 at the location (100, 200) in screen's coordinates. | 41 // whose size is 1440x800 at the location (100, 200) in screen's coordinates. |
| 42 // The location can be omitted and be just "1440x800", which creates | 42 // The location can be omitted and be just "1440x800", which creates |
| 43 // monitor at the origin of the screen. An empty string creates | 43 // monitor at the origin of the screen. An empty string creates |
| 44 // the monitor with default size. | 44 // the monitor with default size. |
| 45 // The device scale factor can be specified by "*", like "1280x780*2", | 45 // The device scale factor can be specified by "*", like "1280x780*2", |
| 46 // or |gfx::Display::GetDefaultDeviceScaleFactor()| will be used if omitted. | 46 // or will use the value of |gfx::Display::GetForcedDeviceScaleFactor()| if |
| 47 // --force-device-scale-factor is specified. |
| 47 static gfx::Display CreateMonitorFromSpec(const std::string& spec); | 48 static gfx::Display CreateMonitorFromSpec(const std::string& spec); |
| 48 | 49 |
| 49 // A utility function to create a root window for primary monitor. | 50 // A utility function to create a root window for primary monitor. |
| 50 static RootWindow* CreateRootWindowForPrimaryMonitor(); | 51 static RootWindow* CreateRootWindowForPrimaryMonitor(); |
| 51 | 52 |
| 52 MonitorManager(); | 53 MonitorManager(); |
| 53 virtual ~MonitorManager(); | 54 virtual ~MonitorManager(); |
| 54 | 55 |
| 55 // Adds/removes DisplayObservers. | 56 // Adds/removes DisplayObservers. |
| 56 void AddObserver(DisplayObserver* observer); | 57 void AddObserver(DisplayObserver* observer); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // switches::kAuraHostWindowSize flag. | 92 // switches::kAuraHostWindowSize flag. |
| 92 static bool use_fullscreen_host_window_; | 93 static bool use_fullscreen_host_window_; |
| 93 | 94 |
| 94 ObserverList<DisplayObserver> observers_; | 95 ObserverList<DisplayObserver> observers_; |
| 95 DISALLOW_COPY_AND_ASSIGN(MonitorManager); | 96 DISALLOW_COPY_AND_ASSIGN(MonitorManager); |
| 96 }; | 97 }; |
| 97 | 98 |
| 98 } // namespace aura | 99 } // namespace aura |
| 99 | 100 |
| 100 #endif // UI_AURA_MONITOR_MANAGER_H_ | 101 #endif // UI_AURA_MONITOR_MANAGER_H_ |
| OLD | NEW |