blob: 7a4e5d6f41d17d81fbc2a7ce5c9b06e8524bd04d [file] [log] [blame]
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001// 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
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +00008#include <string>
9
Torne (Richard Coles)58218062012-11-14 11:43:16 +000010#include "ash/shell_delegate.h"
11#include "base/compiler_specific.h"
12
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010013namespace keyboard {
14class KeyboardControllerProxy;
15}
16
Torne (Richard Coles)58218062012-11-14 11:43:16 +000017namespace 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
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000030 virtual bool IsFirstRunAfterBoot() const OVERRIDE;
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010031 virtual bool IsMultiProfilesEnabled() const OVERRIDE;
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000032 virtual bool IsRunningInForcedAppMode() const OVERRIDE;
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000033 virtual void PreInit() OVERRIDE;
Torne (Richard Coles)58218062012-11-14 11:43:16 +000034 virtual void Shutdown() OVERRIDE;
35 virtual void Exit() OVERRIDE;
36 virtual void NewTab() OVERRIDE;
37 virtual void NewWindow(bool incognito) OVERRIDE;
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010038 virtual void ToggleFullscreen() OVERRIDE;
Torne (Richard Coles)58218062012-11-14 11:43:16 +000039 virtual void ToggleMaximized() OVERRIDE;
40 virtual void OpenFileManager(bool as_dialog) OVERRIDE;
41 virtual void OpenCrosh() OVERRIDE;
Torne (Richard Coles)58218062012-11-14 11:43:16 +000042 virtual void RestoreTab() OVERRIDE;
Torne (Richard Coles)58218062012-11-14 11:43:16 +000043 virtual void ShowKeyboardOverlay() OVERRIDE;
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010044 virtual keyboard::KeyboardControllerProxy*
45 CreateKeyboardControllerProxy() OVERRIDE;
Torne (Richard Coles)58218062012-11-14 11:43:16 +000046 virtual void ShowTaskManager() OVERRIDE;
47 virtual content::BrowserContext* GetCurrentBrowserContext() OVERRIDE;
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000048 virtual void ToggleSpokenFeedback(
49 AccessibilityNotificationVisibility notify) OVERRIDE;
Torne (Richard Coles)58218062012-11-14 11:43:16 +000050 virtual bool IsSpokenFeedbackEnabled() const OVERRIDE;
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000051 virtual void ToggleHighContrast() OVERRIDE;
52 virtual bool IsHighContrastEnabled() const OVERRIDE;
53 virtual void SetMagnifierEnabled(bool enabled) OVERRIDE;
54 virtual void SetMagnifierType(MagnifierType type) OVERRIDE;
55 virtual bool IsMagnifierEnabled() const OVERRIDE;
56 virtual MagnifierType GetMagnifierType() const OVERRIDE;
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +010057 virtual void SetLargeCursorEnabled(bool enabled) OVERRIDE;
58 virtual bool IsLargeCursorEnabled() const OVERRIDE;
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000059 virtual bool ShouldAlwaysShowAccessibilityMenu() const OVERRIDE;
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010060 virtual void SilenceSpokenFeedback() const OVERRIDE;
Torne (Richard Coles)58218062012-11-14 11:43:16 +000061 virtual app_list::AppListViewDelegate* CreateAppListViewDelegate() OVERRIDE;
62 virtual ash::LauncherDelegate* CreateLauncherDelegate(
63 ash::LauncherModel* model) OVERRIDE;
64 virtual ash::SystemTrayDelegate* CreateSystemTrayDelegate() OVERRIDE;
65 virtual ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() OVERRIDE;
66 virtual ash::CapsLockDelegate* CreateCapsLockDelegate() OVERRIDE;
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010067 virtual ash::SessionStateDelegate* CreateSessionStateDelegate() OVERRIDE;
Torne (Richard Coles)58218062012-11-14 11:43:16 +000068 virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE;
69 virtual void OpenFeedbackPage() OVERRIDE;
70 virtual void RecordUserMetricsAction(UserMetricsAction action) OVERRIDE;
71 virtual void HandleMediaNextTrack() OVERRIDE;
72 virtual void HandleMediaPlayPause() OVERRIDE;
73 virtual void HandleMediaPrevTrack() OVERRIDE;
Torne (Richard Coles)58218062012-11-14 11:43:16 +000074 virtual void SaveScreenMagnifierScale(double scale) OVERRIDE;
75 virtual double GetSavedScreenMagnifierScale() OVERRIDE;
76 virtual ui::MenuModel* CreateContextMenu(
77 aura::RootWindow* root_window) OVERRIDE;
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000078 virtual RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE;
Torne (Richard Coles)c2e0dbd2013-05-09 18:35:53 +010079 virtual base::string16 GetProductName() const OVERRIDE;
Torne (Richard Coles)58218062012-11-14 11:43:16 +000080
81 private:
82 // Used to update Launcher. Owned by main.
83 WindowWatcher* watcher_;
84
85 LauncherDelegateImpl* launcher_delegate_;
86
Torne (Richard Coles)58218062012-11-14 11:43:16 +000087 bool spoken_feedback_enabled_;
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000088 bool high_contrast_enabled_;
89 bool screen_magnifier_enabled_;
90 MagnifierType screen_magnifier_type_;
Torne (Richard Coles)868fa2f2013-06-11 10:57:03 +010091 bool large_cursor_enabled_;
Torne (Richard Coles)58218062012-11-14 11:43:16 +000092
93 DISALLOW_COPY_AND_ASSIGN(ShellDelegateImpl);
94};
95
96} // namespace shell
97} // namespace ash
98
99#endif // ASH_SHELL_SHELL_DELEGATE_IMPL_H_