OLD | NEW |
---|---|
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_H_ | 5 #ifndef ASH_SHELL_H_ |
6 #define ASH_SHELL_H_ | 6 #define ASH_SHELL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
90 // | 90 // |
91 // Upon creation, the Shell sets itself as the RootWindow's delegate, which | 91 // Upon creation, the Shell sets itself as the RootWindow's delegate, which |
92 // takes ownership of the Shell. | 92 // takes ownership of the Shell. |
93 class ASH_EXPORT Shell { | 93 class ASH_EXPORT Shell { |
94 public: | 94 public: |
95 enum Direction { | 95 enum Direction { |
96 FORWARD, | 96 FORWARD, |
97 BACKWARD | 97 BACKWARD |
98 }; | 98 }; |
99 | 99 |
100 enum LoginStatus { | |
sky
2012/04/18 16:03:31
Move this into it's own file so that folks don't n
Jun Mukai
2012/04/19 06:19:25
used system/user/login_status instead, as sadrul s
| |
101 NOT_LOGGED_IN, | |
102 LOGGED_IN, | |
Daniel Erat
2012/04/18 16:50:42
It'd probably be clearer to name this LOGGED_IN_AS
| |
103 LOGGED_IN_AS_GUEST, | |
104 }; | |
sadrul
2012/04/18 16:53:20
Can you please use ash::user::LoginStatus instead?
Jun Mukai
2012/04/19 06:19:25
Done.
| |
105 | |
100 // Accesses private data from a Shell for testing. | 106 // Accesses private data from a Shell for testing. |
101 class ASH_EXPORT TestApi { | 107 class ASH_EXPORT TestApi { |
102 public: | 108 public: |
103 explicit TestApi(Shell* shell); | 109 explicit TestApi(Shell* shell); |
104 | 110 |
105 internal::RootWindowLayoutManager* root_window_layout(); | 111 internal::RootWindowLayoutManager* root_window_layout(); |
106 internal::InputMethodEventFilter* input_method_event_filter(); | 112 internal::InputMethodEventFilter* input_method_event_filter(); |
107 internal::SystemGestureEventFilter* system_gesture_event_filter(); | 113 internal::SystemGestureEventFilter* system_gesture_event_filter(); |
108 internal::WorkspaceController* workspace_controller(); | 114 internal::WorkspaceController* workspace_controller(); |
109 | 115 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
166 // Rotates focus through containers that can receive focus. | 172 // Rotates focus through containers that can receive focus. |
167 void RotateFocus(Direction direction); | 173 void RotateFocus(Direction direction); |
168 | 174 |
169 // Sets the work area insets of the monitor that contains |window|, | 175 // Sets the work area insets of the monitor that contains |window|, |
170 // this notifies observers too. | 176 // this notifies observers too. |
171 // TODO(sky): this no longer really replicates what happens and is unreliable. | 177 // TODO(sky): this no longer really replicates what happens and is unreliable. |
172 // Remove this. | 178 // Remove this. |
173 void SetMonitorWorkAreaInsets(aura::Window* window, | 179 void SetMonitorWorkAreaInsets(aura::Window* window, |
174 const gfx::Insets& insets); | 180 const gfx::Insets& insets); |
175 | 181 |
182 // Called when the user logs in. | |
183 void OnLoginStateChanged(LoginStatus status); | |
184 | |
185 // Called when the application is exiting. | |
186 void OnAppTerminating(); | |
187 | |
188 // Called when the screen is locked (after the lock window is visible) or | |
189 // unlocked. | |
190 void OnLockStateChanged(bool locked); | |
191 | |
176 // Initializes |launcher_|. Does nothing if it's already initialized. | 192 // Initializes |launcher_|. Does nothing if it's already initialized. |
177 void CreateLauncher(); | 193 void CreateLauncher(); |
178 | 194 |
179 // Adds/removes observer. | 195 // Adds/removes observer. |
180 void AddShellObserver(ShellObserver* observer); | 196 void AddShellObserver(ShellObserver* observer); |
181 void RemoveShellObserver(ShellObserver* observer); | 197 void RemoveShellObserver(ShellObserver* observer); |
182 | 198 |
183 #if !defined(OS_MACOSX) | 199 #if !defined(OS_MACOSX) |
184 AcceleratorController* accelerator_controller() { | 200 AcceleratorController* accelerator_controller() { |
185 return accelerator_controller_.get(); | 201 return accelerator_controller_.get(); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
359 | 375 |
360 // Used by ash/shell. | 376 // Used by ash/shell. |
361 content::BrowserContext* browser_context_; | 377 content::BrowserContext* browser_context_; |
362 | 378 |
363 DISALLOW_COPY_AND_ASSIGN(Shell); | 379 DISALLOW_COPY_AND_ASSIGN(Shell); |
364 }; | 380 }; |
365 | 381 |
366 } // namespace ash | 382 } // namespace ash |
367 | 383 |
368 #endif // ASH_SHELL_H_ | 384 #endif // ASH_SHELL_H_ |
OLD | NEW |