Commit 03018770 authored by Xiaoqian Dai's avatar Xiaoqian Dai Committed by Commit Bot

Cros splitscreen: Rename FinishWindowDrag() to FinishWindowResizing().

"Drag" is for dragging window on the title area.
"Resize" is for resizing snapped windows by dragging the divider bar in
splitscreen.

Bug: None
Change-Id: I8b768cf0286615c1ca0e925eee0295def2bf7ffe
Reviewed-on: https://chromium-review.googlesource.com/1091928Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Commit-Queue: Xiaoqian Dai <xdai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567421}
parent daccddc2
......@@ -584,8 +584,8 @@ void SplitViewController::EndResize(const gfx::Point& location_in_screen) {
// smoother resizing visual result.
UpdateSnappedWindowsAndDividerBounds();
FinishWindowDrag(left_window_);
FinishWindowDrag(right_window_);
FinishWindowResizing(left_window_);
FinishWindowResizing(right_window_);
// Need to update snapped windows bounds even if the split view mode may have
// to exit. Otherwise it's possible for a snapped window stuck in the edge of
......@@ -627,8 +627,8 @@ void SplitViewController::EndSplitView() {
// the resize. This can happen, for example, on the transition back to
// clamshell mode or when a task is minimized during a resize.
if (is_resizing_) {
FinishWindowDrag(left_window_);
FinishWindowDrag(right_window_);
FinishWindowResizing(left_window_);
FinishWindowResizing(right_window_);
}
// Remove observers when the split view mode ends.
......@@ -1175,7 +1175,7 @@ void SplitViewController::OnSnappedWindowDetached(aura::Window* window) {
// If the window is minimized or destroyed before the resize ends, if/when
// EndResize() is eventually called, it will have no way of knowing that
// it should finish the drag for the destroyed window. So, do it here.
FinishWindowDrag(window);
FinishWindowResizing(window);
}
if (!left_window_ && !right_window_) {
......@@ -1490,7 +1490,7 @@ void SplitViewController::EndOverview() {
Shell::Get()->window_selector_controller()->ToggleOverview();
}
void SplitViewController::FinishWindowDrag(aura::Window* window) {
void SplitViewController::FinishWindowResizing(aura::Window* window) {
if (window != nullptr) {
wm::WindowState* window_state = wm::GetWindowState(window);
window_state->OnCompleteDrag(
......
......@@ -327,8 +327,9 @@ class ASH_EXPORT SplitViewController : public mojom::SplitViewController,
void StartOverview();
void EndOverview();
// Finalizes and cleans up after a drag or resize is finished for a window.
void FinishWindowDrag(aura::Window* window);
// Finalizes and cleans up after stopping dragging the divider bar to resize
// snapped windows.
void FinishWindowResizing(aura::Window* window);
// Bindings for the SplitViewController interface.
mojo::BindingSet<mojom::SplitViewController> bindings_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment