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

Side by Side Diff: ui/aura/root_window_unittest.cc

Issue 11568006: events: Update scroll and touch handlers to not return EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self-nit 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/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/aura/test/test_event_handler.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/aura/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/aura/client/event_client.h" 10 #include "ui/aura/client/event_client.h"
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE { 444 virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE {
445 events_.push_back(event->type()); 445 events_.push_back(event->type());
446 return ui::ER_UNHANDLED; 446 return ui::ER_UNHANDLED;
447 } 447 }
448 448
449 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE { 449 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
450 events_.push_back(event->type()); 450 events_.push_back(event->type());
451 return ui::ER_UNHANDLED; 451 return ui::ER_UNHANDLED;
452 } 452 }
453 453
454 virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE { 454 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE {
455 events_.push_back(event->type()); 455 events_.push_back(event->type());
456 return ui::ER_UNHANDLED;
457 } 456 }
458 457
459 virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE { 458 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE {
460 events_.push_back(event->type()); 459 events_.push_back(event->type());
461 return ui::ER_UNHANDLED;
462 } 460 }
463 461
464 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE { 462 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
465 events_.push_back(event->type()); 463 events_.push_back(event->type());
466 } 464 }
467 465
468 private: 466 private:
469 Events events_; 467 Events events_;
470 468
471 DISALLOW_COPY_AND_ASSIGN(EventFilterRecorder); 469 DISALLOW_COPY_AND_ASSIGN(EventFilterRecorder);
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 TEST_F(RootWindowTest, GestureRecognizerResetsTargetWhenParentHides) { 768 TEST_F(RootWindowTest, GestureRecognizerResetsTargetWhenParentHides) {
771 scoped_ptr<Window> w1(CreateWindow(1, root_window(), NULL)); 769 scoped_ptr<Window> w1(CreateWindow(1, root_window(), NULL));
772 DetachesParentOnTapDelegate delegate; 770 DetachesParentOnTapDelegate delegate;
773 scoped_ptr<Window> parent(CreateWindow(22, w1.get(), NULL)); 771 scoped_ptr<Window> parent(CreateWindow(22, w1.get(), NULL));
774 Window* child = CreateWindow(11, parent.get(), &delegate); 772 Window* child = CreateWindow(11, parent.get(), &delegate);
775 test::EventGenerator generator(root_window(), child); 773 test::EventGenerator generator(root_window(), child);
776 generator.GestureTapAt(gfx::Point(40, 40)); 774 generator.GestureTapAt(gfx::Point(40, 40));
777 } 775 }
778 776
779 } // namespace aura 777 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/aura/test/test_event_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698