Chromium Code Reviews| Index: athena/wm/split_view_controller.cc |
| diff --git a/athena/wm/split_view_controller.cc b/athena/wm/split_view_controller.cc |
| index 3d0cdcb84a5b98af3afe24dc23e184f7dfe73eb8..078156e2c17155fba8b6b9ada6c1317f545f494c 100644 |
| --- a/athena/wm/split_view_controller.cc |
| +++ b/athena/wm/split_view_controller.cc |
| @@ -102,6 +102,24 @@ void SplitViewController::ActivateSplitMode(aura::Window* left, |
| UpdateLayout(true); |
| } |
| +void SplitViewController::ReplaceWindow(aura::Window* window, |
| + aura::Window* replace_with) { |
| + CHECK(IsSplitViewModeActive()); |
| + CHECK(replace_with); |
| + CHECK(window == left_window_ || window == right_window_); |
| + CHECK(replace_with != left_window_ && replace_with != right_window_); |
| + CHECK_EQ(container_, window->parent()); |
|
mfomitchev
2014/08/14 14:38:13
might make more sense to check that windows belong
sadrul
2014/08/15 19:00:19
Done.
|
| + CHECK_EQ(container_, replace_with->parent()); |
| + |
| + replace_with->SetBounds(window->bounds()); |
| + replace_with->SetTransform(gfx::Transform()); |
|
mfomitchev
2014/08/14 14:38:13
Any reason we wouldn't want to reset the bounds on
sadrul
2014/08/15 19:00:20
I added the change to reset the transform on |wind
mfomitchev
2014/08/15 19:15:03
Acknowledged.
|
| + if (window == left_window_) |
| + left_window_ = replace_with; |
| + else |
| + right_window_ = replace_with; |
| + container_->StackChildAbove(replace_with, window); |
|
mfomitchev
2014/08/14 14:38:13
I think we should use window_list_provider_->MoveT
sadrul
2014/08/15 19:00:20
Done (calling wm::ActivateWindow()).
|
| +} |
| + |
| void SplitViewController::UpdateLayout(bool animate) { |
| if (!left_window_) |
| return; |