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) { ...@@ -73,7 +73,7 @@ void WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) {
click_component_ = HTNOWHERE; click_component_ = HTNOWHERE;
} }
HandleVerticalResizeDoubleClick(target_state, event); HandleResizeDoubleClick(target_state, event);
break; break;
} }
default: default:
...@@ -109,9 +109,8 @@ void WorkspaceEventHandler::OnGestureEvent(ui::GestureEvent* event) { ...@@ -109,9 +109,8 @@ void WorkspaceEventHandler::OnGestureEvent(ui::GestureEvent* event) {
click_component_ = HTNOWHERE; click_component_ = HTNOWHERE;
} }
void WorkspaceEventHandler::HandleVerticalResizeDoubleClick( void WorkspaceEventHandler::HandleResizeDoubleClick(WindowState* target_state,
WindowState* target_state, ui::MouseEvent* event) {
ui::MouseEvent* event) {
aura::Window* target = target_state->window(); aura::Window* target = target_state->window();
if ((event->flags() & ui::EF_IS_DOUBLE_CLICK) != 0 && target->delegate()) { if ((event->flags() & ui::EF_IS_DOUBLE_CLICK) != 0 && target->delegate()) {
const int component = const int component =
......
...@@ -38,12 +38,13 @@ class ASH_EXPORT WorkspaceEventHandler : public ui::EventHandler { ...@@ -38,12 +38,13 @@ class ASH_EXPORT WorkspaceEventHandler : public ui::EventHandler {
private: private:
friend class WorkspaceEventHandlerTestHelper; friend class WorkspaceEventHandlerTestHelper;
// Determines if |event| corresponds to a double click on either the top or // Determines if |event| corresponds to a double click on a resize edge, and
// bottom vertical resize edge, and if so toggles the vertical height of the // if so toggles the width/height of the window (width when the left or right
// window between its restored state and the full available height of the // edge is double clicked, height when the top or bottom edge is double
// workspace. // clicked) between its restored state and the full available width/height of
void HandleVerticalResizeDoubleClick(WindowState* window_state, // the workspace.
ui::MouseEvent* event); void HandleResizeDoubleClick(WindowState* window_state,
ui::MouseEvent* event);
aura::Window* workspace_window_; 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