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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_activation_client.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 "ui/views/widget/desktop_aura/desktop_activation_client.h" 5 #include "ui/views/widget/desktop_aura/desktop_activation_client.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "ui/aura/client/activation_delegate.h" 9 #include "ui/aura/client/activation_delegate.h"
10 #include "ui/aura/client/activation_change_observer.h" 10 #include "ui/aura/client/activation_change_observer.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 157 }
158 158
159 ui::EventResult DesktopActivationClient::OnScrollEvent(ui::ScrollEvent* event) { 159 ui::EventResult DesktopActivationClient::OnScrollEvent(ui::ScrollEvent* event) {
160 return ui::ER_UNHANDLED; 160 return ui::ER_UNHANDLED;
161 } 161 }
162 162
163 ui::EventResult DesktopActivationClient::OnTouchEvent(ui::TouchEvent* event) { 163 ui::EventResult DesktopActivationClient::OnTouchEvent(ui::TouchEvent* event) {
164 return ui::ER_UNHANDLED; 164 return ui::ER_UNHANDLED;
165 } 165 }
166 166
167 ui::EventResult DesktopActivationClient::OnGestureEvent( 167 void DesktopActivationClient::OnGestureEvent(ui::GestureEvent* event) {
168 ui::GestureEvent* event) {
169 if (event->type() == ui::ET_GESTURE_BEGIN && 168 if (event->type() == ui::ET_GESTURE_BEGIN &&
170 event->details().touch_points() == 1) { 169 event->details().touch_points() == 1) {
171 FocusWindowWithEvent(event); 170 FocusWindowWithEvent(event);
172 } 171 }
173 return ui::ER_UNHANDLED;
174 } 172 }
175 173
176 void DesktopActivationClient::FocusWindowWithEvent(const ui::Event* event) { 174 void DesktopActivationClient::FocusWindowWithEvent(const ui::Event* event) {
177 aura::Window* window = static_cast<aura::Window*>(event->target()); 175 aura::Window* window = static_cast<aura::Window*>(event->target());
178 if (GetActiveWindow() != window) { 176 if (GetActiveWindow() != window) {
179 aura::client::GetFocusClient(window)->FocusWindow( 177 aura::client::GetFocusClient(window)->FocusWindow(
180 FindFocusableWindowFor(window), event); 178 FindFocusableWindowFor(window), event);
181 } 179 }
182 } 180 }
183 181
184 } // namespace views 182 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_activation_client.h ('k') | ui/views/widget/desktop_aura/desktop_native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698