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

Unified Diff: athena/wm/split_view_controller.cc

Issue 468763002: athena: Fix switching windows with title-drag in split-view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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/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 088de30eebaa2360d82fd21481a4ea6e347ee69e..232908994061e8095463a1847ce018e492d8c5b4 100644
--- a/athena/wm/split_view_controller.cc
+++ b/athena/wm/split_view_controller.cc
@@ -85,6 +85,28 @@ 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_);
+#if !defined(NDEBUG)
+ aura::Window::Windows windows = window_list_provider_->GetWindowList();
+ DCHECK(std::find(windows.begin(), windows.end(), replace_with) !=
+ windows.end());
+#endif
+
+ replace_with->SetBounds(window->bounds());
+ replace_with->SetTransform(gfx::Transform());
+ if (window == left_window_)
+ left_window_ = replace_with;
+ else
+ right_window_ = replace_with;
+ wm::ActivateWindow(replace_with);
+ window->SetTransform(gfx::Transform());
+}
+
void SplitViewController::DeactivateSplitMode() {
CHECK_NE(SCROLLING, state_);
state_ = INACTIVE;
« 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