Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(482)

Unified Diff: ui/aura/display_manager.cc

Issue 10675011: Rename the remaining usage of Monitor to Display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/display_manager.h ('k') | ui/aura/display_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/display_manager.cc
diff --git a/ui/aura/monitor_manager.cc b/ui/aura/display_manager.cc
similarity index 68%
rename from ui/aura/monitor_manager.cc
rename to ui/aura/display_manager.cc
index aba7bccdf0789f7032daf3cb42f86605029fd7fc..af1e848a06edada676eb835b8a8ae886b20a94aa 100644
--- a/ui/aura/monitor_manager.cc
+++ b/ui/aura/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/monitor_manager.h"
+#include "ui/aura/display_manager.h"
#include <stdio.h>
@@ -16,7 +16,7 @@
namespace aura {
namespace {
-// Default bounds for a monitor.
+// Default bounds for a display.
const int kDefaultHostWindowX = 200;
const int kDefaultHostWindowY = 200;
const int kDefaultHostWindowWidth = 1280;
@@ -24,11 +24,11 @@ const int kDefaultHostWindowHeight = 1024;
} // namespace
// static
-bool MonitorManager::use_fullscreen_host_window_ = false;
+bool DisplayManager::use_fullscreen_host_window_ = false;
// static
-gfx::Display MonitorManager::CreateMonitorFromSpec(const std::string& spec) {
- static int synthesized_monitor_id = 1000;
+gfx::Display DisplayManager::CreateDisplayFromSpec(const std::string& spec) {
+ static int synthesized_display_id = 1000;
gfx::Rect bounds(kDefaultHostWindowX, kDefaultHostWindowY,
kDefaultHostWindowWidth, kDefaultHostWindowHeight);
int x = 0, y = 0, width, height;
@@ -41,46 +41,46 @@ gfx::Display MonitorManager::CreateMonitorFromSpec(const std::string& spec) {
} else if (use_fullscreen_host_window_) {
bounds = gfx::Rect(aura::RootWindowHost::GetNativeScreenSize());
}
- gfx::Display display(synthesized_monitor_id++);
+ gfx::Display display(synthesized_display_id++);
display.SetScaleAndBounds(scale, bounds);
DVLOG(1) << "Display bounds=" << bounds.ToString() << ", scale=" << scale;
return display;
}
// static
-RootWindow* MonitorManager::CreateRootWindowForPrimaryMonitor() {
- MonitorManager* manager = aura::Env::GetInstance()->monitor_manager();
+RootWindow* DisplayManager::CreateRootWindowForPrimaryDisplay() {
+ DisplayManager* manager = aura::Env::GetInstance()->display_manager();
RootWindow* root =
- manager->CreateRootWindowForMonitor(manager->GetDisplayAt(0));
+ manager->CreateRootWindowForDisplay(manager->GetDisplayAt(0));
if (use_fullscreen_host_window_)
root->ConfineCursorToWindow();
return root;
}
-MonitorManager::MonitorManager() {
+DisplayManager::DisplayManager() {
}
-MonitorManager::~MonitorManager() {
+DisplayManager::~DisplayManager() {
}
-void MonitorManager::AddObserver(DisplayObserver* observer) {
+void DisplayManager::AddObserver(DisplayObserver* observer) {
observers_.AddObserver(observer);
}
-void MonitorManager::RemoveObserver(DisplayObserver* observer) {
+void DisplayManager::RemoveObserver(DisplayObserver* observer) {
observers_.RemoveObserver(observer);
}
-void MonitorManager::NotifyBoundsChanged(const gfx::Display& display) {
+void DisplayManager::NotifyBoundsChanged(const gfx::Display& display) {
FOR_EACH_OBSERVER(DisplayObserver, observers_,
OnDisplayBoundsChanged(display));
}
-void MonitorManager::NotifyDisplayAdded(const gfx::Display& display) {
+void DisplayManager::NotifyDisplayAdded(const gfx::Display& display) {
FOR_EACH_OBSERVER(DisplayObserver, observers_, OnDisplayAdded(display));
}
-void MonitorManager::NotifyDisplayRemoved(const gfx::Display& display) {
+void DisplayManager::NotifyDisplayRemoved(const gfx::Display& display) {
FOR_EACH_OBSERVER(DisplayObserver, observers_, OnDisplayRemoved(display));
}
« no previous file with comments | « ui/aura/display_manager.h ('k') | ui/aura/display_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698