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/shared/compound_event_filter.h" | 5 #include "ui/aura/shared/compound_event_filter.h" |
6 | 6 |
7 #include "ui/aura/client/activation_client.h" | 7 #include "ui/aura/client/activation_client.h" |
8 #include "ui/aura/client/cursor_client.h" | 8 #include "ui/aura/client/cursor_client.h" |
9 #include "ui/aura/env.h" | 9 #include "ui/aura/env.h" |
10 #include "ui/aura/root_window.h" | 10 #include "ui/aura/root_window.h" |
11 #include "ui/aura/shared/root_window_capture_client.h" | 11 #include "ui/aura/shared/root_window_capture_client.h" |
12 #include "ui/aura/test/aura_test_base.h" | 12 #include "ui/aura/test/aura_test_base.h" |
13 #include "ui/aura/test/event_generator.h" | 13 #include "ui/aura/test/event_generator.h" |
14 #include "ui/aura/test/test_activation_client.h" | 14 #include "ui/aura/test/test_activation_client.h" |
15 #include "ui/aura/test/test_windows.h" | 15 #include "ui/aura/test/test_windows.h" |
16 #include "ui/base/events/event.h" | 16 #include "ui/base/events/event.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 base::TimeDelta GetTime() { | 20 base::TimeDelta GetTime() { |
21 return base::Time::NowFromSystemTime() - base::Time(); | 21 return base::Time::NowFromSystemTime() - base::Time(); |
22 } | 22 } |
23 | 23 |
24 class TestVisibleClient : public aura::client::CursorClient { | 24 class TestVisibleClient : public aura::client::CursorClient { |
25 public: | 25 public: |
26 TestVisibleClient() : visible_(false) {} | 26 TestVisibleClient() : visible_(true) {} |
27 virtual ~TestVisibleClient() {} | 27 virtual ~TestVisibleClient() {} |
28 | 28 |
29 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE { | 29 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE { |
30 } | 30 } |
31 | 31 |
32 virtual void ShowCursor(bool show) OVERRIDE { | 32 virtual void ShowCursor(bool show) OVERRIDE { |
33 visible_ = show; | 33 visible_ = show; |
34 } | 34 } |
35 | 35 |
36 virtual bool IsCursorVisible() const OVERRIDE { | 36 virtual bool IsCursorVisible() const OVERRIDE { |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 // the gestures. | 174 // the gestures. |
175 EventGenerator generator(root_window(), gfx::Point(50, 50)); | 175 EventGenerator generator(root_window(), gfx::Point(50, 50)); |
176 generator.PressTouch(); | 176 generator.PressTouch(); |
177 EXPECT_FALSE(window->HasFocus()); | 177 EXPECT_FALSE(window->HasFocus()); |
178 | 178 |
179 compound_filter->RemoveFilter(gesture_filter.get()); | 179 compound_filter->RemoveFilter(gesture_filter.get()); |
180 } | 180 } |
181 | 181 |
182 } // namespace test | 182 } // namespace test |
183 } // namespace aura | 183 } // namespace aura |
OLD | NEW |