| OLD | NEW |
| 1 // Copyright (c) 2011 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/event_filter.h" | 5 #include "ui/aura/event_filter.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "ui/aura/event.h" | 9 #include "ui/aura/event.h" |
| 10 #include "ui/aura/root_window.h" | 10 #include "ui/aura/root_window.h" |
| 11 #include "ui/aura/test/aura_test_base.h" | 11 #include "ui/aura/test/aura_test_base.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 return true; | 49 return true; |
| 50 } | 50 } |
| 51 virtual bool OnMouseEvent(MouseEvent* event) OVERRIDE { | 51 virtual bool OnMouseEvent(MouseEvent* event) OVERRIDE { |
| 52 ++mouse_event_count_; | 52 ++mouse_event_count_; |
| 53 return true; | 53 return true; |
| 54 } | 54 } |
| 55 virtual ui::TouchStatus OnTouchEvent(TouchEvent* event) OVERRIDE { | 55 virtual ui::TouchStatus OnTouchEvent(TouchEvent* event) OVERRIDE { |
| 56 ++touch_event_count_; | 56 ++touch_event_count_; |
| 57 return ui::TOUCH_STATUS_UNKNOWN; | 57 return ui::TOUCH_STATUS_UNKNOWN; |
| 58 } | 58 } |
| 59 virtual ui::GestureStatus OnGestureEvent(GestureEvent* event) OVERRIDE { |
| 60 return ui::GESTURE_STATUS_UNKNOWN; |
| 61 } |
| 59 | 62 |
| 60 private: | 63 private: |
| 61 int key_event_count_; | 64 int key_event_count_; |
| 62 int mouse_event_count_; | 65 int mouse_event_count_; |
| 63 int touch_event_count_; | 66 int touch_event_count_; |
| 64 | 67 |
| 65 DISALLOW_COPY_AND_ASSIGN(TestEventFilterWindowDelegate); | 68 DISALLOW_COPY_AND_ASSIGN(TestEventFilterWindowDelegate); |
| 66 }; | 69 }; |
| 67 | 70 |
| 68 Window* CreateWindow(int id, Window* parent, WindowDelegate* delegate) { | 71 Window* CreateWindow(int id, Window* parent, WindowDelegate* delegate) { |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 EXPECT_EQ(0, w111_filter->mouse_event_count()); | 145 EXPECT_EQ(0, w111_filter->mouse_event_count()); |
| 143 EXPECT_EQ(0, d1111->mouse_event_count()); | 146 EXPECT_EQ(0, d1111->mouse_event_count()); |
| 144 EXPECT_EQ(0, root_window_filter->touch_event_count()); | 147 EXPECT_EQ(0, root_window_filter->touch_event_count()); |
| 145 EXPECT_EQ(0, w1_filter->touch_event_count()); | 148 EXPECT_EQ(0, w1_filter->touch_event_count()); |
| 146 EXPECT_EQ(0, w111_filter->touch_event_count()); | 149 EXPECT_EQ(0, w111_filter->touch_event_count()); |
| 147 EXPECT_EQ(0, d1111->touch_event_count()); | 150 EXPECT_EQ(0, d1111->touch_event_count()); |
| 148 } | 151 } |
| 149 | 152 |
| 150 } // namespace test | 153 } // namespace test |
| 151 } // namespace aura | 154 } // namespace aura |
| OLD | NEW |