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

Unified Diff: ash/shelf/shelf_layout_manager.cc

Issue 2093283002: mash: Convert all of //ash/system to use WmShelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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/system/DEPS » ('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 4c1b77ee2d03fc1cbc2105160b279eaab21ca081..00f41d0e69d2878a8e157d41782cb82f878c7a84 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -566,6 +566,26 @@ void ShelfLayoutManager::OnWindowActivated(
UpdateAutoHideStateNow();
}
+void ShelfLayoutManager::OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) {
+ bool keyboard_is_about_to_hide = false;
+ if (new_bounds.IsEmpty() && !keyboard_bounds_.IsEmpty())
+ keyboard_is_about_to_hide = true;
+
+ keyboard_bounds_ = new_bounds;
+ OnWindowResized();
+
+ SessionStateDelegate* session_state_delegate =
+ Shell::GetInstance()->session_state_delegate();
+
+ // On login screen if keyboard has been just hidden, update bounds just once
+ // but ignore target_bounds.work_area_insets since shelf overlaps with login
+ // window.
+ if (session_state_delegate->IsUserSessionBlocked() &&
+ keyboard_is_about_to_hide) {
+ Shell::GetInstance()->SetDisplayWorkAreaInsets(root_window_, gfx::Insets());
+ }
+}
+
bool ShelfLayoutManager::IsHorizontalAlignment() const {
return ::ash::IsHorizontalAlignment(GetAlignment());
}
@@ -1135,26 +1155,6 @@ int ShelfLayoutManager::GetWorkAreaInsets(const State& state, int size) const {
return 0;
}
-void ShelfLayoutManager::OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) {
- bool keyboard_is_about_to_hide = false;
- if (new_bounds.IsEmpty() && !keyboard_bounds_.IsEmpty())
- keyboard_is_about_to_hide = true;
-
- keyboard_bounds_ = new_bounds;
- OnWindowResized();
-
- SessionStateDelegate* session_state_delegate =
- Shell::GetInstance()->session_state_delegate();
-
- // On login screen if keyboard has been just hidden, update bounds just once
- // but ignore target_bounds.work_area_insets since shelf overlaps with login
- // window.
- if (session_state_delegate->IsUserSessionBlocked() &&
- keyboard_is_about_to_hide) {
- Shell::GetInstance()->SetDisplayWorkAreaInsets(root_window_, gfx::Insets());
- }
-}
-
void ShelfLayoutManager::OnDockBoundsChanging(
const gfx::Rect& dock_bounds,
DockedWindowLayoutManagerObserver::Reason reason) {
« no previous file with comments | « ash/shelf/shelf_layout_manager.h ('k') | ash/system/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698