Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: ash/shell_delegate.h

Issue 14295008: Add ash SessionStateDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/shell/window_type_launcher.cc ('k') | ash/shell_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_SHELL_DELEGATE_H_ 5 #ifndef ASH_SHELL_DELEGATE_H_
6 #define ASH_SHELL_DELEGATE_H_ 6 #define ASH_SHELL_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 27 matching lines...) Expand all
38 class KeyboardControllerProxy; 38 class KeyboardControllerProxy;
39 } 39 }
40 40
41 namespace ash { 41 namespace ash {
42 42
43 class CapsLockDelegate; 43 class CapsLockDelegate;
44 class LauncherDelegate; 44 class LauncherDelegate;
45 class LauncherModel; 45 class LauncherModel;
46 struct LauncherItem; 46 struct LauncherItem;
47 class RootWindowHostFactory; 47 class RootWindowHostFactory;
48 class SessionStateDelegate;
48 class SystemTrayDelegate; 49 class SystemTrayDelegate;
49 class UserWallpaperDelegate; 50 class UserWallpaperDelegate;
50 51
51 enum UserMetricsAction { 52 enum UserMetricsAction {
52 UMA_ACCEL_KEYBOARD_BRIGHTNESS_DOWN_F6, 53 UMA_ACCEL_KEYBOARD_BRIGHTNESS_DOWN_F6,
53 UMA_ACCEL_KEYBOARD_BRIGHTNESS_UP_F7, 54 UMA_ACCEL_KEYBOARD_BRIGHTNESS_UP_F7,
54 UMA_ACCEL_LOCK_SCREEN_L, 55 UMA_ACCEL_LOCK_SCREEN_L,
55 UMA_ACCEL_LOCK_SCREEN_LOCK_BUTTON, 56 UMA_ACCEL_LOCK_SCREEN_LOCK_BUTTON,
56 UMA_ACCEL_LOCK_SCREEN_POWER_BUTTON, 57 UMA_ACCEL_LOCK_SCREEN_POWER_BUTTON,
57 UMA_ACCEL_MAXIMIZE_RESTORE_F4, 58 UMA_ACCEL_MAXIMIZE_RESTORE_F4,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 A11Y_NOTIFICATION_NONE, 92 A11Y_NOTIFICATION_NONE,
92 A11Y_NOTIFICATION_SHOW, 93 A11Y_NOTIFICATION_SHOW,
93 }; 94 };
94 95
95 // Delegate of the Shell. 96 // Delegate of the Shell.
96 class ASH_EXPORT ShellDelegate { 97 class ASH_EXPORT ShellDelegate {
97 public: 98 public:
98 // The Shell owns the delegate. 99 // The Shell owns the delegate.
99 virtual ~ShellDelegate() {} 100 virtual ~ShellDelegate() {}
100 101
101 // Returns true if user has logged in.
102 virtual bool IsUserLoggedIn() const = 0;
103
104 // Returns true if we're logged in and browser has been started
105 virtual bool IsSessionStarted() const = 0;
106
107 // Returns true if we're logged in as guest.
108 virtual bool IsGuestSession() const = 0;
109
110 // Returns true if this is the first time that the shell has been run after 102 // Returns true if this is the first time that the shell has been run after
111 // the system has booted. false is returned after the shell has been 103 // the system has booted. false is returned after the shell has been
112 // restarted, typically due to logging in as a guest or logging out. 104 // restarted, typically due to logging in as a guest or logging out.
113 virtual bool IsFirstRunAfterBoot() const = 0; 105 virtual bool IsFirstRunAfterBoot() const = 0;
114 106
115 // Returns true if multi-profiles feature is enabled. 107 // Returns true if multi-profiles feature is enabled.
116 virtual bool IsMultiProfilesEnabled() const = 0; 108 virtual bool IsMultiProfilesEnabled() const = 0;
117 109
118 // Returns true if we're running in forced app mode. 110 // Returns true if we're running in forced app mode.
119 virtual bool IsRunningInForcedAppMode() const = 0; 111 virtual bool IsRunningInForcedAppMode() const = 0;
120 112
121 // Returns true if a user is logged in whose session can be locked (i.e. the
122 // user has a password with which to unlock the session).
123 virtual bool CanLockScreen() const = 0;
124
125 // Invoked when a user locks the screen.
126 virtual void LockScreen() = 0;
127
128 // Unlock the screen. Currently used only for tests.
129 virtual void UnlockScreen() = 0;
130
131 // Returns true if the screen is currently locked.
132 virtual bool IsScreenLocked() const = 0;
133
134 // Called before processing |Shell::Init()| so that the delegate 113 // Called before processing |Shell::Init()| so that the delegate
135 // can perform tasks necessary before the shell is initialized. 114 // can perform tasks necessary before the shell is initialized.
136 virtual void PreInit() = 0; 115 virtual void PreInit() = 0;
137 116
138 // Shuts down the environment. 117 // Shuts down the environment.
139 virtual void Shutdown() = 0; 118 virtual void Shutdown() = 0;
140 119
141 // Invoked when the user uses Ctrl-Shift-Q to close chrome. 120 // Invoked when the user uses Ctrl-Shift-Q to close chrome.
142 virtual void Exit() = 0; 121 virtual void Exit() = 0;
143 122
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 198
220 // Creates a system-tray delegate. Shell takes ownership of the delegate. 199 // Creates a system-tray delegate. Shell takes ownership of the delegate.
221 virtual SystemTrayDelegate* CreateSystemTrayDelegate() = 0; 200 virtual SystemTrayDelegate* CreateSystemTrayDelegate() = 0;
222 201
223 // Creates a user wallpaper delegate. Shell takes ownership of the delegate. 202 // Creates a user wallpaper delegate. Shell takes ownership of the delegate.
224 virtual UserWallpaperDelegate* CreateUserWallpaperDelegate() = 0; 203 virtual UserWallpaperDelegate* CreateUserWallpaperDelegate() = 0;
225 204
226 // Creates a caps lock delegate. Shell takes ownership of the delegate. 205 // Creates a caps lock delegate. Shell takes ownership of the delegate.
227 virtual CapsLockDelegate* CreateCapsLockDelegate() = 0; 206 virtual CapsLockDelegate* CreateCapsLockDelegate() = 0;
228 207
208 // Creates a session state delegate. Shell takes ownership of the delegate.
209 virtual SessionStateDelegate* CreateSessionStateDelegate() = 0;
210
229 // Creates a user action client. Shell takes ownership of the object. 211 // Creates a user action client. Shell takes ownership of the object.
230 virtual aura::client::UserActionClient* CreateUserActionClient() = 0; 212 virtual aura::client::UserActionClient* CreateUserActionClient() = 0;
231 213
232 // Opens the feedback page for "Report Issue". 214 // Opens the feedback page for "Report Issue".
233 virtual void OpenFeedbackPage() = 0; 215 virtual void OpenFeedbackPage() = 0;
234 216
235 // Records that the user performed an action. 217 // Records that the user performed an action.
236 virtual void RecordUserMetricsAction(UserMetricsAction action) = 0; 218 virtual void RecordUserMetricsAction(UserMetricsAction action) = 0;
237 219
238 // Handles the Next Track Media shortcut key. 220 // Handles the Next Track Media shortcut key.
(...skipping 27 matching lines...) Expand all
266 // value. 248 // value.
267 virtual RootWindowHostFactory* CreateRootWindowHostFactory() = 0; 249 virtual RootWindowHostFactory* CreateRootWindowHostFactory() = 0;
268 250
269 // Get the product name. 251 // Get the product name.
270 virtual base::string16 GetProductName() const = 0; 252 virtual base::string16 GetProductName() const = 0;
271 }; 253 };
272 254
273 } // namespace ash 255 } // namespace ash
274 256
275 #endif // ASH_SHELL_DELEGATE_H_ 257 #endif // ASH_SHELL_DELEGATE_H_
OLDNEW
« no previous file with comments | « ash/shell/window_type_launcher.cc ('k') | ash/shell_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698