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 <string> | 8 #include <string> |
9 | 9 |
10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 class BrowserContext; | 14 class BrowserContext; |
15 } | 15 } |
16 | 16 |
17 namespace keyboard { | 17 namespace keyboard { |
18 class KeyboardControllerProxy; | 18 class KeyboardControllerProxy; |
19 } | 19 } |
20 | 20 |
21 namespace ash { | 21 namespace ash { |
22 namespace shell { | 22 namespace shell { |
23 | 23 |
24 class ShelfDelegateImpl; | 24 class ShelfDelegateImpl; |
25 class WindowWatcher; | 25 class WindowWatcher; |
26 | 26 |
27 class ShellDelegateImpl : public ash::ShellDelegate { | 27 class ShellDelegateImpl : public ash::ShellDelegate { |
28 public: | 28 public: |
29 ShellDelegateImpl(); | 29 ShellDelegateImpl(); |
30 virtual ~ShellDelegateImpl(); | 30 ~ShellDelegateImpl() override; |
31 | 31 |
32 void SetWatcher(WindowWatcher* watcher); | 32 void SetWatcher(WindowWatcher* watcher); |
33 void set_browser_context(content::BrowserContext* browser_context) { | 33 void set_browser_context(content::BrowserContext* browser_context) { |
34 browser_context_ = browser_context; | 34 browser_context_ = browser_context; |
35 } | 35 } |
36 | 36 |
37 virtual bool IsFirstRunAfterBoot() const override; | 37 bool IsFirstRunAfterBoot() const override; |
38 virtual bool IsIncognitoAllowed() const override; | 38 bool IsIncognitoAllowed() const override; |
39 virtual bool IsMultiProfilesEnabled() const override; | 39 bool IsMultiProfilesEnabled() const override; |
40 virtual bool IsRunningInForcedAppMode() const override; | 40 bool IsRunningInForcedAppMode() const override; |
41 virtual bool IsMultiAccountEnabled() const override; | 41 bool IsMultiAccountEnabled() const override; |
42 virtual void PreInit() override; | 42 void PreInit() override; |
43 virtual void PreShutdown() override; | 43 void PreShutdown() override; |
44 virtual void Exit() override; | 44 void Exit() override; |
45 virtual keyboard::KeyboardControllerProxy* | 45 keyboard::KeyboardControllerProxy* CreateKeyboardControllerProxy() override; |
46 CreateKeyboardControllerProxy() override; | 46 void VirtualKeyboardActivated(bool activated) override; |
47 virtual void VirtualKeyboardActivated(bool activated) override; | 47 void AddVirtualKeyboardStateObserver( |
48 virtual void AddVirtualKeyboardStateObserver( | |
49 VirtualKeyboardStateObserver* observer) override; | 48 VirtualKeyboardStateObserver* observer) override; |
50 virtual void RemoveVirtualKeyboardStateObserver( | 49 void RemoveVirtualKeyboardStateObserver( |
51 VirtualKeyboardStateObserver* observer) override; | 50 VirtualKeyboardStateObserver* observer) override; |
52 virtual content::BrowserContext* GetActiveBrowserContext() override; | 51 content::BrowserContext* GetActiveBrowserContext() override; |
53 virtual app_list::AppListViewDelegate* GetAppListViewDelegate() override; | 52 app_list::AppListViewDelegate* GetAppListViewDelegate() override; |
54 virtual ShelfDelegate* CreateShelfDelegate(ShelfModel* model) override; | 53 ShelfDelegate* CreateShelfDelegate(ShelfModel* model) override; |
55 virtual ash::SystemTrayDelegate* CreateSystemTrayDelegate() override; | 54 ash::SystemTrayDelegate* CreateSystemTrayDelegate() override; |
56 virtual ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() override; | 55 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() override; |
57 virtual ash::SessionStateDelegate* CreateSessionStateDelegate() override; | 56 ash::SessionStateDelegate* CreateSessionStateDelegate() override; |
58 virtual ash::AccessibilityDelegate* CreateAccessibilityDelegate() override; | 57 ash::AccessibilityDelegate* CreateAccessibilityDelegate() override; |
59 virtual ash::NewWindowDelegate* CreateNewWindowDelegate() override; | 58 ash::NewWindowDelegate* CreateNewWindowDelegate() override; |
60 virtual ash::MediaDelegate* CreateMediaDelegate() override; | 59 ash::MediaDelegate* CreateMediaDelegate() override; |
61 virtual ui::MenuModel* CreateContextMenu( | 60 ui::MenuModel* CreateContextMenu(aura::Window* root_window, |
62 aura::Window* root_window, | 61 ash::ShelfItemDelegate* item_delegate, |
63 ash::ShelfItemDelegate* item_delegate, | 62 ash::ShelfItem* item) override; |
64 ash::ShelfItem* item) override; | 63 GPUSupport* CreateGPUSupport() override; |
65 virtual GPUSupport* CreateGPUSupport() override; | 64 base::string16 GetProductName() const override; |
66 virtual base::string16 GetProductName() const override; | |
67 | 65 |
68 private: | 66 private: |
69 // Used to update Launcher. Owned by main. | 67 // Used to update Launcher. Owned by main. |
70 WindowWatcher* watcher_; | 68 WindowWatcher* watcher_; |
71 | 69 |
72 ShelfDelegateImpl* shelf_delegate_; | 70 ShelfDelegateImpl* shelf_delegate_; |
73 content::BrowserContext* browser_context_; | 71 content::BrowserContext* browser_context_; |
74 scoped_ptr<app_list::AppListViewDelegate> app_list_view_delegate_; | 72 scoped_ptr<app_list::AppListViewDelegate> app_list_view_delegate_; |
75 | 73 |
76 DISALLOW_COPY_AND_ASSIGN(ShellDelegateImpl); | 74 DISALLOW_COPY_AND_ASSIGN(ShellDelegateImpl); |
77 }; | 75 }; |
78 | 76 |
79 } // namespace shell | 77 } // namespace shell |
80 } // namespace ash | 78 } // namespace ash |
81 | 79 |
82 #endif // ASH_SHELL_SHELL_DELEGATE_IMPL_H_ | 80 #endif // ASH_SHELL_SHELL_DELEGATE_IMPL_H_ |
OLD | NEW |