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

Unified Diff: trunk/src/athena/wm/window_manager_impl.cc

Issue 414133002: Revert 285393 "Exit overview mode when a new activity is opened ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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 | « trunk/src/athena/home/home_card_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/athena/wm/window_manager_impl.cc
===================================================================
--- trunk/src/athena/wm/window_manager_impl.cc (revision 285397)
+++ trunk/src/athena/wm/window_manager_impl.cc (working copy)
@@ -39,9 +39,6 @@
COMMAND_TOGGLE_OVERVIEW,
};
- // Sets whether overview mode is active.
- void SetInOverview(bool active);
-
void InstallAccelerators();
// WindowManager:
@@ -115,7 +112,6 @@
void WindowManagerImpl::Layout() {
if (!container_)
return;
- SetInOverview(false);
gfx::Rect bounds = gfx::Rect(container_->bounds().size());
const aura::Window::Windows& children = container_->children();
for (aura::Window::Windows::const_iterator iter = children.begin();
@@ -128,22 +124,14 @@
}
void WindowManagerImpl::ToggleOverview() {
- SetInOverview(overview_.get() == NULL);
-}
-
-void WindowManagerImpl::SetInOverview(bool active) {
- bool in_overview = !!overview_;
- if (active == in_overview)
- return;
-
- if (active) {
- overview_ = WindowOverviewMode::Create(container_.get(), this);
- FOR_EACH_OBSERVER(WindowManagerObserver, observers_,
- OnOverviewModeEnter());
- } else {
+ if (overview_) {
overview_.reset();
FOR_EACH_OBSERVER(WindowManagerObserver, observers_,
OnOverviewModeExit());
+ } else {
+ overview_ = WindowOverviewMode::Create(container_.get(), this);
+ FOR_EACH_OBSERVER(WindowManagerObserver, observers_,
+ OnOverviewModeEnter());
}
}
@@ -168,7 +156,9 @@
CHECK_EQ(container_.get(), window->parent());
container_->StackChildAtTop(window);
wm::ActivateWindow(window);
- SetInOverview(false);
+ overview_.reset();
+ FOR_EACH_OBSERVER(WindowManagerObserver, observers_,
+ OnOverviewModeExit());
}
void WindowManagerImpl::OnWindowDestroying(aura::Window* window) {
« no previous file with comments | « trunk/src/athena/home/home_card_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698