OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/common/shelf/shelf_layout_manager.h" | 5 #include "ash/common/shelf/shelf_layout_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 // On login screen if keyboard has been just hidden, update bounds just once | 412 // On login screen if keyboard has been just hidden, update bounds just once |
413 // but ignore target_bounds.work_area_insets since shelf overlaps with login | 413 // but ignore target_bounds.work_area_insets since shelf overlaps with login |
414 // window. | 414 // window. |
415 if (WmShell::Get()->GetSessionStateDelegate()->IsUserSessionBlocked() && | 415 if (WmShell::Get()->GetSessionStateDelegate()->IsUserSessionBlocked() && |
416 keyboard_is_about_to_hide) { | 416 keyboard_is_about_to_hide) { |
417 WmWindow* window = WmLookup::Get()->GetWindowForWidget(shelf_widget_); | 417 WmWindow* window = WmLookup::Get()->GetWindowForWidget(shelf_widget_); |
418 WmShell::Get()->SetDisplayWorkAreaInsets(window, gfx::Insets()); | 418 WmShell::Get()->SetDisplayWorkAreaInsets(window, gfx::Insets()); |
419 } | 419 } |
420 } | 420 } |
421 | 421 |
| 422 void ShelfLayoutManager::OnKeyboardHidden() {} |
| 423 |
422 bool ShelfLayoutManager::IsHorizontalAlignment() const { | 424 bool ShelfLayoutManager::IsHorizontalAlignment() const { |
423 return ::ash::IsHorizontalAlignment(GetAlignment()); | 425 return ::ash::IsHorizontalAlignment(GetAlignment()); |
424 } | 426 } |
425 | 427 |
426 ShelfBackgroundType ShelfLayoutManager::GetShelfBackgroundType() const { | 428 ShelfBackgroundType ShelfLayoutManager::GetShelfBackgroundType() const { |
427 if (state_.visibility_state != SHELF_AUTO_HIDE && | 429 if (state_.visibility_state != SHELF_AUTO_HIDE && |
428 state_.window_state == wm::WORKSPACE_WINDOW_STATE_MAXIMIZED) { | 430 state_.window_state == wm::WORKSPACE_WINDOW_STATE_MAXIMIZED) { |
429 return SHELF_BACKGROUND_MAXIMIZED; | 431 return SHELF_BACKGROUND_MAXIMIZED; |
430 } | 432 } |
431 | 433 |
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 gesture_drag_status_ = GESTURE_DRAG_NONE; | 1140 gesture_drag_status_ = GESTURE_DRAG_NONE; |
1139 } | 1141 } |
1140 | 1142 |
1141 int ShelfLayoutManager::GetShelfInsetsForAutoHide() const { | 1143 int ShelfLayoutManager::GetShelfInsetsForAutoHide() const { |
1142 if (invisible_auto_hide_shelf_) | 1144 if (invisible_auto_hide_shelf_) |
1143 return 0; | 1145 return 0; |
1144 return GetShelfConstant(SHELF_INSETS_FOR_AUTO_HIDE); | 1146 return GetShelfConstant(SHELF_INSETS_FOR_AUTO_HIDE); |
1145 } | 1147 } |
1146 | 1148 |
1147 } // namespace ash | 1149 } // namespace ash |
OLD | NEW |