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

Unified Diff: athena/wm/split_view_controller.cc

Issue 573803003: [Athena] Hide the windows which used to be in split view in ActivateSplitMode() (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
« no previous file with comments | « athena/wm/split_view_controller.h ('k') | athena/wm/split_view_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/wm/split_view_controller.cc
diff --git a/athena/wm/split_view_controller.cc b/athena/wm/split_view_controller.cc
index 1d61ba7d957e77f938fea6d216563401875f2e1b..82167232d8ce7b19707e3da1de73d35263db510e 100644
--- a/athena/wm/split_view_controller.cc
+++ b/athena/wm/split_view_controller.cc
@@ -65,14 +65,9 @@ void SplitViewController::ActivateSplitMode(aura::Window* left,
aura::Window::Windows windows = window_list_provider_->GetWindowList();
aura::Window::Windows::reverse_iterator iter = windows.rbegin();
if (state_ == ACTIVE) {
- if (left_window_ == right)
- left_window_ = left;
- if (right_window_ == left)
- right_window_ = right;
-
- if (!left)
+ if (!left && left_window_ != right)
left = left_window_;
- if (!right)
+ if (!right && right_window_ != left)
right = right_window_;
}
@@ -94,6 +89,12 @@ void SplitViewController::ActivateSplitMode(aura::Window* left,
}
}
+ to_hide_.clear();
+ if (left_window_ && left_window_ != left && left_window_ != right)
+ to_hide_.push_back(left_window_);
+ if (right_window_ && right_window_ != left && right_window_ != right)
+ to_hide_.push_back(right_window_);
+
SetState(ACTIVE);
right_window_ = right;
left_window_ = left;
@@ -229,6 +230,10 @@ void SplitViewController::OnAnimationCompleted() {
return;
UpdateLayout(false);
+ for (size_t i = 0; i < to_hide_.size(); ++i)
+ to_hide_[i]->Hide();
+ to_hide_.clear();
+
if (state_ == INACTIVE) {
left_window_ = NULL;
right_window_ = NULL;
« no previous file with comments | « athena/wm/split_view_controller.h ('k') | athena/wm/split_view_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698