shell_delegate_impl.h revision 1320f92c476a1ad9d19dba2a48c72b75566198e9
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 content { 14class BrowserContext; 15} 16 17namespace keyboard { 18class KeyboardControllerProxy; 19} 20 21namespace ash { 22namespace shell { 23 24class ShelfDelegateImpl; 25class WindowWatcher; 26 27class ShellDelegateImpl : public ash::ShellDelegate { 28 public: 29 ShellDelegateImpl(); 30 virtual ~ShellDelegateImpl(); 31 32 void SetWatcher(WindowWatcher* watcher); 33 void set_browser_context(content::BrowserContext* browser_context) { 34 browser_context_ = browser_context; 35 } 36 37 virtual bool IsFirstRunAfterBoot() const OVERRIDE; 38 virtual bool IsIncognitoAllowed() const OVERRIDE; 39 virtual bool IsMultiProfilesEnabled() const OVERRIDE; 40 virtual bool IsRunningInForcedAppMode() const OVERRIDE; 41 virtual bool IsMultiAccountEnabled() const OVERRIDE; 42 virtual void PreInit() OVERRIDE; 43 virtual void PreShutdown() OVERRIDE; 44 virtual void Exit() OVERRIDE; 45 virtual keyboard::KeyboardControllerProxy* 46 CreateKeyboardControllerProxy() OVERRIDE; 47 virtual void VirtualKeyboardActivated(bool activated) OVERRIDE; 48 virtual void AddVirtualKeyboardStateObserver( 49 VirtualKeyboardStateObserver* observer) OVERRIDE; 50 virtual void RemoveVirtualKeyboardStateObserver( 51 VirtualKeyboardStateObserver* observer) OVERRIDE; 52 virtual content::BrowserContext* GetActiveBrowserContext() OVERRIDE; 53 virtual app_list::AppListViewDelegate* GetAppListViewDelegate() OVERRIDE; 54 virtual ShelfDelegate* CreateShelfDelegate(ShelfModel* model) OVERRIDE; 55 virtual ash::SystemTrayDelegate* CreateSystemTrayDelegate() OVERRIDE; 56 virtual ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() OVERRIDE; 57 virtual ash::SessionStateDelegate* CreateSessionStateDelegate() OVERRIDE; 58 virtual ash::AccessibilityDelegate* CreateAccessibilityDelegate() OVERRIDE; 59 virtual ash::NewWindowDelegate* CreateNewWindowDelegate() OVERRIDE; 60 virtual ash::MediaDelegate* CreateMediaDelegate() OVERRIDE; 61 virtual ui::MenuModel* CreateContextMenu( 62 aura::Window* root_window, 63 ash::ShelfItemDelegate* item_delegate, 64 ash::ShelfItem* item) OVERRIDE; 65 virtual GPUSupport* CreateGPUSupport() OVERRIDE; 66 virtual base::string16 GetProductName() const OVERRIDE; 67 68 private: 69 // Used to update Launcher. Owned by main. 70 WindowWatcher* watcher_; 71 72 ShelfDelegateImpl* shelf_delegate_; 73 content::BrowserContext* browser_context_; 74 scoped_ptr<app_list::AppListViewDelegate> app_list_view_delegate_; 75 76 DISALLOW_COPY_AND_ASSIGN(ShellDelegateImpl); 77}; 78 79} // namespace shell 80} // namespace ash 81 82#endif // ASH_SHELL_SHELL_DELEGATE_IMPL_H_ 83