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

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

Issue 10824247: Remove GestureEvent interface, and rename GestureEventImpl to GestureEvent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 months 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/root_window.cc ('k') | ui/aura/shared/compound_event_filter.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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 virtual bool PreHandleMouseEvent(Window* target, 88 virtual bool PreHandleMouseEvent(Window* target,
89 ui::MouseEvent* event) OVERRIDE { 89 ui::MouseEvent* event) OVERRIDE {
90 num_mouse_events_++; 90 num_mouse_events_++;
91 return true; 91 return true;
92 } 92 }
93 virtual ui::TouchStatus PreHandleTouchEvent( 93 virtual ui::TouchStatus PreHandleTouchEvent(
94 Window* target, ui::TouchEvent* event) OVERRIDE { 94 Window* target, ui::TouchEvent* event) OVERRIDE {
95 return ui::TOUCH_STATUS_UNKNOWN; 95 return ui::TOUCH_STATUS_UNKNOWN;
96 } 96 }
97 virtual ui::GestureStatus PreHandleGestureEvent( 97 virtual ui::GestureStatus PreHandleGestureEvent(
98 Window* target, ui::GestureEventImpl* event) OVERRIDE { 98 Window* target, ui::GestureEvent* event) OVERRIDE {
99 return ui::GESTURE_STATUS_UNKNOWN; 99 return ui::GESTURE_STATUS_UNKNOWN;
100 } 100 }
101 101
102 private: 102 private:
103 // How many key events have been received? 103 // How many key events have been received?
104 int num_key_events_; 104 int num_key_events_;
105 105
106 // How many mouse events have been received? 106 // How many mouse events have been received?
107 int num_mouse_events_; 107 int num_mouse_events_;
108 108
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 return true; 367 return true;
368 } 368 }
369 virtual ui::TouchStatus PreHandleTouchEvent( 369 virtual ui::TouchStatus PreHandleTouchEvent(
370 Window* target, 370 Window* target,
371 ui::TouchEvent* event) OVERRIDE { 371 ui::TouchEvent* event) OVERRIDE {
372 events_.push_back(event->type()); 372 events_.push_back(event->type());
373 return ui::TOUCH_STATUS_UNKNOWN; 373 return ui::TOUCH_STATUS_UNKNOWN;
374 } 374 }
375 virtual ui::GestureStatus PreHandleGestureEvent( 375 virtual ui::GestureStatus PreHandleGestureEvent(
376 Window* target, 376 Window* target,
377 ui::GestureEventImpl* event) OVERRIDE { 377 ui::GestureEvent* event) OVERRIDE {
378 events_.push_back(event->type()); 378 events_.push_back(event->type());
379 return ui::GESTURE_STATUS_UNKNOWN; 379 return ui::GESTURE_STATUS_UNKNOWN;
380 } 380 }
381 381
382 private: 382 private:
383 Events events_; 383 Events events_;
384 384
385 DISALLOW_COPY_AND_ASSIGN(EventFilterRecorder); 385 DISALLOW_COPY_AND_ASSIGN(EventFilterRecorder);
386 }; 386 };
387 387
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 root_window()->ReleaseMouseMoves(); 538 root_window()->ReleaseMouseMoves();
539 root_window()->AsRootWindowHostDelegate()->OnHostMouseEvent( 539 root_window()->AsRootWindowHostDelegate()->OnHostMouseEvent(
540 &mouse_dragged_event2); 540 &mouse_dragged_event2);
541 EXPECT_EQ("MOUSE_DRAGGED", EventTypesToString(filter->events())); 541 EXPECT_EQ("MOUSE_DRAGGED", EventTypesToString(filter->events()));
542 filter->events().clear(); 542 filter->events().clear();
543 RunAllPendingInMessageLoop(); 543 RunAllPendingInMessageLoop();
544 EXPECT_TRUE(filter->events().empty()); 544 EXPECT_TRUE(filter->events().empty());
545 } 545 }
546 546
547 } // namespace aura 547 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/root_window.cc ('k') | ui/aura/shared/compound_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698