| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/wm/overview/window_grid.h" | 5 #include "ash/wm/overview/window_grid.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/screen_util.h" | 8 #include "ash/screen_util.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 CHECK(!window_list_.empty()); | 179 CHECK(!window_list_.empty()); |
| 180 | 180 |
| 181 gfx::Size window_size; | 181 gfx::Size window_size; |
| 182 gfx::Rect total_bounds = ScreenUtil::ConvertRectToScreen( | 182 gfx::Rect total_bounds = ScreenUtil::ConvertRectToScreen( |
| 183 root_window_, | 183 root_window_, |
| 184 ScreenUtil::GetDisplayWorkAreaBoundsInParent( | 184 ScreenUtil::GetDisplayWorkAreaBoundsInParent( |
| 185 Shell::GetContainer(root_window_, kShellWindowId_DefaultContainer))); | 185 Shell::GetContainer(root_window_, kShellWindowId_DefaultContainer))); |
| 186 | 186 |
| 187 // If the text filtering feature is enabled, reserve space at the top for the | 187 // If the text filtering feature is enabled, reserve space at the top for the |
| 188 // text filtering textbox to appear. | 188 // text filtering textbox to appear. |
| 189 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 189 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 190 switches::kAshDisableTextFilteringInOverviewMode)) { | 190 switches::kAshDisableTextFilteringInOverviewMode)) { |
| 191 total_bounds.Inset( | 191 total_bounds.Inset( |
| 192 0, | 192 0, |
| 193 WindowSelector::kTextFilterBottomEdge + kTextFilterBottomMargin, | 193 WindowSelector::kTextFilterBottomEdge + kTextFilterBottomMargin, |
| 194 0, | 194 0, |
| 195 0); | 195 0); |
| 196 } | 196 } |
| 197 | 197 |
| 198 // Find the minimum number of windows per row that will fit all of the | 198 // Find the minimum number of windows per row that will fit all of the |
| 199 // windows on screen. | 199 // windows on screen. |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 471 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
| 472 selection_widget_->SetBounds(SelectedWindow()->target_bounds()); | 472 selection_widget_->SetBounds(SelectedWindow()->target_bounds()); |
| 473 selection_widget_->SetOpacity(kWindowOverviewSelectorOpacity); | 473 selection_widget_->SetOpacity(kWindowOverviewSelectorOpacity); |
| 474 return; | 474 return; |
| 475 } | 475 } |
| 476 selection_widget_->SetBounds(SelectedWindow()->target_bounds()); | 476 selection_widget_->SetBounds(SelectedWindow()->target_bounds()); |
| 477 selection_widget_->SetOpacity(kWindowOverviewSelectorOpacity); | 477 selection_widget_->SetOpacity(kWindowOverviewSelectorOpacity); |
| 478 } | 478 } |
| 479 | 479 |
| 480 } // namespace ash | 480 } // namespace ash |
| OLD | NEW |