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); |
} |