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

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

Issue 1116313002: Layout login/lock screen, shelf and app list inside the first display in Unified Desktop mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/shell_unittest.cc ('k') | ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc » ('j') | 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 96ffc795396cf4012729cf0d80a5998fdd3ee688..c87c246081b499f730423a275bde0be20c4deeec 100644
--- a/ash/system/web_notification/ash_popup_alignment_delegate.cc
+++ b/ash/system/web_notification/ash_popup_alignment_delegate.cc
@@ -5,6 +5,7 @@
#include "ash/system/web_notification/ash_popup_alignment_delegate.h"
#include "ash/display/display_controller.h"
+#include "ash/screen_util.h"
#include "ash/shelf/shelf_constants.h"
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_types.h"
@@ -136,6 +137,12 @@ gfx::Display AshPopupAlignmentDelegate::GetCurrentDisplay() const {
void AshPopupAlignmentDelegate::UpdateWorkArea(const gfx::Display& display,
ShelfAutoHideState new_state) {
work_area_ = display.work_area();
+ if (Shell::GetInstance()->display_manager()->IsInUnifiedMode()) {
+ gfx::Rect bounds = ScreenUtil::GetShelfDisplayBoundsInScreen(
+ shelf_->shelf_widget()->GetNativeView());
+ work_area_.Intersect(bounds);
+ }
+
int width = 0;
if (shelf_ && (shelf_->visibility_state() == SHELF_AUTO_HIDE) &&
new_state == SHELF_AUTO_HIDE_SHOWN) {
« no previous file with comments | « ash/shell_unittest.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