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