shell_delegate_impl.h revision 1e9bf3e0803691d0a228da41fc608347b6db4340
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.
4
5#ifndef ASH_SHELL_SHELL_DELEGATE_IMPL_H_
6#define ASH_SHELL_SHELL_DELEGATE_IMPL_H_
7
8#include <string>
9
10#include "ash/shell_delegate.h"
11#include "base/compiler_specific.h"
12
13namespace keyboard {
14class KeyboardControllerProxy;
15}
16
17namespace ash {
18namespace shell {
19
20class LauncherDelegateImpl;
21class WindowWatcher;
22
23class ShellDelegateImpl : public ash::ShellDelegate {
24 public:
25  ShellDelegateImpl();
26  virtual ~ShellDelegateImpl();
27
28  void SetWatcher(WindowWatcher* watcher);
29
30  virtual bool IsFirstRunAfterBoot() const OVERRIDE;
31  virtual bool IsMultiProfilesEnabled() const OVERRIDE;
32  virtual bool IsRunningInForcedAppMode() const OVERRIDE;
33  virtual void PreInit() OVERRIDE;
34  virtual void Shutdown() OVERRIDE;
35  virtual void Exit() OVERRIDE;
36  virtual keyboard::KeyboardControllerProxy*
37      CreateKeyboardControllerProxy() OVERRIDE;
38  virtual content::BrowserContext* GetCurrentBrowserContext() OVERRIDE;
39  virtual app_list::AppListViewDelegate* CreateAppListViewDelegate() OVERRIDE;
40  virtual ash::LauncherDelegate* CreateLauncherDelegate(
41      ash::LauncherModel* model) OVERRIDE;
42  virtual ash::SystemTrayDelegate* CreateSystemTrayDelegate() OVERRIDE;
43  virtual ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() OVERRIDE;
44  virtual ash::CapsLockDelegate* CreateCapsLockDelegate() OVERRIDE;
45  virtual ash::SessionStateDelegate* CreateSessionStateDelegate() OVERRIDE;
46  virtual ash::AccessibilityDelegate* CreateAccessibilityDelegate() OVERRIDE;
47  virtual ash::NewWindowDelegate* CreateNewWindowDelegate() OVERRIDE;
48  virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE;
49  virtual void RecordUserMetricsAction(UserMetricsAction action) OVERRIDE;
50  virtual void HandleMediaNextTrack() OVERRIDE;
51  virtual void HandleMediaPlayPause() OVERRIDE;
52  virtual void HandleMediaPrevTrack() OVERRIDE;
53  virtual ui::MenuModel* CreateContextMenu(
54      aura::Window* root_window) OVERRIDE;
55  virtual RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE;
56  virtual base::string16 GetProductName() const OVERRIDE;
57
58 private:
59  // Used to update Launcher. Owned by main.
60  WindowWatcher* watcher_;
61
62  LauncherDelegateImpl* launcher_delegate_;
63
64  DISALLOW_COPY_AND_ASSIGN(ShellDelegateImpl);
65};
66
67}  // namespace shell
68}  // namespace ash
69
70#endif  // ASH_SHELL_SHELL_DELEGATE_IMPL_H_
71