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

Unified Diff: athena/wm/window_overview_mode.cc

Issue 546123002: Ensure that an activity is activated when overview mode is exited (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« athena/wm/window_manager_impl.cc ('K') | « athena/wm/window_overview_mode.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/wm/window_overview_mode.cc
diff --git a/athena/wm/window_overview_mode.cc b/athena/wm/window_overview_mode.cc
index 7b3c73e0fc77156a093cf49fe34945a4f3cc8441..b9a58fe6b74e21c3a508ab528a69b936b8934377 100644
--- a/athena/wm/window_overview_mode.cc
+++ b/athena/wm/window_overview_mode.cc
@@ -93,7 +93,6 @@ void RestoreWindowState(aura::Window* window,
settings.AddObserver(new ui::ClosureAnimationObserver(
base::Bind(&HideWindowIfNotVisible, window, split_view_controller)));
-
window->SetTransform(gfx::Transform());
// Reset the window opacity in case the user is dragging a window.
@@ -571,7 +570,9 @@ class WindowOverviewModeImpl : public WindowOverviewMode,
OverviewToolbar::ActionType action = overview_toolbar_->current_action();
overview_toolbar_.reset();
if (action == OverviewToolbar::ACTION_TYPE_SPLIT) {
- delegate_->OnSplitViewMode(NULL, dragged_window_);
+ delegate_->OnSelectSplitViewWindow(NULL,
+ dragged_window_,
+ dragged_window_);
return;
}
@@ -585,7 +586,7 @@ class WindowOverviewModeImpl : public WindowOverviewMode,
left = dragged_window_;
else
right = dragged_window_;
- delegate_->OnSplitViewMode(left, right);
+ delegate_->OnSelectSplitViewWindow(left, right, dragged_window_);
return;
}
@@ -603,14 +604,26 @@ class WindowOverviewModeImpl : public WindowOverviewMode,
// current state.
if (window == split_view_controller_->left_window() ||
window == split_view_controller_->right_window()) {
- delegate_->OnSplitViewMode(split_view_controller_->left_window(),
- split_view_controller_->right_window());
+ delegate_->OnSelectSplitViewWindow(
+ split_view_controller_->left_window(),
+ split_view_controller_->right_window(),
+ window);
} else {
delegate_->OnSelectWindow(window);
}
}
}
+ // WindowOverviewMode:
+ virtual void SelectDefaultWindow() OVERRIDE {
+ aura::Window::Windows windows = window_list_provider_->GetWindowList();
+ if (windows.empty())
+ return;
+
+ // TODO(pkotwicz): Do not select a window which is about to be deleted.
+ SelectWindow(windows.back());
+ }
+
// ui::EventHandler:
virtual void OnMouseEvent(ui::MouseEvent* mouse) OVERRIDE {
if (mouse->type() == ui::ET_MOUSE_PRESSED) {
« athena/wm/window_manager_impl.cc ('K') | « athena/wm/window_overview_mode.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698