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

Unified Diff: athena/wm/split_view_controller.cc

Issue 459613008: athena: Allow getting into split-view mode from overview-mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge Created 6 years, 4 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/window_manager_impl.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 595a61ae8e0870903d53effa6929c81a828f96bc..cde465798a80420057ab96ae344b69ef951a8cad 100644
--- a/athena/wm/split_view_controller.cc
+++ b/athena/wm/split_view_controller.cc
@@ -67,6 +67,43 @@ bool SplitViewController::IsSplitViewModeActive() const {
return state_ == ACTIVE;
}
+void SplitViewController::ActivateSplitMode(aura::Window* left,
+ aura::Window* right) {
+ aura::Window::Windows windows = window_list_provider_->GetWindowList();
+ aura::Window::Windows::reverse_iterator iter = windows.rbegin();
+ if (state_ == ACTIVE) {
+ if (!left)
+ left = left_window_;
+ if (!right)
+ right = right_window_;
+ }
+
+ if (!left && iter != windows.rend()) {
+ left = *iter;
+ iter++;
+ if (left == right && iter != windows.rend()) {
+ left = *iter;
+ iter++;
+ }
+ }
+
+ if (!right && iter != windows.rend()) {
+ right = *iter;
+ iter++;
+ if (right == left && iter != windows.rend()) {
+ right = *iter;
+ iter++;
+ }
+ }
+
+ state_ = ACTIVE;
+ left_window_ = left;
+ right_window_ = right;
+ container_->StackChildAtTop(right_window_);
+ container_->StackChildAtTop(left_window_);
+ UpdateLayout(true);
+}
+
void SplitViewController::UpdateLayout(bool animate) {
if (!left_window_)
return;
« no previous file with comments | « athena/wm/split_view_controller.h ('k') | athena/wm/window_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698