| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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())), |
| 182 total_bounds.height() * kTextFilterTopScreenProportion, | 182 total_bounds.y() + |
| 183 total_bounds.height() * kTextFilterTopScreenProportion, |
| 183 std::min(kTextFilterWidthMD, total_bounds.width()), | 184 std::min(kTextFilterWidthMD, total_bounds.width()), |
| 184 kTextFilterHeightMD); | 185 kTextFilterHeightMD); |
| 185 } | 186 } |
| 186 return gfx::Rect( | 187 return gfx::Rect( |
| 187 0.5 * root_window->GetBounds().width() * | 188 0.5 * root_window->GetBounds().width() * |
| 188 (1 - kTextFilterScreenProportion), | 189 (1 - kTextFilterScreenProportion), |
| 189 kTextFilterDistanceFromTop, | 190 kTextFilterDistanceFromTop, |
| 190 root_window->GetBounds().width() * kTextFilterScreenProportion, | 191 root_window->GetBounds().width() * kTextFilterScreenProportion, |
| 191 kTextFilterHeight); | 192 kTextFilterHeight); |
| 192 } | 193 } |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 for (size_t i = 0; i <= grid_list_.size() && | 709 for (size_t i = 0; i <= grid_list_.size() && |
| 709 grid_list_[selected_grid_index_]->Move(direction, animate); | 710 grid_list_[selected_grid_index_]->Move(direction, animate); |
| 710 i++) { | 711 i++) { |
| 711 selected_grid_index_ = | 712 selected_grid_index_ = |
| 712 (selected_grid_index_ + display_direction + grid_list_.size()) % | 713 (selected_grid_index_ + display_direction + grid_list_.size()) % |
| 713 grid_list_.size(); | 714 grid_list_.size(); |
| 714 } | 715 } |
| 715 } | 716 } |
| 716 | 717 |
| 717 } // namespace ash | 718 } // namespace ash |
| OLD | NEW |