| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/wm/overview/window_selector.h" | 5 #include "ash/common/wm/overview/window_selector.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 private: | 161 private: |
| 162 int corner_radius_; | 162 int corner_radius_; |
| 163 SkColor background_; | 163 SkColor background_; |
| 164 | 164 |
| 165 DISALLOW_COPY_AND_ASSIGN(RoundedContainerView); | 165 DISALLOW_COPY_AND_ASSIGN(RoundedContainerView); |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 // Triggers a shelf visibility update on all root window controllers. | 168 // Triggers a shelf visibility update on all root window controllers. |
| 169 void UpdateShelfVisibility() { | 169 void UpdateShelfVisibility() { |
| 170 for (WmWindow* root : WmShell::Get()->GetAllRootWindows()) | 170 for (WmWindow* root : WmShell::Get()->GetAllRootWindows()) |
| 171 root->GetRootWindowController()->GetShelf()->UpdateVisibilityState(); | 171 WmShelf::ForWindow(root)->UpdateVisibilityState(); |
| 172 } | 172 } |
| 173 | 173 |
| 174 gfx::Rect GetTextFilterPosition(WmWindow* root_window) { | 174 gfx::Rect GetTextFilterPosition(WmWindow* root_window) { |
| 175 if (ash::MaterialDesignController::IsOverviewMaterial()) { | 175 if (ash::MaterialDesignController::IsOverviewMaterial()) { |
| 176 gfx::Rect total_bounds = | 176 gfx::Rect total_bounds = |
| 177 root_window->ConvertRectToScreen(wm::GetDisplayWorkAreaBoundsInParent( | 177 root_window->ConvertRectToScreen(wm::GetDisplayWorkAreaBoundsInParent( |
| 178 root_window->GetChildByShellWindowId( | 178 root_window->GetChildByShellWindowId( |
| 179 kShellWindowId_DefaultContainer))); | 179 kShellWindowId_DefaultContainer))); |
| 180 return gfx::Rect(0.5 * (total_bounds.width() - | 180 return gfx::Rect(0.5 * (total_bounds.width() - |
| 181 std::min(kTextFilterWidthMD, total_bounds.width())), | 181 std::min(kTextFilterWidthMD, total_bounds.width())), |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 for (size_t i = 0; i <= grid_list_.size() && | 719 for (size_t i = 0; i <= grid_list_.size() && |
| 720 grid_list_[selected_grid_index_]->Move(direction, animate); | 720 grid_list_[selected_grid_index_]->Move(direction, animate); |
| 721 i++) { | 721 i++) { |
| 722 selected_grid_index_ = | 722 selected_grid_index_ = |
| 723 (selected_grid_index_ + display_direction + grid_list_.size()) % | 723 (selected_grid_index_ + display_direction + grid_list_.size()) % |
| 724 grid_list_.size(); | 724 grid_list_.size(); |
| 725 } | 725 } |
| 726 } | 726 } |
| 727 | 727 |
| 728 } // namespace ash | 728 } // namespace ash |
| OLD | NEW |