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

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

Issue 1121893004: Have Notifications appear over docked windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // Since the work_area is already reduced by kAutoHideSize, the inset width 142 // Since the work_area is already reduced by kAutoHideSize, the inset width
143 // should be just the difference. 143 // should be just the difference.
144 width = kShelfSize - ShelfLayoutManager::kAutoHideSize; 144 width = kShelfSize - ShelfLayoutManager::kAutoHideSize;
145 } 145 }
146 work_area_.Inset(shelf_->SelectValueForShelfAlignment( 146 work_area_.Inset(shelf_->SelectValueForShelfAlignment(
147 gfx::Insets(0, 0, width, 0), 147 gfx::Insets(0, 0, width, 0),
148 gfx::Insets(0, width, 0, 0), 148 gfx::Insets(0, width, 0, 0),
149 gfx::Insets(0, 0, 0, width), 149 gfx::Insets(0, 0, 0, width),
150 gfx::Insets(width, 0, 0, 0))); 150 gfx::Insets(width, 0, 0, 0)));
151 151
152 if (shelf_)
153 work_area_.Union(shelf_->dock_bounds());
oshima 2015/05/06 21:01:18 I don't think this is correct. let me take a look.
jonross 2015/05/07 18:54:27 Updated per offline discussions. ShelfLayoutManage
154
152 DoUpdateIfPossible(); 155 DoUpdateIfPossible();
153 } 156 }
154 157
155 void AshPopupAlignmentDelegate::OnDisplayWorkAreaInsetsChanged() { 158 void AshPopupAlignmentDelegate::OnDisplayWorkAreaInsetsChanged() {
156 UpdateShelf(); 159 UpdateShelf();
157 UpdateWorkArea(GetCurrentDisplay(), shelf_->auto_hide_state()); 160 UpdateWorkArea(GetCurrentDisplay(), shelf_->auto_hide_state());
158 } 161 }
159 162
160 void AshPopupAlignmentDelegate::OnAutoHideStateChanged( 163 void AshPopupAlignmentDelegate::OnAutoHideStateChanged(
161 ShelfAutoHideState new_state) { 164 ShelfAutoHideState new_state) {
(...skipping 10 matching lines...) Expand all
172 175
173 void AshPopupAlignmentDelegate::OnDisplayMetricsChanged( 176 void AshPopupAlignmentDelegate::OnDisplayMetricsChanged(
174 const gfx::Display& display, 177 const gfx::Display& display,
175 uint32_t metrics) { 178 uint32_t metrics) {
176 UpdateShelf(); 179 UpdateShelf();
177 if (shelf_ && GetCurrentDisplay().id() == display.id()) 180 if (shelf_ && GetCurrentDisplay().id() == display.id())
178 UpdateWorkArea(display, shelf_->auto_hide_state()); 181 UpdateWorkArea(display, shelf_->auto_hide_state());
179 } 182 }
180 183
181 } // namespace ash 184 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698