| Index: ui/aura/single_display_manager.cc
|
| diff --git a/ui/aura/single_monitor_manager.cc b/ui/aura/single_display_manager.cc
|
| similarity index 66%
|
| rename from ui/aura/single_monitor_manager.cc
|
| rename to ui/aura/single_display_manager.cc
|
| index e0993410c9735aeb360fa91bf4bca06ed12d7473..3ffc80b3a616c986015dce64d6f0c0738137b95d 100644
|
| --- a/ui/aura/single_monitor_manager.cc
|
| +++ b/ui/aura/single_display_manager.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "ui/aura/single_monitor_manager.h"
|
| +#include "ui/aura/single_display_manager.h"
|
|
|
| #include <string>
|
|
|
| @@ -18,24 +18,24 @@ namespace aura {
|
| using std::string;
|
|
|
| namespace {
|
| -// Default bounds for the primary monitor.
|
| +// Default bounds for the primary display.
|
| const int kDefaultHostWindowX = 200;
|
| const int kDefaultHostWindowY = 200;
|
| const int kDefaultHostWindowWidth = 1280;
|
| const int kDefaultHostWindowHeight = 1024;
|
| } // namespace
|
|
|
| -SingleMonitorManager::SingleMonitorManager()
|
| +SingleDisplayManager::SingleDisplayManager()
|
| : root_window_(NULL) {
|
| Init();
|
| }
|
|
|
| -SingleMonitorManager::~SingleMonitorManager() {
|
| - // All monitors must have been deleted when monitor manager is deleted.
|
| +SingleDisplayManager::~SingleDisplayManager() {
|
| + // All displays must have been deleted when display manager is deleted.
|
| CHECK(!root_window_);
|
| }
|
|
|
| -void SingleMonitorManager::OnNativeMonitorsChanged(
|
| +void SingleDisplayManager::OnNativeDisplaysChanged(
|
| const std::vector<gfx::Display>& displays) {
|
| DCHECK(displays.size() > 0);
|
| if (use_fullscreen_host_window()) {
|
| @@ -44,7 +44,7 @@ void SingleMonitorManager::OnNativeMonitorsChanged(
|
| }
|
| }
|
|
|
| -RootWindow* SingleMonitorManager::CreateRootWindowForMonitor(
|
| +RootWindow* SingleDisplayManager::CreateRootWindowForDisplay(
|
| const gfx::Display& display) {
|
| DCHECK(!root_window_);
|
| DCHECK_EQ(display_.id(), display.id());
|
| @@ -54,25 +54,25 @@ RootWindow* SingleMonitorManager::CreateRootWindowForMonitor(
|
| return root_window_;
|
| }
|
|
|
| -const gfx::Display& SingleMonitorManager::GetDisplayAt(size_t index) {
|
| +const gfx::Display& SingleDisplayManager::GetDisplayAt(size_t index) {
|
| return display_;
|
| }
|
|
|
| -size_t SingleMonitorManager::GetNumDisplays() const {
|
| +size_t SingleDisplayManager::GetNumDisplays() const {
|
| return 1;
|
| }
|
|
|
| -const gfx::Display& SingleMonitorManager::GetDisplayNearestWindow(
|
| +const gfx::Display& SingleDisplayManager::GetDisplayNearestWindow(
|
| const Window* window) const {
|
| return display_;
|
| }
|
|
|
| -const gfx::Display& SingleMonitorManager::GetDisplayNearestPoint(
|
| +const gfx::Display& SingleDisplayManager::GetDisplayNearestPoint(
|
| const gfx::Point& point) const {
|
| return display_;
|
| }
|
|
|
| -void SingleMonitorManager::OnWindowBoundsChanged(
|
| +void SingleDisplayManager::OnWindowBoundsChanged(
|
| Window* window, const gfx::Rect& old_bounds, const gfx::Rect& new_bounds) {
|
| if (!use_fullscreen_host_window()) {
|
| Update(new_bounds.size());
|
| @@ -80,18 +80,18 @@ void SingleMonitorManager::OnWindowBoundsChanged(
|
| }
|
| }
|
|
|
| -void SingleMonitorManager::OnWindowDestroying(Window* window) {
|
| +void SingleDisplayManager::OnWindowDestroying(Window* window) {
|
| if (root_window_ == window)
|
| root_window_ = NULL;
|
| }
|
|
|
| -void SingleMonitorManager::Init() {
|
| +void SingleDisplayManager::Init() {
|
| const string size_str = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
|
| switches::kAuraHostWindowSize);
|
| - display_ = CreateMonitorFromSpec(size_str);
|
| + display_ = CreateDisplayFromSpec(size_str);
|
| }
|
|
|
| -void SingleMonitorManager::Update(const gfx::Size size) {
|
| +void SingleDisplayManager::Update(const gfx::Size size) {
|
| display_.SetSize(size);
|
| }
|
|
|
|
|