| OLD | NEW |
| 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/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/focus_manager.h" | 9 #include "ui/aura/focus_manager.h" |
| 10 #include "ui/aura/root_window.h" | 10 #include "ui/aura/root_window.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 } | 51 } |
| 52 virtual bool OnMouseEvent(ui::MouseEvent* event) OVERRIDE { | 52 virtual bool OnMouseEvent(ui::MouseEvent* event) OVERRIDE { |
| 53 ++mouse_event_count_; | 53 ++mouse_event_count_; |
| 54 return true; | 54 return true; |
| 55 } | 55 } |
| 56 virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) OVERRIDE { | 56 virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) OVERRIDE { |
| 57 ++touch_event_count_; | 57 ++touch_event_count_; |
| 58 return ui::TOUCH_STATUS_UNKNOWN; | 58 return ui::TOUCH_STATUS_UNKNOWN; |
| 59 } | 59 } |
| 60 virtual ui::GestureStatus OnGestureEvent( | 60 virtual ui::GestureStatus OnGestureEvent( |
| 61 ui::GestureEventImpl* event) OVERRIDE { | 61 ui::GestureEvent* event) OVERRIDE { |
| 62 return ui::GESTURE_STATUS_UNKNOWN; | 62 return ui::GESTURE_STATUS_UNKNOWN; |
| 63 } | 63 } |
| 64 | 64 |
| 65 private: | 65 private: |
| 66 int key_event_count_; | 66 int key_event_count_; |
| 67 int mouse_event_count_; | 67 int mouse_event_count_; |
| 68 int touch_event_count_; | 68 int touch_event_count_; |
| 69 | 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(TestEventFilterWindowDelegate); | 70 DISALLOW_COPY_AND_ASSIGN(TestEventFilterWindowDelegate); |
| 71 }; | 71 }; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 EXPECT_EQ(0, w111_filter->mouse_event_count()); | 146 EXPECT_EQ(0, w111_filter->mouse_event_count()); |
| 147 EXPECT_EQ(0, d1111->mouse_event_count()); | 147 EXPECT_EQ(0, d1111->mouse_event_count()); |
| 148 EXPECT_EQ(0, root_window_filter->touch_event_count()); | 148 EXPECT_EQ(0, root_window_filter->touch_event_count()); |
| 149 EXPECT_EQ(0, w1_filter->touch_event_count()); | 149 EXPECT_EQ(0, w1_filter->touch_event_count()); |
| 150 EXPECT_EQ(0, w111_filter->touch_event_count()); | 150 EXPECT_EQ(0, w111_filter->touch_event_count()); |
| 151 EXPECT_EQ(0, d1111->touch_event_count()); | 151 EXPECT_EQ(0, d1111->touch_event_count()); |
| 152 } | 152 } |
| 153 | 153 |
| 154 } // namespace test | 154 } // namespace test |
| 155 } // namespace aura | 155 } // namespace aura |
| OLD | NEW |