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

Side by Side Diff: ash/wm/activation_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 | « ash/wm/activation_controller.h ('k') | ash/wm/app_list_controller.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 "ash/wm/activation_controller.h" 5 #include "ash/wm/activation_controller.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/wm/activation_controller_delegate.h" 10 #include "ash/wm/activation_controller_delegate.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 ui::EventResult ActivationController::OnScrollEvent(ui::ScrollEvent* event) { 279 ui::EventResult ActivationController::OnScrollEvent(ui::ScrollEvent* event) {
280 return ui::ER_UNHANDLED; 280 return ui::ER_UNHANDLED;
281 } 281 }
282 282
283 ui::EventResult ActivationController::OnTouchEvent(ui::TouchEvent* event) { 283 ui::EventResult ActivationController::OnTouchEvent(ui::TouchEvent* event) {
284 if (event->type() == ui::ET_TOUCH_PRESSED) 284 if (event->type() == ui::ET_TOUCH_PRESSED)
285 FocusWindowWithEvent(event); 285 FocusWindowWithEvent(event);
286 return ui::ER_UNHANDLED; 286 return ui::ER_UNHANDLED;
287 } 287 }
288 288
289 ui::EventResult ActivationController::OnGestureEvent(ui::GestureEvent* event) { 289 void ActivationController::OnGestureEvent(ui::GestureEvent* event) {
290 if (event->type() == ui::ET_GESTURE_BEGIN && 290 if (event->type() == ui::ET_GESTURE_BEGIN &&
291 event->details().touch_points() == 1) { 291 event->details().touch_points() == 1) {
292 FocusWindowWithEvent(event); 292 FocusWindowWithEvent(event);
293 } 293 }
294 return ui::ER_UNHANDLED;
295 } 294 }
296 295
297 //////////////////////////////////////////////////////////////////////////////// 296 ////////////////////////////////////////////////////////////////////////////////
298 // ActivationController, private: 297 // ActivationController, private:
299 298
300 void ActivationController::ActivateWindowWithEvent(aura::Window* window, 299 void ActivationController::ActivateWindowWithEvent(aura::Window* window,
301 const ui::Event* event) { 300 const ui::Event* event) {
302 // Prevent recursion when called from focus. 301 // Prevent recursion when called from focus.
303 if (updating_activation_) 302 if (updating_activation_)
304 return; 303 return;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 aura::Window* window = static_cast<aura::Window*>(event->target()); 420 aura::Window* window = static_cast<aura::Window*>(event->target());
422 window = delegate_->WillFocusWindow(window); 421 window = delegate_->WillFocusWindow(window);
423 if (GetActiveWindow() != window) { 422 if (GetActiveWindow() != window) {
424 aura::client::GetFocusClient(window)->FocusWindow( 423 aura::client::GetFocusClient(window)->FocusWindow(
425 FindFocusableWindowFor(window), event); 424 FindFocusableWindowFor(window), event);
426 } 425 }
427 } 426 }
428 427
429 } // namespace internal 428 } // namespace internal
430 } // namespace ash 429 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/activation_controller.h ('k') | ash/wm/app_list_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698