Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2963)

Unified Diff: ash/wm/overview/window_selector_controller.cc

Issue 2978273002: Revert of Cros Tablet Window management - Split Screen part II (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/overview/window_selector_controller.h ('k') | ash/wm/overview/window_selector_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ash/wm/overview/window_selector_controller.h ('k') | ash/wm/overview/window_selector_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698