| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE { | 60 virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE { |
| 61 ++key_event_count_; | 61 ++key_event_count_; |
| 62 return key_event_handling_result_; | 62 return key_event_handling_result_; |
| 63 } | 63 } |
| 64 | 64 |
| 65 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE { | 65 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE { |
| 66 ++mouse_event_count_; | 66 ++mouse_event_count_; |
| 67 return mouse_event_handling_result_; | 67 return mouse_event_handling_result_; |
| 68 } | 68 } |
| 69 | 69 |
| 70 virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) OVERRIDE { | 70 virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE { |
| 71 ++touch_event_count_; | 71 ++touch_event_count_; |
| 72 // TODO(sadrul): ! | 72 // TODO(sadrul): ! |
| 73 return ui::TOUCH_STATUS_UNKNOWN; | 73 return ui::ER_UNHANDLED; |
| 74 } | 74 } |
| 75 | 75 |
| 76 virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE { | 76 virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE { |
| 77 // TODO(sadrul): ! | 77 // TODO(sadrul): ! |
| 78 return ui::ER_UNHANDLED; | 78 return ui::ER_UNHANDLED; |
| 79 } | 79 } |
| 80 private: | 80 private: |
| 81 int key_event_count_; | 81 int key_event_count_; |
| 82 int mouse_event_count_; | 82 int mouse_event_count_; |
| 83 int touch_event_count_; | 83 int touch_event_count_; |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 generator.PressKey(ui::VKEY_A, 0); | 295 generator.PressKey(ui::VKEY_A, 0); |
| 296 generator.PressLeftButton(); | 296 generator.PressLeftButton(); |
| 297 | 297 |
| 298 EXPECT_EQ(1, w1_filter->key_event_count()); | 298 EXPECT_EQ(1, w1_filter->key_event_count()); |
| 299 EXPECT_EQ(0, d11.key_event_count()); | 299 EXPECT_EQ(0, d11.key_event_count()); |
| 300 EXPECT_EQ(1, w1_filter->mouse_event_count()); | 300 EXPECT_EQ(1, w1_filter->mouse_event_count()); |
| 301 EXPECT_EQ(0, d11.mouse_event_count()); | 301 EXPECT_EQ(0, d11.mouse_event_count()); |
| 302 } | 302 } |
| 303 | 303 |
| 304 } // namespace aura | 304 } // namespace aura |
| OLD | NEW |