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 10 matching lines...) Expand all Loading... |
21 #include "ui/gfx/insets.h" | 21 #include "ui/gfx/insets.h" |
22 | 22 |
23 class CommandLine; | 23 class CommandLine; |
24 class SkBitmap; | 24 class SkBitmap; |
25 | 25 |
26 namespace aura { | 26 namespace aura { |
27 class EventFilter; | 27 class EventFilter; |
28 class Monitor; | 28 class Monitor; |
29 class RootWindow; | 29 class RootWindow; |
30 class Window; | 30 class Window; |
| 31 namespace shared { |
| 32 class InputMethodEventFilter; |
| 33 class RootWindowEventFilter; |
| 34 } |
31 } | 35 } |
32 namespace content { | 36 namespace content { |
33 class BrowserContext; | 37 class BrowserContext; |
34 } | 38 } |
35 | 39 |
36 namespace gfx { | 40 namespace gfx { |
37 class Point; | 41 class Point; |
38 class Rect; | 42 class Rect; |
39 } | 43 } |
40 namespace ui { | 44 namespace ui { |
(...skipping 20 matching lines...) Expand all Loading... |
61 class VideoDetector; | 65 class VideoDetector; |
62 class WindowCycleController; | 66 class WindowCycleController; |
63 | 67 |
64 namespace internal { | 68 namespace internal { |
65 class AcceleratorFilter; | 69 class AcceleratorFilter; |
66 class ActivationController; | 70 class ActivationController; |
67 class AppListController; | 71 class AppListController; |
68 class DragDropController; | 72 class DragDropController; |
69 class EventClientImpl; | 73 class EventClientImpl; |
70 class FocusCycler; | 74 class FocusCycler; |
71 class InputMethodEventFilter; | |
72 class KeyRewriterEventFilter; | 75 class KeyRewriterEventFilter; |
73 class MagnificationController; | 76 class MagnificationController; |
74 class MonitorController; | 77 class MonitorController; |
75 class PanelLayoutManager; | 78 class PanelLayoutManager; |
76 class PartialScreenshotEventFilter; | 79 class PartialScreenshotEventFilter; |
77 class ResizeShadowController; | 80 class ResizeShadowController; |
78 class RootWindowEventFilter; | |
79 class RootWindowLayoutManager; | 81 class RootWindowLayoutManager; |
80 class ScreenDimmer; | 82 class ScreenDimmer; |
81 class ShadowController; | 83 class ShadowController; |
82 class ShelfLayoutManager; | 84 class ShelfLayoutManager; |
83 class ShellContextMenu; | 85 class ShellContextMenu; |
84 class SystemGestureEventFilter; | 86 class SystemGestureEventFilter; |
85 class StackingController; | 87 class StackingController; |
86 class TooltipController; | 88 class TooltipController; |
87 class VisibilityController; | 89 class VisibilityController; |
88 class WindowModalityController; | 90 class WindowModalityController; |
(...skipping 11 matching lines...) Expand all Loading... |
100 FORWARD, | 102 FORWARD, |
101 BACKWARD | 103 BACKWARD |
102 }; | 104 }; |
103 | 105 |
104 // Accesses private data from a Shell for testing. | 106 // Accesses private data from a Shell for testing. |
105 class ASH_EXPORT TestApi { | 107 class ASH_EXPORT TestApi { |
106 public: | 108 public: |
107 explicit TestApi(Shell* shell); | 109 explicit TestApi(Shell* shell); |
108 | 110 |
109 internal::RootWindowLayoutManager* root_window_layout(); | 111 internal::RootWindowLayoutManager* root_window_layout(); |
110 internal::InputMethodEventFilter* input_method_event_filter(); | 112 aura::shared::InputMethodEventFilter* input_method_event_filter(); |
111 internal::SystemGestureEventFilter* system_gesture_event_filter(); | 113 internal::SystemGestureEventFilter* system_gesture_event_filter(); |
112 internal::WorkspaceController* workspace_controller(); | 114 internal::WorkspaceController* workspace_controller(); |
113 | 115 |
114 private: | 116 private: |
115 Shell* shell_; // not owned | 117 Shell* shell_; // not owned |
116 | 118 |
117 DISALLOW_COPY_AND_ASSIGN(TestApi); | 119 DISALLOW_COPY_AND_ASSIGN(TestApi); |
118 }; | 120 }; |
119 | 121 |
120 // A shell must be explicitly created so that it can call |Init()| with the | 122 // A shell must be explicitly created so that it can call |Init()| with the |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 // Adds/removes observer. | 195 // Adds/removes observer. |
194 void AddShellObserver(ShellObserver* observer); | 196 void AddShellObserver(ShellObserver* observer); |
195 void RemoveShellObserver(ShellObserver* observer); | 197 void RemoveShellObserver(ShellObserver* observer); |
196 | 198 |
197 #if !defined(OS_MACOSX) | 199 #if !defined(OS_MACOSX) |
198 AcceleratorController* accelerator_controller() { | 200 AcceleratorController* accelerator_controller() { |
199 return accelerator_controller_.get(); | 201 return accelerator_controller_.get(); |
200 } | 202 } |
201 #endif // !defined(OS_MACOSX) | 203 #endif // !defined(OS_MACOSX) |
202 | 204 |
203 internal::RootWindowEventFilter* root_filter() { | 205 aura::shared::RootWindowEventFilter* root_filter() { |
204 return root_filter_; | 206 return root_filter_; |
205 } | 207 } |
206 internal::TooltipController* tooltip_controller() { | 208 internal::TooltipController* tooltip_controller() { |
207 return tooltip_controller_.get(); | 209 return tooltip_controller_.get(); |
208 } | 210 } |
209 internal::KeyRewriterEventFilter* key_rewriter_filter() { | 211 internal::KeyRewriterEventFilter* key_rewriter_filter() { |
210 return key_rewriter_filter_.get(); | 212 return key_rewriter_filter_.get(); |
211 } | 213 } |
212 internal::PartialScreenshotEventFilter* partial_screenshot_filter() { | 214 internal::PartialScreenshotEventFilter* partial_screenshot_filter() { |
213 return partial_screenshot_filter_.get(); | 215 return partial_screenshot_filter_.get(); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 | 305 |
304 static Shell* instance_; | 306 static Shell* instance_; |
305 | 307 |
306 // If set before the Shell is initialized, the mouse cursor will be hidden | 308 // If set before the Shell is initialized, the mouse cursor will be hidden |
307 // when the screen is initially created. | 309 // when the screen is initially created. |
308 static bool initially_hide_cursor_; | 310 static bool initially_hide_cursor_; |
309 | 311 |
310 scoped_ptr<aura::RootWindow> root_window_; | 312 scoped_ptr<aura::RootWindow> root_window_; |
311 ScreenAsh* screen_; | 313 ScreenAsh* screen_; |
312 | 314 |
313 internal::RootWindowEventFilter* root_filter_; // not owned | 315 aura::shared::RootWindowEventFilter* root_filter_; // not owned |
314 | 316 |
315 std::vector<WindowAndBoundsPair> to_restore_; | 317 std::vector<WindowAndBoundsPair> to_restore_; |
316 | 318 |
317 #if !defined(OS_MACOSX) | 319 #if !defined(OS_MACOSX) |
318 scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_; | 320 scoped_ptr<NestedDispatcherController> nested_dispatcher_controller_; |
319 | 321 |
320 scoped_ptr<AcceleratorController> accelerator_controller_; | 322 scoped_ptr<AcceleratorController> accelerator_controller_; |
321 #endif // !defined(OS_MACOSX) | 323 #endif // !defined(OS_MACOSX) |
322 | 324 |
323 scoped_ptr<ShellDelegate> delegate_; | 325 scoped_ptr<ShellDelegate> delegate_; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 | 359 |
358 // An event filter which handles system level gestures | 360 // An event filter which handles system level gestures |
359 scoped_ptr<internal::SystemGestureEventFilter> system_gesture_filter_; | 361 scoped_ptr<internal::SystemGestureEventFilter> system_gesture_filter_; |
360 | 362 |
361 #if !defined(OS_MACOSX) | 363 #if !defined(OS_MACOSX) |
362 // An event filter that pre-handles global accelerators. | 364 // An event filter that pre-handles global accelerators. |
363 scoped_ptr<internal::AcceleratorFilter> accelerator_filter_; | 365 scoped_ptr<internal::AcceleratorFilter> accelerator_filter_; |
364 #endif | 366 #endif |
365 | 367 |
366 // An event filter that pre-handles all key events to send them to an IME. | 368 // An event filter that pre-handles all key events to send them to an IME. |
367 scoped_ptr<internal::InputMethodEventFilter> input_method_filter_; | 369 scoped_ptr<aura::shared::InputMethodEventFilter> input_method_filter_; |
368 | 370 |
369 // The shelf for managing the launcher and the status widget in non-compact | 371 // The shelf for managing the launcher and the status widget in non-compact |
370 // mode. Shell does not own the shelf. Instead, it is owned by container of | 372 // mode. Shell does not own the shelf. Instead, it is owned by container of |
371 // the status area. | 373 // the status area. |
372 internal::ShelfLayoutManager* shelf_; | 374 internal::ShelfLayoutManager* shelf_; |
373 | 375 |
374 // Manages layout of panels. Owned by PanelContainer. | 376 // Manages layout of panels. Owned by PanelContainer. |
375 internal::PanelLayoutManager* panel_layout_manager_; | 377 internal::PanelLayoutManager* panel_layout_manager_; |
376 | 378 |
377 ObserverList<ShellObserver> observers_; | 379 ObserverList<ShellObserver> observers_; |
378 | 380 |
379 // Owned by aura::RootWindow, cached here for type safety. | 381 // Owned by aura::RootWindow, cached here for type safety. |
380 internal::RootWindowLayoutManager* root_window_layout_; | 382 internal::RootWindowLayoutManager* root_window_layout_; |
381 | 383 |
382 // System tray with clock, Wi-Fi signal, etc. | 384 // System tray with clock, Wi-Fi signal, etc. |
383 scoped_ptr<SystemTray> tray_; | 385 scoped_ptr<SystemTray> tray_; |
384 | 386 |
385 // Used by ash/shell. | 387 // Used by ash/shell. |
386 content::BrowserContext* browser_context_; | 388 content::BrowserContext* browser_context_; |
387 | 389 |
388 DISALLOW_COPY_AND_ASSIGN(Shell); | 390 DISALLOW_COPY_AND_ASSIGN(Shell); |
389 }; | 391 }; |
390 | 392 |
391 } // namespace ash | 393 } // namespace ash |
392 | 394 |
393 #endif // ASH_SHELL_H_ | 395 #endif // ASH_SHELL_H_ |
OLD | NEW |