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

Side by Side Diff: ash/wm/workspace/workspace_event_handler.cc

Issue 11280290: events: Change gesture-event handler in EventHandler to not return any values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/workspace/workspace_event_handler.h" 5 #include "ash/wm/workspace/workspace_event_handler.h"
6 6
7 #include "ash/screen_ash.h" 7 #include "ash/screen_ash.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/wm/property_util.h" 9 #include "ash/wm/property_util.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 multi_window_resize_controller_.Hide(); 99 multi_window_resize_controller_.Hide();
100 HandleVerticalResizeDoubleClick(target, event); 100 HandleVerticalResizeDoubleClick(target, event);
101 break; 101 break;
102 } 102 }
103 default: 103 default:
104 break; 104 break;
105 } 105 }
106 return ToplevelWindowEventHandler::OnMouseEvent(event); 106 return ToplevelWindowEventHandler::OnMouseEvent(event);
107 } 107 }
108 108
109 ui::EventResult WorkspaceEventHandler::OnGestureEvent(ui::GestureEvent* event) { 109 void WorkspaceEventHandler::OnGestureEvent(ui::GestureEvent* event) {
110 aura::Window* target = static_cast<aura::Window*>(event->target()); 110 aura::Window* target = static_cast<aura::Window*>(event->target());
111 if (event->type() == ui::ET_GESTURE_DOUBLE_TAP && 111 if (event->type() == ui::ET_GESTURE_DOUBLE_TAP &&
112 target->delegate()->GetNonClientComponent(event->location()) == 112 target->delegate()->GetNonClientComponent(event->location()) ==
113 HTCAPTION) { 113 HTCAPTION) {
114 ToggleMaximizedState(target); // |this| may be destroyed from here. 114 ToggleMaximizedState(target); // |this| may be destroyed from here.
115 return ui::ER_CONSUMED; 115 event->StopPropagation();
116 return;
116 } 117 }
117 return ToplevelWindowEventHandler::OnGestureEvent(event); 118 ToplevelWindowEventHandler::OnGestureEvent(event);
118 } 119 }
119 120
120 void WorkspaceEventHandler::HandleVerticalResizeDoubleClick( 121 void WorkspaceEventHandler::HandleVerticalResizeDoubleClick(
121 aura::Window* target, 122 aura::Window* target,
122 ui::MouseEvent* event) { 123 ui::MouseEvent* event) {
123 gfx::Rect max_size(target->delegate()->GetMaximumSize()); 124 gfx::Rect max_size(target->delegate()->GetMaximumSize());
124 if (event->flags() & ui::EF_IS_DOUBLE_CLICK && 125 if (event->flags() & ui::EF_IS_DOUBLE_CLICK &&
125 !wm::IsWindowMaximized(target)) { 126 !wm::IsWindowMaximized(target)) {
126 int component = 127 int component =
127 target->delegate()->GetNonClientComponent(event->location()); 128 target->delegate()->GetNonClientComponent(event->location());
(...skipping 30 matching lines...) Expand all
158 target->bounds().y(), 159 target->bounds().y(),
159 work_area.width(), 160 work_area.width(),
160 target->bounds().height())); 161 target->bounds().height()));
161 } 162 }
162 } 163 }
163 } 164 }
164 } 165 }
165 166
166 } // namespace internal 167 } // namespace internal
167 } // namespace ash 168 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_event_handler.h ('k') | chrome/browser/ui/views/browser_action_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698