Index: ash/wm/overview/window_selector_controller.cc |
diff --git a/ash/wm/overview/window_selector_controller.cc b/ash/wm/overview/window_selector_controller.cc |
index e35229f195717df52aba183ea27a811560e67480..19b12afa06e2f89129af09eaab586d73ce6e2144 100644 |
--- a/ash/wm/overview/window_selector_controller.cc |
+++ b/ash/wm/overview/window_selector_controller.cc |
@@ -10,11 +10,8 @@ |
#include "ash/shell.h" |
#include "ash/shell_port.h" |
#include "ash/wm/mru_window_tracker.h" |
-#include "ash/wm/overview/window_grid.h" |
#include "ash/wm/overview/window_selector.h" |
-#include "ash/wm/overview/window_selector_item.h" |
#include "ash/wm/screen_pinning_controller.h" |
-#include "ash/wm/splitview/split_view_controller.h" |
#include "ash/wm/window_state.h" |
#include "base/metrics/histogram_macros.h" |
@@ -57,28 +54,9 @@ |
std::not1(std::ptr_fun(&WindowSelector::IsSelectable))); |
windows.resize(end - windows.begin()); |
- if (!Shell::Get()->IsSplitViewModeActive()) { |
- // Don't enter overview with no window if the split view mode is inactive. |
- if (windows.empty()) |
- return false; |
- } else { |
- // Don't enter overview with less than 1 window if the split view mode is |
- // active. |
- if (windows.size() <= 1) |
- return false; |
- |
- // Remove the default snapped window from the window list. The default |
- // snapped window occupies one side of the screen, while the other windows |
- // occupy the other side of the screen in overview mode. The default snap |
- // position is the position where the window was first snapped. See |
- // |default_snap_position_| in SplitViewController for more detail. |
- aura::Window* default_snapped_window = |
- Shell::Get()->split_view_controller()->GetDefaultSnappedWindow(); |
- auto iter = |
- std::find(windows.begin(), windows.end(), default_snapped_window); |
- DCHECK(iter != windows.end()); |
- windows.erase(iter); |
- } |
+ // Don't enter overview mode with no windows. |
+ if (windows.empty()) |
+ return false; |
Shell::Get()->NotifyOverviewModeStarting(); |
window_selector_.reset(new WindowSelector(this)); |
@@ -105,17 +83,6 @@ |
bool WindowSelectorController::IsRestoringMinimizedWindows() const { |
return window_selector_.get() != NULL && |
window_selector_->restoring_minimized_windows(); |
-} |
- |
-std::vector<aura::Window*> |
-WindowSelectorController::GetWindowsListInOverviewGridsForTesting() { |
- std::vector<aura::Window*> windows; |
- for (const std::unique_ptr<WindowGrid>& grid : |
- window_selector_->grid_list_for_testing()) { |
- for (const auto& window_selector_item : grid->window_list()) |
- windows.push_back(window_selector_item->GetWindow()); |
- } |
- return windows; |
} |
// TODO(flackr): Make WindowSelectorController observe the activation of |