shell_delegate_impl.h revision 90dce4d38c5ff5333bea97d859d4e484e27edf0c
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 void NewTab() OVERRIDE; 37 virtual void NewWindow(bool incognito) OVERRIDE; 38 virtual void ToggleFullscreen() OVERRIDE; 39 virtual void ToggleMaximized() OVERRIDE; 40 virtual void OpenFileManager(bool as_dialog) OVERRIDE; 41 virtual void OpenCrosh() OVERRIDE; 42 virtual void RestoreTab() OVERRIDE; 43 virtual void ShowKeyboardOverlay() OVERRIDE; 44 virtual keyboard::KeyboardControllerProxy* 45 CreateKeyboardControllerProxy() OVERRIDE; 46 virtual void ShowTaskManager() OVERRIDE; 47 virtual content::BrowserContext* GetCurrentBrowserContext() OVERRIDE; 48 virtual void ToggleSpokenFeedback( 49 AccessibilityNotificationVisibility notify) OVERRIDE; 50 virtual bool IsSpokenFeedbackEnabled() const OVERRIDE; 51 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; 57 virtual bool ShouldAlwaysShowAccessibilityMenu() const OVERRIDE; 58 virtual void SilenceSpokenFeedback() const OVERRIDE; 59 virtual app_list::AppListViewDelegate* CreateAppListViewDelegate() OVERRIDE; 60 virtual ash::LauncherDelegate* CreateLauncherDelegate( 61 ash::LauncherModel* 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 aura::client::UserActionClient* CreateUserActionClient() OVERRIDE; 67 virtual void OpenFeedbackPage() OVERRIDE; 68 virtual void RecordUserMetricsAction(UserMetricsAction action) OVERRIDE; 69 virtual void HandleMediaNextTrack() OVERRIDE; 70 virtual void HandleMediaPlayPause() OVERRIDE; 71 virtual void HandleMediaPrevTrack() OVERRIDE; 72 virtual base::string16 GetTimeRemainingString(base::TimeDelta delta) OVERRIDE; 73 virtual base::string16 GetTimeDurationLongString( 74 base::TimeDelta delta) OVERRIDE; 75 virtual void SaveScreenMagnifierScale(double scale) OVERRIDE; 76 virtual double GetSavedScreenMagnifierScale() OVERRIDE; 77 virtual ui::MenuModel* CreateContextMenu( 78 aura::RootWindow* root_window) OVERRIDE; 79 virtual RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE; 80 virtual base::string16 GetProductName() const OVERRIDE; 81 82 private: 83 // Used to update Launcher. Owned by main. 84 WindowWatcher* watcher_; 85 86 LauncherDelegateImpl* launcher_delegate_; 87 88 bool spoken_feedback_enabled_; 89 bool high_contrast_enabled_; 90 bool screen_magnifier_enabled_; 91 MagnifierType screen_magnifier_type_; 92 93 DISALLOW_COPY_AND_ASSIGN(ShellDelegateImpl); 94}; 95 96} // namespace shell 97} // namespace ash 98 99#endif // ASH_SHELL_SHELL_DELEGATE_IMPL_H_ 100