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

Side by Side Diff: ui/views/corewm/focus_controller.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
« no previous file with comments | « ui/views/corewm/focus_controller.h ('k') | ui/views/view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/corewm/focus_controller.h" 5 #include "ui/views/corewm/focus_controller.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "ui/aura/client/aura_constants.h" 8 #include "ui/aura/client/aura_constants.h"
9 #include "ui/aura/env.h" 9 #include "ui/aura/env.h"
10 #include "ui/views/corewm/focus_change_event.h" 10 #include "ui/views/corewm/focus_change_event.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 161
162 ui::EventResult FocusController::OnScrollEvent(ui::ScrollEvent* event) { 162 ui::EventResult FocusController::OnScrollEvent(ui::ScrollEvent* event) {
163 return ui::ER_UNHANDLED; 163 return ui::ER_UNHANDLED;
164 } 164 }
165 165
166 ui::EventResult FocusController::OnTouchEvent(ui::TouchEvent* event) { 166 ui::EventResult FocusController::OnTouchEvent(ui::TouchEvent* event) {
167 return ui::ER_UNHANDLED; 167 return ui::ER_UNHANDLED;
168 } 168 }
169 169
170 ui::EventResult FocusController::OnGestureEvent(ui::GestureEvent* event) { 170 void FocusController::OnGestureEvent(ui::GestureEvent* event) {
171 if (event->type() == ui::ET_GESTURE_BEGIN && 171 if (event->type() == ui::ET_GESTURE_BEGIN &&
172 event->details().touch_points() == 1) { 172 event->details().touch_points() == 1) {
173 WindowFocusedFromInputEvent(static_cast<aura::Window*>(event->target())); 173 WindowFocusedFromInputEvent(static_cast<aura::Window*>(event->target()));
174 } 174 }
175 return ui::ER_UNHANDLED;
176 } 175 }
177 176
178 //////////////////////////////////////////////////////////////////////////////// 177 ////////////////////////////////////////////////////////////////////////////////
179 // FocusController, aura::WindowObserver implementation: 178 // FocusController, aura::WindowObserver implementation:
180 179
181 void FocusController::OnWindowVisibilityChanging(aura::Window* window, 180 void FocusController::OnWindowVisibilityChanging(aura::Window* window,
182 bool visible) { 181 bool visible) {
183 // We need to process this change in VisibilityChanging while the window is 182 // We need to process this change in VisibilityChanging while the window is
184 // still visible, since focus events cannot be dispatched to invisible 183 // still visible, since focus events cannot be dispatched to invisible
185 // windows. 184 // windows.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 SetFocusedWindow(rules_->GetNextFocusableWindow(window)); 260 SetFocusedWindow(rules_->GetNextFocusableWindow(window));
262 } 261 }
263 } 262 }
264 263
265 void FocusController::WindowFocusedFromInputEvent(aura::Window* window) { 264 void FocusController::WindowFocusedFromInputEvent(aura::Window* window) {
266 FocusWindow(window, NULL); 265 FocusWindow(window, NULL);
267 } 266 }
268 267
269 } // namespace corewm 268 } // namespace corewm
270 } // namespace views 269 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/corewm/focus_controller.h ('k') | ui/views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698