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

Unified Diff: ash/monitor/monitor_controller.cc

Issue 10442017: Rename GetRootWindow() -> GetPrimaryRootWindow() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git-try -b linux_chromeos,win_aura Created 8 years, 7 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 | « ash/magnifier/magnification_controller.cc ('k') | ash/monitor/multi_monitor_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/monitor/monitor_controller.cc
diff --git a/ash/monitor/monitor_controller.cc b/ash/monitor/monitor_controller.cc
index 486fde276d3e05750cc85c5fc51fecd6563453b1..59c6b4134945ccc16e1ad24d06da2cea0595e25b 100644
--- a/ash/monitor/monitor_controller.cc
+++ b/ash/monitor/monitor_controller.cc
@@ -46,7 +46,7 @@ MonitorController::MonitorController() {
MonitorController::~MonitorController() {
aura::Env::GetInstance()->monitor_manager()->RemoveObserver(this);
// Remove the root first.
- int monitor_id = Shell::GetRootWindow()->GetProperty(kMonitorIdKey);
+ int monitor_id = Shell::GetPrimaryRootWindow()->GetProperty(kMonitorIdKey);
DCHECK(monitor_id >= 0);
root_windows_.erase(monitor_id);
STLDeleteContainerPairSecondPointers(
@@ -59,8 +59,8 @@ void MonitorController::OnMonitorBoundsChanged(const gfx::Monitor& monitor) {
void MonitorController::OnMonitorAdded(const gfx::Monitor& monitor) {
if (root_windows_.empty()) {
- root_windows_[monitor.id()] = Shell::GetRootWindow();
- Shell::GetRootWindow()->SetHostBounds(monitor.bounds_in_pixel());
+ root_windows_[monitor.id()] = Shell::GetPrimaryRootWindow();
+ Shell::GetPrimaryRootWindow()->SetHostBounds(monitor.bounds_in_pixel());
return;
}
aura::RootWindow* root = aura::Env::GetInstance()->monitor_manager()->
@@ -73,10 +73,10 @@ void MonitorController::OnMonitorRemoved(const gfx::Monitor& monitor) {
aura::RootWindow* root = root_windows_[monitor.id()];
DCHECK(root);
// Primary monitor should never be removed by MonitorManager.
- DCHECK(root != Shell::GetRootWindow());
+ DCHECK(root != Shell::GetPrimaryRootWindow());
// Monitor for root window will be deleted when the Primary RootWindow
// is deleted by the Shell.
- if (root != Shell::GetRootWindow()) {
+ if (root != Shell::GetPrimaryRootWindow()) {
root_windows_.erase(monitor.id());
delete root;
}
@@ -89,8 +89,8 @@ void MonitorController::Init() {
const gfx::Monitor& monitor = monitor_manager->GetMonitorAt(i);
if (i == 0) {
// Primary monitor
- root_windows_[monitor.id()] = Shell::GetRootWindow();
- Shell::GetRootWindow()->SetHostBounds(monitor.bounds_in_pixel());
+ root_windows_[monitor.id()] = Shell::GetPrimaryRootWindow();
+ Shell::GetPrimaryRootWindow()->SetHostBounds(monitor.bounds_in_pixel());
} else {
aura::RootWindow* root =
monitor_manager->CreateRootWindowForMonitor(monitor);
« no previous file with comments | « ash/magnifier/magnification_controller.cc ('k') | ash/monitor/multi_monitor_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698