Commit a933f264 authored by Avery Musbach's avatar Avery Musbach Committed by Commit Bot

workspace: Rename a function and update its header comment

WorkspaceEventHandler::HandleVerticalResizeDoubleClick actually handles
both horizontal resize double clicking and vertical resize double
clicking. The name and header comment both say it is only for vertical.

Bug: None
Change-Id: I756a951ae86e0f3cf094fd889a1973c85fe63442
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1950854Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Commit-Queue: Avery Musbach <amusbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721527}
parent 48e3fcee
......@@ -73,7 +73,7 @@ void WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) {
click_component_ = HTNOWHERE;
}
HandleVerticalResizeDoubleClick(target_state, event);
HandleResizeDoubleClick(target_state, event);
break;
}
default:
......@@ -109,9 +109,8 @@ void WorkspaceEventHandler::OnGestureEvent(ui::GestureEvent* event) {
click_component_ = HTNOWHERE;
}
void WorkspaceEventHandler::HandleVerticalResizeDoubleClick(
WindowState* target_state,
ui::MouseEvent* event) {
void WorkspaceEventHandler::HandleResizeDoubleClick(WindowState* target_state,
ui::MouseEvent* event) {
aura::Window* target = target_state->window();
if ((event->flags() & ui::EF_IS_DOUBLE_CLICK) != 0 && target->delegate()) {
const int component =
......
......@@ -38,12 +38,13 @@ class ASH_EXPORT WorkspaceEventHandler : public ui::EventHandler {
private:
friend class WorkspaceEventHandlerTestHelper;
// Determines if |event| corresponds to a double click on either the top or
// bottom vertical resize edge, and if so toggles the vertical height of the
// window between its restored state and the full available height of the
// workspace.
void HandleVerticalResizeDoubleClick(WindowState* window_state,
ui::MouseEvent* event);
// Determines if |event| corresponds to a double click on a resize edge, and
// if so toggles the width/height of the window (width when the left or right
// edge is double clicked, height when the top or bottom edge is double
// clicked) between its restored state and the full available width/height of
// the workspace.
void HandleResizeDoubleClick(WindowState* window_state,
ui::MouseEvent* event);
aura::Window* workspace_window_;
......
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