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

Side by Side Diff: ash/shell.h

Issue 9616045: Aura/Ash split: Move ScreenAura to ash::ScreenAsh. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use a separate aura::TestScreen in tests instead, partially reverting to patchset 2 Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « ash/screen_ash.cc ('k') | ash/shell.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_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>
11 11
12 #include "ash/ash_export.h" 12 #include "ash/ash_export.h"
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/gtest_prod_util.h" 15 #include "base/gtest_prod_util.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "base/observer_list.h"
17 #include "ui/gfx/size.h" 18 #include "ui/gfx/size.h"
19 #include "ui/gfx/insets.h"
18 20
19 class CommandLine; 21 class CommandLine;
20 22
21 namespace aura { 23 namespace aura {
22 class EventFilter; 24 class EventFilter;
23 class RootWindow; 25 class RootWindow;
24 class Window; 26 class Window;
25 } 27 }
26 namespace gfx { 28 namespace gfx {
27 class Point; 29 class Point;
28 class Rect; 30 class Rect;
29 } 31 }
30 namespace ui { 32 namespace ui {
31 class Layer; 33 class Layer;
32 } 34 }
33 namespace views { 35 namespace views {
34 class NonClientFrameView; 36 class NonClientFrameView;
35 class Widget; 37 class Widget;
36 } 38 }
37 39
38 namespace ash { 40 namespace ash {
39 41
40 class AcceleratorController; 42 class AcceleratorController;
41 class AudioController; 43 class AudioController;
42 class BrightnessController; 44 class BrightnessController;
43 class Launcher; 45 class Launcher;
44 class NestedDispatcherController; 46 class NestedDispatcherController;
45 class PowerButtonController; 47 class PowerButtonController;
46 class PowerStatusController; 48 class PowerStatusController;
49 class ScreenAsh;
47 class ShellDelegate; 50 class ShellDelegate;
51 class ShellObserver;
48 class SystemTrayDelegate; 52 class SystemTrayDelegate;
49 class SystemTray; 53 class SystemTray;
50 class VideoDetector; 54 class VideoDetector;
51 class WindowCycleController; 55 class WindowCycleController;
52 56
53 namespace internal { 57 namespace internal {
54 class ActivationController; 58 class ActivationController;
55 class AcceleratorFilter; 59 class AcceleratorFilter;
56 class AppList; 60 class AppList;
57 class DragDropController; 61 class DragDropController;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 bool IsModalWindowOpen() const; 148 bool IsModalWindowOpen() const;
145 149
146 // Creates a default views::NonClientFrameView for use by windows in the 150 // Creates a default views::NonClientFrameView for use by windows in the
147 // Ash environment. 151 // Ash environment.
148 views::NonClientFrameView* CreateDefaultNonClientFrameView( 152 views::NonClientFrameView* CreateDefaultNonClientFrameView(
149 views::Widget* widget); 153 views::Widget* widget);
150 154
151 // Rotate focus through containers that can receive focus. 155 // Rotate focus through containers that can receive focus.
152 void RotateFocus(Direction direction); 156 void RotateFocus(Direction direction);
153 157
158 // Sets the screen's work area insets, this notifies observers too.
159 void SetScreenWorkAreaInsets(const gfx::Insets& insets);
160
161 // Add/remove observer.
162 void AddShellObserver(ShellObserver* observer);
163 void RemoveShellObserver(ShellObserver* observer);
164
154 #if !defined(OS_MACOSX) 165 #if !defined(OS_MACOSX)
155 AcceleratorController* accelerator_controller() { 166 AcceleratorController* accelerator_controller() {
156 return accelerator_controller_.get(); 167 return accelerator_controller_.get();
157 } 168 }
158 #endif // !defined(OS_MACOSX) 169 #endif // !defined(OS_MACOSX)
159 170
160 internal::RootWindowEventFilter* root_filter() { 171 internal::RootWindowEventFilter* root_filter() {
161 return root_filter_; 172 return root_filter_;
162 } 173 }
163 internal::TooltipController* tooltip_controller() { 174 internal::TooltipController* tooltip_controller() {
(...skipping 22 matching lines...) Expand all
186 } 197 }
187 PowerStatusController* power_status_controller() const { 198 PowerStatusController* power_status_controller() const {
188 return power_status_controller_; 199 return power_status_controller_;
189 } 200 }
190 201
191 ShellDelegate* delegate() { return delegate_.get(); } 202 ShellDelegate* delegate() { return delegate_.get(); }
192 SystemTrayDelegate* tray_delegate() { return tray_delegate_.get(); } 203 SystemTrayDelegate* tray_delegate() { return tray_delegate_.get(); }
193 204
194 Launcher* launcher() { return launcher_.get(); } 205 Launcher* launcher() { return launcher_.get(); }
195 206
207 const ScreenAsh* screen() { return screen_; }
208
196 internal::ShelfLayoutManager* shelf() const { return shelf_; } 209 internal::ShelfLayoutManager* shelf() const { return shelf_; }
197 210
198 SystemTray* tray() const { return tray_.get(); } 211 SystemTray* tray() const { return tray_.get(); }
199 212
200 static void set_initially_hide_cursor(bool hide) { 213 static void set_initially_hide_cursor(bool hide) {
201 initially_hide_cursor_ = hide; 214 initially_hide_cursor_ = hide;
202 } 215 }
203 216
204 // Made available for tests. 217 // Made available for tests.
205 internal::ShadowController* shadow_controller() { 218 internal::ShadowController* shadow_controller() {
(...skipping 17 matching lines...) Expand all
223 // Disables the workspace grid layout. 236 // Disables the workspace grid layout.
224 void DisableWorkspaceGridLayout(); 237 void DisableWorkspaceGridLayout();
225 238
226 static Shell* instance_; 239 static Shell* instance_;
227 240
228 // If set before the Shell is initialized, the mouse cursor will be hidden 241 // If set before the Shell is initialized, the mouse cursor will be hidden
229 // when the screen is initially created. 242 // when the screen is initially created.
230 static bool initially_hide_cursor_; 243 static bool initially_hide_cursor_;
231 244
232 scoped_ptr<aura::RootWindow> root_window_; 245 scoped_ptr<aura::RootWindow> root_window_;
246 ScreenAsh* screen_;
233 247
234 internal::RootWindowEventFilter* root_filter_; // not owned 248 internal::RootWindowEventFilter* root_filter_; // not owned
235 249
236 std::vector<WindowAndBoundsPair> to_restore_; 250 std::vector<WindowAndBoundsPair> to_restore_;
237 251
238 #if !defined(OS_MACOSX) 252 #if !defined(OS_MACOSX)
239 scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_; 253 scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_;
240 254
241 scoped_ptr<AcceleratorController> accelerator_controller_; 255 scoped_ptr<AcceleratorController> accelerator_controller_;
242 #endif // !defined(OS_MACOSX) 256 #endif // !defined(OS_MACOSX)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 #if !defined(OS_MACOSX) 290 #if !defined(OS_MACOSX)
277 // An event filter that pre-handles global accelerators. 291 // An event filter that pre-handles global accelerators.
278 scoped_ptr<internal::AcceleratorFilter> accelerator_filter_; 292 scoped_ptr<internal::AcceleratorFilter> accelerator_filter_;
279 #endif 293 #endif
280 294
281 // The shelf for managing the launcher and the status widget in non-compact 295 // The shelf for managing the launcher and the status widget in non-compact
282 // mode. Shell does not own the shelf. Instead, it is owned by container of 296 // mode. Shell does not own the shelf. Instead, it is owned by container of
283 // the status area. 297 // the status area.
284 internal::ShelfLayoutManager* shelf_; 298 internal::ShelfLayoutManager* shelf_;
285 299
300 ObserverList<ShellObserver> observers_;
301
286 // Can change at runtime. 302 // Can change at runtime.
287 BackgroundMode desktop_background_mode_; 303 BackgroundMode desktop_background_mode_;
288 304
289 // Owned by aura::RootWindow, cached here for type safety. 305 // Owned by aura::RootWindow, cached here for type safety.
290 internal::RootWindowLayoutManager* root_window_layout_; 306 internal::RootWindowLayoutManager* root_window_layout_;
291 307
292 // Status area with clock, Wi-Fi signal, etc. 308 // Status area with clock, Wi-Fi signal, etc.
293 views::Widget* status_widget_; 309 views::Widget* status_widget_;
294 310
295 // System tray with clock, Wi-Fi signal, etc. (a replacement in progress for 311 // System tray with clock, Wi-Fi signal, etc. (a replacement in progress for
296 // |status_widget_|). 312 // |status_widget_|).
297 scoped_ptr<SystemTray> tray_; 313 scoped_ptr<SystemTray> tray_;
298 314
299 DISALLOW_COPY_AND_ASSIGN(Shell); 315 DISALLOW_COPY_AND_ASSIGN(Shell);
300 }; 316 };
301 317
302 } // namespace ash 318 } // namespace ash
303 319
304 #endif // ASH_SHELL_H_ 320 #endif // ASH_SHELL_H_
OLDNEW
« no previous file with comments | « ash/screen_ash.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698