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 ASH_SHELL_DELEGATE_H_
6 #define ASH_SHELL_DELEGATE_H_
11 #include "ash/ash_export.h"
12 #include "ash/shell.h"
13 #include "base/callback.h"
14 #include "base/string16.h"
26 class AppListViewDelegate
;
27 class LauncherDelegate
;
30 class ScreenshotDelegate
;
32 class SystemTrayDelegate
;
33 class UserWallpaperDelegate
;
35 // Delegate of the Shell.
36 class ASH_EXPORT ShellDelegate
{
38 // The Shell owns the delegate.
39 virtual ~ShellDelegate() {}
41 // Returns true if user has logged in.
42 virtual bool IsUserLoggedIn() = 0;
44 // Invoked when a user locks the screen.
45 virtual void LockScreen() = 0;
47 // Unlock the screen. Currently used only for tests.
48 virtual void UnlockScreen() = 0;
50 // Returns true if the screen is currently locked.
51 virtual bool IsScreenLocked() const = 0;
53 // Invoked when a user uses Ctrl-M to open file manager.
54 virtual void OpenFileManager() = 0;
56 // Invoked when a user uses Ctrl-Shift-Q to close chrome.
57 virtual void Exit() = 0;
59 // Invoked when a user uses Ctrl-N or Ctrl-Shift-N to open a new window.
60 virtual void NewWindow(bool incognito
) = 0;
62 // Invoked to create an AppListViewDelegate. Shell takes the ownership of
63 // the created delegate.
64 virtual AppListViewDelegate
* CreateAppListViewDelegate() = 0;
66 // Invoked to start taking partial screenshot.
67 virtual void StartPartialScreenshot(
68 ScreenshotDelegate
* screenshot_delegate
) = 0;
70 // Creates a new LauncherDelegate. Shell takes ownership of the returned
72 virtual LauncherDelegate
* CreateLauncherDelegate(
73 ash::LauncherModel
* model
) = 0;
75 // Creates a system-tray delegate. Shell takes ownership of the delegate.
76 virtual SystemTrayDelegate
* CreateSystemTrayDelegate(SystemTray
* tray
) = 0;
78 // Creates a user wallpaper delegate. Shell takes ownership of the delegate.
79 virtual UserWallpaperDelegate
* CreateUserWallpaperDelegate() = 0;
84 #endif // ASH_SHELL_DELEGATE_H_