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 #ifndef ASH_TEST_TEST_SHELL_DELEGATE_H_ | 5 #ifndef ASH_TEST_TEST_SHELL_DELEGATE_H_ |
6 #define ASH_TEST_TEST_SHELL_DELEGATE_H_ | 6 #define ASH_TEST_TEST_SHELL_DELEGATE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "ash/media_delegate.h" | 11 #include "ash/media_delegate.h" |
12 #include "ash/shell_delegate.h" | 12 #include "ash/shell_delegate.h" |
13 #include "ash/test/test_session_state_delegate.h" | 13 #include "ash/test/test_session_state_delegate.h" |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
17 | 17 |
18 namespace app_list { | 18 namespace app_list { |
19 class AppListShowerDelegateFactory; | 19 class AppListPresenterDelegateFactory; |
20 class AppListShowerImpl; | 20 class AppListPresenterImpl; |
21 } | 21 } |
22 | 22 |
23 namespace keyboard { | 23 namespace keyboard { |
24 class KeyboardUI; | 24 class KeyboardUI; |
25 } | 25 } |
26 | 26 |
27 namespace ash { | 27 namespace ash { |
28 namespace test { | 28 namespace test { |
29 | 29 |
30 class TestShellDelegate : public ShellDelegate { | 30 class TestShellDelegate : public ShellDelegate { |
(...skipping 15 matching lines...) Expand all Loading... |
46 void PreInit() override; | 46 void PreInit() override; |
47 void PreShutdown() override; | 47 void PreShutdown() override; |
48 void Exit() override; | 48 void Exit() override; |
49 keyboard::KeyboardUI* CreateKeyboardUI() override; | 49 keyboard::KeyboardUI* CreateKeyboardUI() override; |
50 void VirtualKeyboardActivated(bool activated) override; | 50 void VirtualKeyboardActivated(bool activated) override; |
51 void AddVirtualKeyboardStateObserver( | 51 void AddVirtualKeyboardStateObserver( |
52 VirtualKeyboardStateObserver* observer) override; | 52 VirtualKeyboardStateObserver* observer) override; |
53 void RemoveVirtualKeyboardStateObserver( | 53 void RemoveVirtualKeyboardStateObserver( |
54 VirtualKeyboardStateObserver* observer) override; | 54 VirtualKeyboardStateObserver* observer) override; |
55 void OpenUrl(const GURL& url) override; | 55 void OpenUrl(const GURL& url) override; |
56 app_list::AppListShower* GetAppListShower() override; | 56 app_list::AppListPresenter* GetAppListPresenter() override; |
57 ShelfDelegate* CreateShelfDelegate(ShelfModel* model) override; | 57 ShelfDelegate* CreateShelfDelegate(ShelfModel* model) override; |
58 SystemTrayDelegate* CreateSystemTrayDelegate() override; | 58 SystemTrayDelegate* CreateSystemTrayDelegate() override; |
59 UserWallpaperDelegate* CreateUserWallpaperDelegate() override; | 59 UserWallpaperDelegate* CreateUserWallpaperDelegate() override; |
60 TestSessionStateDelegate* CreateSessionStateDelegate() override; | 60 TestSessionStateDelegate* CreateSessionStateDelegate() override; |
61 AccessibilityDelegate* CreateAccessibilityDelegate() override; | 61 AccessibilityDelegate* CreateAccessibilityDelegate() override; |
62 NewWindowDelegate* CreateNewWindowDelegate() override; | 62 NewWindowDelegate* CreateNewWindowDelegate() override; |
63 MediaDelegate* CreateMediaDelegate() override; | 63 MediaDelegate* CreateMediaDelegate() override; |
64 ui::MenuModel* CreateContextMenu(ash::Shelf* shelf, | 64 ui::MenuModel* CreateContextMenu(ash::Shelf* shelf, |
65 const ash::ShelfItem* item) override; | 65 const ash::ShelfItem* item) override; |
66 GPUSupport* CreateGPUSupport() override; | 66 GPUSupport* CreateGPUSupport() override; |
67 base::string16 GetProductName() const override; | 67 base::string16 GetProductName() const override; |
68 gfx::Image GetDeprecatedAcceleratorImage() const override; | 68 gfx::Image GetDeprecatedAcceleratorImage() const override; |
69 | 69 |
70 int num_exit_requests() const { return num_exit_requests_; } | 70 int num_exit_requests() const { return num_exit_requests_; } |
71 | 71 |
72 app_list::AppListShowerImpl* app_list_shower() { | 72 app_list::AppListPresenterImpl* app_list_presenter() { |
73 return app_list_shower_.get(); | 73 return app_list_presenter_.get(); |
74 } | 74 } |
75 | 75 |
76 void SetMediaCaptureState(MediaCaptureState state); | 76 void SetMediaCaptureState(MediaCaptureState state); |
77 void SetForceMaximizeOnFirstRun(bool maximize) { | 77 void SetForceMaximizeOnFirstRun(bool maximize) { |
78 force_maximize_on_first_run_ = maximize; | 78 force_maximize_on_first_run_ = maximize; |
79 } | 79 } |
80 | 80 |
81 private: | 81 private: |
82 int num_exit_requests_; | 82 int num_exit_requests_; |
83 bool multi_profiles_enabled_; | 83 bool multi_profiles_enabled_; |
84 bool force_maximize_on_first_run_; | 84 bool force_maximize_on_first_run_; |
85 | 85 |
86 std::unique_ptr<app_list::AppListShowerDelegateFactory> | 86 std::unique_ptr<app_list::AppListPresenterDelegateFactory> |
87 app_list_shower_delegate_factory_; | 87 app_list_presenter_delegate_factory_; |
88 std::unique_ptr<app_list::AppListShowerImpl> app_list_shower_; | 88 std::unique_ptr<app_list::AppListPresenterImpl> app_list_presenter_; |
89 | 89 |
90 base::ObserverList<ash::VirtualKeyboardStateObserver> | 90 base::ObserverList<ash::VirtualKeyboardStateObserver> |
91 keyboard_state_observer_list_; | 91 keyboard_state_observer_list_; |
92 | 92 |
93 DISALLOW_COPY_AND_ASSIGN(TestShellDelegate); | 93 DISALLOW_COPY_AND_ASSIGN(TestShellDelegate); |
94 }; | 94 }; |
95 | 95 |
96 } // namespace test | 96 } // namespace test |
97 } // namespace ash | 97 } // namespace ash |
98 | 98 |
99 #endif // ASH_TEST_TEST_SHELL_DELEGATE_H_ | 99 #endif // ASH_TEST_TEST_SHELL_DELEGATE_H_ |
OLD | NEW |