Chromium Code Reviews| 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 24 matching lines...) Expand all Loading... | |
| 35 } | 35 } |
| 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 specifeid by "*", like "1280x780*2", | |
|
Ben Goodger (Google)
2012/04/30 21:54:36
specified
oshima
2012/04/30 23:13:33
Done.
| |
| 46 // or |gfx::Monitor::GetDefaultDeviceScaleFactor()| will be used if omitted. | |
| 45 static gfx::Monitor CreateMonitorFromSpec(const std::string& spec); | 47 static gfx::Monitor CreateMonitorFromSpec(const std::string& spec); |
| 46 | 48 |
| 47 // A utility function to create a root window for primary monitor. | 49 // A utility function to create a root window for primary monitor. |
| 48 static RootWindow* CreateRootWindowForPrimaryMonitor(); | 50 static RootWindow* CreateRootWindowForPrimaryMonitor(); |
| 49 | 51 |
| 50 MonitorManager(); | 52 MonitorManager(); |
| 51 virtual ~MonitorManager(); | 53 virtual ~MonitorManager(); |
| 52 | 54 |
| 53 // Adds/removes MonitorObservers. | 55 // Adds/removes MonitorObservers. |
| 54 void AddObserver(MonitorObserver* observer); | 56 void AddObserver(MonitorObserver* observer); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 // switches::kAuraHostWindowSize flag. | 92 // switches::kAuraHostWindowSize flag. |
| 91 static bool use_fullscreen_host_window_; | 93 static bool use_fullscreen_host_window_; |
| 92 | 94 |
| 93 ObserverList<MonitorObserver> observers_; | 95 ObserverList<MonitorObserver> observers_; |
| 94 DISALLOW_COPY_AND_ASSIGN(MonitorManager); | 96 DISALLOW_COPY_AND_ASSIGN(MonitorManager); |
| 95 }; | 97 }; |
| 96 | 98 |
| 97 } // namespace aura | 99 } // namespace aura |
| 98 | 100 |
| 99 #endif // UI_AURA_MONITOR_MANAGER_H_ | 101 #endif // UI_AURA_MONITOR_MANAGER_H_ |
| OLD | NEW |