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

Unified Diff: ash/system/web_notification/ash_popup_alignment_delegate.cc

Issue 441013003: Move the logic of getting root window to StartObserving() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/web_notification/ash_popup_alignment_delegate.cc
diff --git a/ash/system/web_notification/ash_popup_alignment_delegate.cc b/ash/system/web_notification/ash_popup_alignment_delegate.cc
index 82181e544f70da9d0adacc7f46c4919609f5344c..1f8cd3a7bf2d1e59ca5debbe518614e883ff196a 100644
--- a/ash/system/web_notification/ash_popup_alignment_delegate.cc
+++ b/ash/system/web_notification/ash_popup_alignment_delegate.cc
@@ -51,6 +51,8 @@ void AshPopupAlignmentDelegate::StartObserving(gfx::Screen* screen,
const gfx::Display& display) {
screen_ = screen;
display_id_ = display.id();
+ root_window_ = ash::Shell::GetInstance()->display_controller()->
+ GetRootWindowForDisplayId(display_id_);
UpdateShelf();
screen->AddObserver(this);
Shell::GetInstance()->AddShellObserver(this);
@@ -124,9 +126,7 @@ void AshPopupAlignmentDelegate::UpdateShelf() {
if (shelf_)
return;
- aura::Window* root_window = ash::Shell::GetInstance()->display_controller()->
- GetRootWindowForDisplayId(display_id_);
- shelf_ = ShelfLayoutManager::ForShelf(root_window);
+ shelf_ = ShelfLayoutManager::ForShelf(root_window_);
if (shelf_)
shelf_->AddObserver(this);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698