Chromium Code Reviews| Index: ash/wm/overview/window_grid.cc |
| diff --git a/ash/wm/overview/window_grid.cc b/ash/wm/overview/window_grid.cc |
| index d9f136fa54e949043d6759d717953636ef7bb0fe..7b7eeb3c511f8d9c94d1306cff32c8891f676469 100644 |
| --- a/ash/wm/overview/window_grid.cc |
| +++ b/ash/wm/overview/window_grid.cc |
| @@ -4,6 +4,7 @@ |
| #include "ash/wm/overview/window_grid.h" |
| +#include "ash/ash_switches.h" |
| #include "ash/screen_util.h" |
| #include "ash/shell.h" |
| #include "ash/shell_window_ids.h" |
| @@ -13,6 +14,7 @@ |
| #include "ash/wm/overview/window_selector_panels.h" |
| #include "ash/wm/overview/window_selector_window.h" |
| #include "ash/wm/window_state.h" |
| +#include "base/command_line.h" |
| #include "base/i18n/string_search.h" |
| #include "base/memory/scoped_vector.h" |
| #include "third_party/skia/include/core/SkColor.h" |
| @@ -102,6 +104,10 @@ const int kOverviewSelectorTransitionMilliseconds = 100; |
| const SkColor kWindowOverviewSelectionColor = SK_ColorBLACK; |
| const unsigned char kWindowOverviewSelectorOpacity = 128; |
| +// The minimum amount of spacing between the bottom of the text filtering |
| +// text field and the top of the selection widget on the first row of items. |
| +const int kTextFilterSpacing = 5; |
|
flackr
2014/07/18 13:41:51
nit: How about something like kTextFilterBottomMar
tdanderson
2014/08/07 20:13:07
Done.
|
| + |
| // Returns the vector for the fade in animation. |
| gfx::Vector2d GetSlideVectorForFadeIn(WindowSelector::Direction direction, |
| const gfx::Rect& bounds) { |
| @@ -178,6 +184,17 @@ void WindowGrid::PositionWindows(bool animate) { |
| ScreenUtil::GetDisplayWorkAreaBoundsInParent( |
| Shell::GetContainer(root_window_, kShellWindowId_DefaultContainer))); |
| + // If the text filtering feature is enabled, reserve space at the top for the |
| + // text filtering textbox to appear. |
| + if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kAshDisableTextFilteringInOverviewMode)) { |
| + total_bounds.Inset( |
| + 0, |
| + window_selector_->TextFilterHeight() + kTextFilterSpacing, |
| + 0, |
| + 0); |
| + } |
| + |
| // Find the minimum number of windows per row that will fit all of the |
| // windows on screen. |
| num_columns_ = std::max( |