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

Side by Side Diff: ash/system/web_notification/ash_popup_alignment_delegate.cc

Issue 544883002: Reset the default work_area when start observing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/system/web_notification/ash_popup_alignment_delegate.h" 5 #include "ash/system/web_notification/ash_popup_alignment_delegate.h"
6 6
7 #include "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/shelf/shelf_constants.h" 8 #include "ash/shelf/shelf_constants.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shelf/shelf_types.h" 10 #include "ash/shelf/shelf_types.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 screen_->RemoveObserver(this); 44 screen_->RemoveObserver(this);
45 Shell::GetInstance()->RemoveShellObserver(this); 45 Shell::GetInstance()->RemoveShellObserver(this);
46 if (shelf_) 46 if (shelf_)
47 shelf_->RemoveObserver(this); 47 shelf_->RemoveObserver(this);
48 } 48 }
49 49
50 void AshPopupAlignmentDelegate::StartObserving(gfx::Screen* screen, 50 void AshPopupAlignmentDelegate::StartObserving(gfx::Screen* screen,
51 const gfx::Display& display) { 51 const gfx::Display& display) {
52 screen_ = screen; 52 screen_ = screen;
53 display_id_ = display.id(); 53 display_id_ = display.id();
54 work_area_ = display.work_area();
54 root_window_ = ash::Shell::GetInstance()->display_controller()-> 55 root_window_ = ash::Shell::GetInstance()->display_controller()->
55 GetRootWindowForDisplayId(display_id_); 56 GetRootWindowForDisplayId(display_id_);
56 UpdateShelf(); 57 UpdateShelf();
57 screen->AddObserver(this); 58 screen->AddObserver(this);
58 Shell::GetInstance()->AddShellObserver(this); 59 Shell::GetInstance()->AddShellObserver(this);
59 if (system_tray_height_ > 0) 60 if (system_tray_height_ > 0)
60 OnAutoHideStateChanged(shelf_->auto_hide_state()); 61 OnAutoHideStateChanged(shelf_->auto_hide_state());
61 } 62 }
62 63
63 void AshPopupAlignmentDelegate::SetSystemTrayHeight(int height) { 64 void AshPopupAlignmentDelegate::SetSystemTrayHeight(int height) {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 168 }
168 169
169 void AshPopupAlignmentDelegate::OnDisplayMetricsChanged( 170 void AshPopupAlignmentDelegate::OnDisplayMetricsChanged(
170 const gfx::Display& display, 171 const gfx::Display& display,
171 uint32_t metrics) { 172 uint32_t metrics) {
172 if (display.id() == display_id_ && shelf_) 173 if (display.id() == display_id_ && shelf_)
173 OnAutoHideStateChanged(shelf_->auto_hide_state()); 174 OnAutoHideStateChanged(shelf_->auto_hide_state());
174 } 175 }
175 176
176 } // namespace ash 177 } // namespace ash
OLDNEW
« 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