Elim cr-checkbox
[chromium-blink-merge.git] / chrome / browser / ui / ash / chrome_shell_delegate.h
blob001e2f50bcc17710b88e38e38828dbebfc12c9a1
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_
6 #define CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_
8 #include <string>
10 #include "ash/shelf/shelf_item_types.h"
11 #include "ash/shell_delegate.h"
12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/observer_list.h"
16 #include "chrome/browser/ui/ash/metrics/chrome_user_metrics_recorder.h"
17 #include "content/public/browser/notification_observer.h"
18 #include "content/public/browser/notification_registrar.h"
20 class Browser;
22 namespace ash {
23 class ShelfItemDelegate;
26 namespace content {
27 class WebContents;
30 namespace keyboard {
31 class KeyboardControllerProxy;
34 #if defined(OS_CHROMEOS)
35 namespace chromeos {
36 class DisplayConfigurationObserver;
38 #endif
40 class ChromeLauncherController;
42 class ChromeShellDelegate : public ash::ShellDelegate,
43 public content::NotificationObserver {
44 public:
45 ChromeShellDelegate();
46 ~ChromeShellDelegate() override;
48 static ChromeShellDelegate* instance() { return instance_; }
50 // ash::ShellDelegate overrides;
51 bool IsFirstRunAfterBoot() const override;
52 bool IsMultiProfilesEnabled() const override;
53 bool IsIncognitoAllowed() const override;
54 bool IsRunningInForcedAppMode() const override;
55 bool IsMultiAccountEnabled() const override;
56 bool IsForceMaximizeOnFirstRun() const override;
57 void PreInit() override;
58 void PreShutdown() override;
59 void Exit() override;
60 keyboard::KeyboardControllerProxy* CreateKeyboardControllerProxy() override;
61 void VirtualKeyboardActivated(bool activated) override;
62 void AddVirtualKeyboardStateObserver(
63 ash::VirtualKeyboardStateObserver* observer) override;
64 void RemoveVirtualKeyboardStateObserver(
65 ash::VirtualKeyboardStateObserver* observer) override;
66 content::BrowserContext* GetActiveBrowserContext() override;
67 app_list::AppListViewDelegate* GetAppListViewDelegate() override;
68 ash::ShelfDelegate* CreateShelfDelegate(ash::ShelfModel* model) override;
69 ash::SystemTrayDelegate* CreateSystemTrayDelegate() override;
70 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() override;
71 ash::SessionStateDelegate* CreateSessionStateDelegate() override;
72 ash::AccessibilityDelegate* CreateAccessibilityDelegate() override;
73 ash::NewWindowDelegate* CreateNewWindowDelegate() override;
74 ash::MediaDelegate* CreateMediaDelegate() override;
75 ui::MenuModel* CreateContextMenu(aura::Window* root,
76 ash::ShelfItemDelegate* item_delegate,
77 ash::ShelfItem* item) override;
78 ash::GPUSupport* CreateGPUSupport() override;
79 base::string16 GetProductName() const override;
80 void OpenKeyboardShortcutHelpPage() const override;
81 gfx::Image GetDeprecatedAcceleratorImage() const override;
83 // content::NotificationObserver override:
84 void Observe(int type,
85 const content::NotificationSource& source,
86 const content::NotificationDetails& details) override;
88 private:
89 void PlatformInit();
91 static ChromeShellDelegate* instance_;
93 content::NotificationRegistrar registrar_;
95 ChromeLauncherController* shelf_delegate_;
97 base::ObserverList<ash::VirtualKeyboardStateObserver>
98 keyboard_state_observer_list_;
100 // Proxies events from chrome/browser to ash::UserMetricsRecorder.
101 scoped_ptr<ChromeUserMetricsRecorder> chrome_user_metrics_recorder_;
103 #if defined(OS_CHROMEOS)
104 scoped_ptr<chromeos::DisplayConfigurationObserver>
105 display_configuration_observer_;
106 #endif
108 DISALLOW_COPY_AND_ASSIGN(ChromeShellDelegate);
111 #endif // CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_