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_
10 #include "ash/launcher/launcher_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 "content/public/browser/notification_observer.h"
16 #include "content/public/browser/notification_registrar.h"
21 class ShelfItemDelegate
;
29 class KeyboardControllerProxy
;
32 #if defined(OS_CHROMEOS)
34 class DisplayConfigurationObserver
;
38 class ChromeLauncherController
;
40 class ChromeShellDelegate
: public ash::ShellDelegate
,
41 public content::NotificationObserver
{
43 ChromeShellDelegate();
44 virtual ~ChromeShellDelegate();
46 static ChromeShellDelegate
* instance() { return instance_
; }
48 // ash::ShellDelegate overrides;
49 virtual bool IsFirstRunAfterBoot() const OVERRIDE
;
50 virtual bool IsMultiProfilesEnabled() const OVERRIDE
;
51 virtual bool IsIncognitoAllowed() const OVERRIDE
;
52 virtual bool IsRunningInForcedAppMode() const OVERRIDE
;
53 virtual void PreInit() OVERRIDE
;
54 virtual void Shutdown() OVERRIDE
;
55 virtual void Exit() OVERRIDE
;
56 virtual keyboard::KeyboardControllerProxy
*
57 CreateKeyboardControllerProxy() OVERRIDE
;
58 virtual content::BrowserContext
* GetActiveBrowserContext() OVERRIDE
;
59 virtual app_list::AppListViewDelegate
* CreateAppListViewDelegate() OVERRIDE
;
60 virtual ash::ShelfDelegate
* CreateShelfDelegate(
61 ash::ShelfModel
* model
) OVERRIDE
;
62 virtual ash::SystemTrayDelegate
* CreateSystemTrayDelegate() OVERRIDE
;
63 virtual ash::UserWallpaperDelegate
* CreateUserWallpaperDelegate() OVERRIDE
;
64 virtual ash::CapsLockDelegate
* CreateCapsLockDelegate() OVERRIDE
;
65 virtual ash::SessionStateDelegate
* CreateSessionStateDelegate() OVERRIDE
;
66 virtual ash::AccessibilityDelegate
* CreateAccessibilityDelegate() OVERRIDE
;
67 virtual ash::NewWindowDelegate
* CreateNewWindowDelegate() OVERRIDE
;
68 virtual ash::MediaDelegate
* CreateMediaDelegate() OVERRIDE
;
69 virtual aura::client::UserActionClient
* CreateUserActionClient() OVERRIDE
;
70 virtual ui::MenuModel
* CreateContextMenu(
72 ash::ShelfItemDelegate
* item_delegate
,
73 ash::LauncherItem
* item
) OVERRIDE
;
74 virtual ash::WindowTreeHostFactory
* CreateWindowTreeHostFactory() OVERRIDE
;
75 virtual base::string16
GetProductName() const OVERRIDE
;
77 // content::NotificationObserver override:
78 virtual void Observe(int type
,
79 const content::NotificationSource
& source
,
80 const content::NotificationDetails
& details
) OVERRIDE
;
85 static ChromeShellDelegate
* instance_
;
87 content::NotificationRegistrar registrar_
;
89 ChromeLauncherController
* shelf_delegate_
;
91 #if defined(OS_CHROMEOS)
92 scoped_ptr
<chromeos::DisplayConfigurationObserver
>
93 display_configuration_observer_
;
96 DISALLOW_COPY_AND_ASSIGN(ChromeShellDelegate
);
99 #endif // CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_