| 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 "ash/shell.h" | 5 #include "ash/shell.h" |
| 6 #include "ash/shell_window_ids.h" | 6 #include "ash/shell_window_ids.h" |
| 7 #include "ash/test/ash_test_base.h" | 7 #include "ash/test/ash_test_base.h" |
| 8 #include "ash/test/shell_test_api.h" | 8 #include "ash/test/shell_test_api.h" |
| 9 #include "ash/test/test_activation_delegate.h" | 9 #include "ash/test/test_activation_delegate.h" |
| 10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
| 11 #include "ui/aura/client/activation_client.h" | 11 #include "ui/aura/client/activation_client.h" |
| 12 #include "ui/aura/client/activation_delegate.h" | 12 #include "ui/aura/client/activation_delegate.h" |
| 13 #include "ui/aura/client/cursor_client_observer.h" | 13 #include "ui/aura/client/cursor_client_observer.h" |
| 14 #include "ui/aura/client/focus_client.h" | 14 #include "ui/aura/client/focus_client.h" |
| 15 #include "ui/aura/env.h" | 15 #include "ui/aura/env.h" |
| 16 #include "ui/aura/test/aura_test_base.h" | 16 #include "ui/aura/test/aura_test_base.h" |
| 17 #include "ui/aura/test/event_generator.h" | 17 #include "ui/aura/test/event_generator.h" |
| 18 #include "ui/aura/test/test_event_handler.h" | 18 #include "ui/aura/test/test_event_handler.h" |
| 19 #include "ui/aura/test/test_window_delegate.h" | 19 #include "ui/aura/test/test_window_delegate.h" |
| 20 #include "ui/aura/test/test_windows.h" | 20 #include "ui/aura/test/test_windows.h" |
| 21 #include "ui/base/cursor/cursor.h" | 21 #include "ui/base/cursor/cursor.h" |
| 22 #include "ui/base/hit_test.h" | 22 #include "ui/base/hit_test.h" |
| 23 #include "ui/events/event.h" | 23 #include "ui/events/event.h" |
| 24 #include "ui/events/event_processor.h" | 24 #include "ui/events/event_processor.h" |
| 25 #include "ui/events/event_utils.h" | 25 #include "ui/events/event_utils.h" |
| 26 #include "ui/gfx/screen.h" | 26 #include "ui/gfx/screen.h" |
| 27 #include "ui/views/corewm/compound_event_filter.h" | 27 #include "ui/wm/core/compound_event_filter.h" |
| 28 #include "ui/views/corewm/corewm_switches.h" | 28 #include "ui/wm/core/input_method_event_filter.h" |
| 29 #include "ui/views/corewm/input_method_event_filter.h" | |
| 30 | 29 |
| 31 namespace { | 30 namespace { |
| 32 | 31 |
| 33 class TestingCursorClientObserver : public aura::client::CursorClientObserver { | 32 class TestingCursorClientObserver : public aura::client::CursorClientObserver { |
| 34 public: | 33 public: |
| 35 TestingCursorClientObserver() | 34 TestingCursorClientObserver() |
| 36 : cursor_visibility_(false), | 35 : cursor_visibility_(false), |
| 37 did_visibility_change_(false) {} | 36 did_visibility_change_(false) {} |
| 38 void reset() { cursor_visibility_ = did_visibility_change_ = false; } | 37 void reset() { cursor_visibility_ = did_visibility_change_ = false; } |
| 39 bool is_cursor_visible() const { return cursor_visibility_; } | 38 bool is_cursor_visible() const { return cursor_visibility_; } |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 observer_a.reset(); | 831 observer_a.reset(); |
| 833 observer_b.reset(); | 832 observer_b.reset(); |
| 834 generator.MoveMouseTo(50, 50); | 833 generator.MoveMouseTo(50, 50); |
| 835 EXPECT_TRUE(observer_a.did_visibility_change()); | 834 EXPECT_TRUE(observer_a.did_visibility_change()); |
| 836 EXPECT_FALSE(observer_b.did_visibility_change()); | 835 EXPECT_FALSE(observer_b.did_visibility_change()); |
| 837 EXPECT_TRUE(observer_a.is_cursor_visible()); | 836 EXPECT_TRUE(observer_a.is_cursor_visible()); |
| 838 } | 837 } |
| 839 #endif // defined(OS_CHROMEOS) | 838 #endif // defined(OS_CHROMEOS) |
| 840 | 839 |
| 841 } // namespace ash | 840 } // namespace ash |
| OLD | NEW |