OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/wm/immersive_fullscreen_controller.h" | 5 #include "ash/wm/immersive_fullscreen_controller.h" |
6 | 6 |
7 #include "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.h" |
8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
9 #include "ash/shelf/shelf_layout_manager.h" | 9 #include "ash/shelf/shelf_layout_manager.h" |
10 #include "ash/shelf/shelf_types.h" | 10 #include "ash/shelf/shelf_types.h" |
11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
12 #include "ash/test/ash_test_base.h" | 12 #include "ash/test/ash_test_base.h" |
13 #include "ui/aura/client/aura_constants.h" | 13 #include "ui/aura/client/aura_constants.h" |
14 #include "ui/aura/client/cursor_client.h" | 14 #include "ui/aura/client/cursor_client.h" |
15 #include "ui/aura/env.h" | 15 #include "ui/aura/env.h" |
16 #include "ui/aura/test/event_generator.h" | 16 #include "ui/aura/test/event_generator.h" |
17 #include "ui/aura/test/test_event_handler.h" | |
18 #include "ui/aura/test/test_window_delegate.h" | 17 #include "ui/aura/test/test_window_delegate.h" |
19 #include "ui/aura/window.h" | 18 #include "ui/aura/window.h" |
20 #include "ui/aura/window_event_dispatcher.h" | 19 #include "ui/aura/window_event_dispatcher.h" |
21 #include "ui/events/event_utils.h" | 20 #include "ui/events/event_utils.h" |
| 21 #include "ui/events/test/test_event_handler.h" |
22 #include "ui/gfx/animation/slide_animation.h" | 22 #include "ui/gfx/animation/slide_animation.h" |
23 #include "ui/views/bubble/bubble_delegate.h" | 23 #include "ui/views/bubble/bubble_delegate.h" |
24 #include "ui/views/controls/native/native_view_host.h" | 24 #include "ui/views/controls/native/native_view_host.h" |
25 #include "ui/views/view.h" | 25 #include "ui/views/view.h" |
26 #include "ui/views/widget/widget.h" | 26 #include "ui/views/widget/widget.h" |
27 | 27 |
28 namespace ash { | 28 namespace ash { |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 } | 69 } |
70 | 70 |
71 private: | 71 private: |
72 views::View* top_container_view_; | 72 views::View* top_container_view_; |
73 bool enabled_; | 73 bool enabled_; |
74 double visible_fraction_; | 74 double visible_fraction_; |
75 | 75 |
76 DISALLOW_COPY_AND_ASSIGN(MockImmersiveFullscreenControllerDelegate); | 76 DISALLOW_COPY_AND_ASSIGN(MockImmersiveFullscreenControllerDelegate); |
77 }; | 77 }; |
78 | 78 |
79 class ConsumeEventHandler : public aura::test::TestEventHandler { | 79 class ConsumeEventHandler : public ui::test::TestEventHandler { |
80 public: | 80 public: |
81 ConsumeEventHandler() {} | 81 ConsumeEventHandler() {} |
82 virtual ~ConsumeEventHandler() {} | 82 virtual ~ConsumeEventHandler() {} |
83 | 83 |
84 private: | 84 private: |
85 virtual void OnEvent(ui::Event* event) OVERRIDE { | 85 virtual void OnEvent(ui::Event* event) OVERRIDE { |
86 aura::test::TestEventHandler::OnEvent(event); | 86 ui::test::TestEventHandler::OnEvent(event); |
87 if (event->cancelable()) | 87 if (event->cancelable()) |
88 event->SetHandled(); | 88 event->SetHandled(); |
89 } | 89 } |
90 | 90 |
91 DISALLOW_COPY_AND_ASSIGN(ConsumeEventHandler); | 91 DISALLOW_COPY_AND_ASSIGN(ConsumeEventHandler); |
92 }; | 92 }; |
93 | 93 |
94 } // namespace | 94 } // namespace |
95 | 95 |
96 ///////////////////////////////////////////////////////////////////////////// | 96 ///////////////////////////////////////////////////////////////////////////// |
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); | 1048 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); |
1049 | 1049 |
1050 // Disabling immersive fullscreen maintains the user's auto-hide selection. | 1050 // Disabling immersive fullscreen maintains the user's auto-hide selection. |
1051 SetEnabled(false); | 1051 SetEnabled(false); |
1052 window()->SetProperty(aura::client::kShowStateKey, | 1052 window()->SetProperty(aura::client::kShowStateKey, |
1053 ui::SHOW_STATE_NORMAL); | 1053 ui::SHOW_STATE_NORMAL); |
1054 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); | 1054 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); |
1055 } | 1055 } |
1056 | 1056 |
1057 } // namespase ash | 1057 } // namespase ash |
OLD | NEW |