| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_shell/root_window_event_filter.h" | 5 #include "ash/wm/root_window_event_filter.h" |
| 6 | 6 |
| 7 #include "ash/wm/activation_controller.h" | 7 #include "ash/wm/activation_controller.h" |
| 8 #include "ash/wm/window_util.h" |
| 8 #include "ui/aura/client/activation_delegate.h" | 9 #include "ui/aura/client/activation_delegate.h" |
| 9 #include "ui/aura/cursor.h" | 10 #include "ui/aura/cursor.h" |
| 10 #include "ui/aura/event.h" | 11 #include "ui/aura/event.h" |
| 11 #include "ui/aura/root_window.h" | 12 #include "ui/aura/root_window.h" |
| 12 #include "ui/aura/test/aura_test_base.h" | 13 #include "ui/aura/test/aura_test_base.h" |
| 13 #include "ui/aura/test/event_generator.h" | 14 #include "ui/aura/test/event_generator.h" |
| 14 #include "ui/aura/test/test_windows.h" | 15 #include "ui/aura/test/test_windows.h" |
| 15 #include "ui/aura/test/test_event_filter.h" | 16 #include "ui/aura/test/test_event_filter.h" |
| 16 #include "ui/aura/test/test_window_delegate.h" | 17 #include "ui/aura/test/test_window_delegate.h" |
| 17 #include "ui/aura_shell/shell_window_ids.h" | 18 #include "ui/aura_shell/shell_window_ids.h" |
| 18 #include "ui/aura_shell/test/test_activation_delegate.h" | 19 #include "ui/aura_shell/test/test_activation_delegate.h" |
| 19 #include "ui/aura_shell/window_util.h" | |
| 20 #include "ui/base/hit_test.h" | 20 #include "ui/base/hit_test.h" |
| 21 #include "ui/gfx/screen.h" | 21 #include "ui/gfx/screen.h" |
| 22 | 22 |
| 23 namespace aura_shell { | 23 namespace aura_shell { |
| 24 namespace test { | 24 namespace test { |
| 25 | 25 |
| 26 class RootWindowEventFilterTest : public aura::test::AuraTestBase { | 26 class RootWindowEventFilterTest : public aura::test::AuraTestBase { |
| 27 public: | 27 public: |
| 28 RootWindowEventFilterTest() { | 28 RootWindowEventFilterTest() { |
| 29 aura::RootWindow::GetInstance()->SetEventFilter( | 29 aura::RootWindow::GetInstance()->SetEventFilter( |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 EXPECT_EQ(0, f1->key_event_count()); | 442 EXPECT_EQ(0, f1->key_event_count()); |
| 443 EXPECT_EQ(0, f1->mouse_event_count()); | 443 EXPECT_EQ(0, f1->mouse_event_count()); |
| 444 EXPECT_EQ(1, f2->key_event_count()); | 444 EXPECT_EQ(1, f2->key_event_count()); |
| 445 EXPECT_EQ(1, f2->mouse_event_count()); | 445 EXPECT_EQ(1, f2->mouse_event_count()); |
| 446 | 446 |
| 447 root_window_filter->RemoveFilter(f2.get()); | 447 root_window_filter->RemoveFilter(f2.get()); |
| 448 } | 448 } |
| 449 | 449 |
| 450 } // namespace test | 450 } // namespace test |
| 451 } // namespace aura_shell | 451 } // namespace aura_shell |
| OLD | NEW |