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) { |