| 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..3d0cdcb84a5b98af3afe24dc23e184f7dfe73eb8 100644
|
| --- a/athena/wm/split_view_controller.cc
|
| +++ b/athena/wm/split_view_controller.cc
|
| @@ -67,6 +67,41 @@ 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;
|
| + UpdateLayout(true);
|
| +}
|
| +
|
| void SplitViewController::UpdateLayout(bool animate) {
|
| if (!left_window_)
|
| return;
|
|
|