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

Unified Diff: ash/shelf/shelf_layout_manager.cc

Issue 2225083003: mash: Add WmShell::SetDisplayWorkAreaInsets for ShelfLayoutManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits; fix bad argument. Created 4 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 | « ash/shelf/shelf_layout_manager.h ('k') | ash/shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager.cc
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index 2dedc9437901816c28cb07c9860c9b2af6dddb73..61f1c4555a3df705c1dcefcc95e6e1c431a7f323 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -193,8 +193,7 @@ class ShelfLayoutManager::RootWindowControllerObserverImpl
// ShelfLayoutManager ----------------------------------------------------------
ShelfLayoutManager::ShelfLayoutManager(ShelfWidget* shelf_widget)
- : root_window_(shelf_widget->GetNativeView()->GetRootWindow()),
- updating_bounds_(false),
+ : updating_bounds_(false),
shelf_widget_(shelf_widget),
workspace_controller_(NULL),
window_overlaps_shelf_(false),
@@ -481,7 +480,8 @@ void ShelfLayoutManager::OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) {
// window.
if (WmShell::Get()->GetSessionStateDelegate()->IsUserSessionBlocked() &&
keyboard_is_about_to_hide) {
- Shell::GetInstance()->SetDisplayWorkAreaInsets(root_window_, gfx::Insets());
+ WmWindow* window = WmLookup::Get()->GetWindowForWidget(shelf_widget_);
+ WmShell::Get()->SetDisplayWorkAreaInsets(window, gfx::Insets());
}
}
@@ -693,7 +693,8 @@ void ShelfLayoutManager::UpdateBoundsAndOpacity(
// if keyboard is not shown.
if (!state_.is_adding_user_screen || !keyboard_bounds_.IsEmpty())
insets = target_bounds.work_area_insets;
- Shell::GetInstance()->SetDisplayWorkAreaInsets(root_window_, insets);
+ WmWindow* window = WmLookup::Get()->GetWindowForWidget(shelf_widget_);
+ WmShell::Get()->SetDisplayWorkAreaInsets(window, insets);
}
}
« no previous file with comments | « ash/shelf/shelf_layout_manager.h ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698