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_SHELL_SHELL_DELEGATE_IMPL_H_ | 5 #ifndef ASH_SHELL_SHELL_DELEGATE_IMPL_H_ |
6 #define ASH_SHELL_SHELL_DELEGATE_IMPL_H_ | 6 #define ASH_SHELL_SHELL_DELEGATE_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "ash/common/shell_delegate.h" | 11 #include "ash/common/shell_delegate.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 | 13 |
14 namespace app_list { | |
15 class AppListPresenterDelegateFactory; | |
16 class AppListPresenterImpl; | |
17 } | |
18 | |
19 namespace keyboard { | 14 namespace keyboard { |
20 class KeyboardUI; | 15 class KeyboardUI; |
21 } | 16 } |
22 | 17 |
23 namespace ash { | 18 namespace ash { |
24 namespace shell { | 19 namespace shell { |
25 | 20 |
26 class ShellDelegateImpl : public ShellDelegate { | 21 class ShellDelegateImpl : public ShellDelegate { |
27 public: | 22 public: |
28 ShellDelegateImpl(); | 23 ShellDelegateImpl(); |
29 ~ShellDelegateImpl() override; | 24 ~ShellDelegateImpl() override; |
30 | 25 |
31 // ShellDelegate: | 26 // ShellDelegate: |
32 ::service_manager::Connector* GetShellConnector() const override; | 27 ::service_manager::Connector* GetShellConnector() const override; |
33 bool IsIncognitoAllowed() const override; | 28 bool IsIncognitoAllowed() const override; |
34 bool IsMultiProfilesEnabled() const override; | 29 bool IsMultiProfilesEnabled() const override; |
35 bool IsRunningInForcedAppMode() const override; | 30 bool IsRunningInForcedAppMode() const override; |
36 bool CanShowWindowForUser(WmWindow* window) const override; | 31 bool CanShowWindowForUser(WmWindow* window) const override; |
37 bool IsForceMaximizeOnFirstRun() const override; | 32 bool IsForceMaximizeOnFirstRun() const override; |
38 void PreInit() override; | 33 void PreInit() override; |
39 void PreShutdown() override; | 34 void PreShutdown() override; |
40 void Exit() override; | 35 void Exit() override; |
41 keyboard::KeyboardUI* CreateKeyboardUI() override; | 36 keyboard::KeyboardUI* CreateKeyboardUI() override; |
42 void OpenUrlFromArc(const GURL& url) override; | 37 void OpenUrlFromArc(const GURL& url) override; |
43 app_list::AppListPresenter* GetAppListPresenter() override; | |
44 ShelfDelegate* CreateShelfDelegate(ShelfModel* model) override; | 38 ShelfDelegate* CreateShelfDelegate(ShelfModel* model) override; |
45 SystemTrayDelegate* CreateSystemTrayDelegate() override; | 39 SystemTrayDelegate* CreateSystemTrayDelegate() override; |
46 std::unique_ptr<WallpaperDelegate> CreateWallpaperDelegate() override; | 40 std::unique_ptr<WallpaperDelegate> CreateWallpaperDelegate() override; |
47 SessionStateDelegate* CreateSessionStateDelegate() override; | 41 SessionStateDelegate* CreateSessionStateDelegate() override; |
48 AccessibilityDelegate* CreateAccessibilityDelegate() override; | 42 AccessibilityDelegate* CreateAccessibilityDelegate() override; |
49 std::unique_ptr<PaletteDelegate> CreatePaletteDelegate() override; | 43 std::unique_ptr<PaletteDelegate> CreatePaletteDelegate() override; |
50 ui::MenuModel* CreateContextMenu(WmShelf* wm_shelf, | 44 ui::MenuModel* CreateContextMenu(WmShelf* wm_shelf, |
51 const ShelfItem* item) override; | 45 const ShelfItem* item) override; |
52 GPUSupport* CreateGPUSupport() override; | 46 GPUSupport* CreateGPUSupport() override; |
53 base::string16 GetProductName() const override; | 47 base::string16 GetProductName() const override; |
54 gfx::Image GetDeprecatedAcceleratorImage() const override; | 48 gfx::Image GetDeprecatedAcceleratorImage() const override; |
55 bool IsTouchscreenEnabledInPrefs(bool use_local_state) const override; | 49 bool IsTouchscreenEnabledInPrefs(bool use_local_state) const override; |
56 void SetTouchscreenEnabledInPrefs(bool enabled, | 50 void SetTouchscreenEnabledInPrefs(bool enabled, |
57 bool use_local_state) override; | 51 bool use_local_state) override; |
58 void UpdateTouchscreenStatusFromPrefs() override; | 52 void UpdateTouchscreenStatusFromPrefs() override; |
59 | 53 |
60 private: | 54 private: |
61 ShelfDelegate* shelf_delegate_; | 55 ShelfDelegate* shelf_delegate_ = nullptr; |
62 std::unique_ptr<app_list::AppListPresenterDelegateFactory> | |
63 app_list_presenter_delegate_factory_; | |
64 std::unique_ptr<app_list::AppListPresenterImpl> app_list_presenter_; | |
65 | 56 |
66 DISALLOW_COPY_AND_ASSIGN(ShellDelegateImpl); | 57 DISALLOW_COPY_AND_ASSIGN(ShellDelegateImpl); |
67 }; | 58 }; |
68 | 59 |
69 } // namespace shell | 60 } // namespace shell |
70 } // namespace ash | 61 } // namespace ash |
71 | 62 |
72 #endif // ASH_SHELL_SHELL_DELEGATE_IMPL_H_ | 63 #endif // ASH_SHELL_SHELL_DELEGATE_IMPL_H_ |
OLD | NEW |