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

Unified Diff: ash/monitor/monitor_controller.cc

Issue 10540091: Rename gfx::Monitor to gfx::Display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: ash/monitor/monitor_controller.cc
diff --git a/ash/monitor/monitor_controller.cc b/ash/monitor/monitor_controller.cc
index 1440daf6557431b543ecfc374f2dec338fd9ca5d..f430db7a904128deb5bd51046aaec0d050a34e7b 100644
--- a/ash/monitor/monitor_controller.cc
+++ b/ash/monitor/monitor_controller.cc
@@ -9,7 +9,7 @@
#include "ui/aura/env.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
-#include "ui/gfx/monitor.h"
+#include "ui/gfx/display.h"
namespace ash {
namespace internal {
@@ -39,31 +39,31 @@ void MonitorController::GetAllRootWindows(
windows->push_back(it->second);
}
-void MonitorController::OnMonitorBoundsChanged(const gfx::Monitor& monitor) {
- root_windows_[monitor.id()]->SetHostBounds(monitor.bounds_in_pixel());
+void MonitorController::OnDisplayBoundsChanged(const gfx::Display& display) {
+ root_windows_[display.id()]->SetHostBounds(display.bounds_in_pixel());
}
-void MonitorController::OnMonitorAdded(const gfx::Monitor& monitor) {
+void MonitorController::OnDisplayAdded(const gfx::Display& display) {
if (root_windows_.empty()) {
- root_windows_[monitor.id()] = Shell::GetPrimaryRootWindow();
- Shell::GetPrimaryRootWindow()->SetHostBounds(monitor.bounds_in_pixel());
+ root_windows_[display.id()] = Shell::GetPrimaryRootWindow();
+ Shell::GetPrimaryRootWindow()->SetHostBounds(display.bounds_in_pixel());
return;
}
aura::RootWindow* root = aura::Env::GetInstance()->monitor_manager()->
- CreateRootWindowForMonitor(monitor);
- root_windows_[monitor.id()] = root;
+ CreateRootWindowForMonitor(display);
+ root_windows_[display.id()] = root;
Shell::GetInstance()->InitRootWindowForSecondaryMonitor(root);
}
-void MonitorController::OnMonitorRemoved(const gfx::Monitor& monitor) {
- aura::RootWindow* root = root_windows_[monitor.id()];
+void MonitorController::OnDisplayRemoved(const gfx::Display& display) {
+ aura::RootWindow* root = root_windows_[display.id()];
DCHECK(root);
// Primary monitor should never be removed by MonitorManager.
DCHECK(root != Shell::GetPrimaryRootWindow());
// Monitor for root window will be deleted when the Primary RootWindow
// is deleted by the Shell.
if (root != Shell::GetPrimaryRootWindow()) {
- root_windows_.erase(monitor.id());
+ root_windows_.erase(display.id());
delete root;
}
}
@@ -72,15 +72,15 @@ void MonitorController::Init() {
aura::MonitorManager* monitor_manager =
aura::Env::GetInstance()->monitor_manager();
for (size_t i = 0; i < monitor_manager->GetNumMonitors(); ++i) {
- const gfx::Monitor& monitor = monitor_manager->GetMonitorAt(i);
+ const gfx::Display& display = monitor_manager->GetMonitorAt(i);
if (i == 0) {
// Primary monitor
- root_windows_[monitor.id()] = Shell::GetPrimaryRootWindow();
- Shell::GetPrimaryRootWindow()->SetHostBounds(monitor.bounds_in_pixel());
+ root_windows_[display.id()] = Shell::GetPrimaryRootWindow();
+ Shell::GetPrimaryRootWindow()->SetHostBounds(display.bounds_in_pixel());
} else {
aura::RootWindow* root =
- monitor_manager->CreateRootWindowForMonitor(monitor);
- root_windows_[monitor.id()] = root;
+ monitor_manager->CreateRootWindowForMonitor(display);
+ root_windows_[display.id()] = root;
Shell::GetInstance()->InitRootWindowForSecondaryMonitor(root);
}
}

Powered by Google App Engine
This is Rietveld 408576698