| 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 | 7 |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
| 12 #include "ash/system/user/login_status.h" | 12 #include "ash/system/user/login_status.h" |
| 13 #include "ash/wm/cursor_delegate.h" |
| 14 #include "ash/wm/cursor_manager.h" |
| 13 #include "ash/wm/shelf_types.h" | 15 #include "ash/wm/shelf_types.h" |
| 14 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
| 15 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
| 16 #include "base/gtest_prod_util.h" | 18 #include "base/gtest_prod_util.h" |
| 17 #include "base/memory/scoped_ptr.h" | 19 #include "base/memory/scoped_ptr.h" |
| 18 #include "base/observer_list.h" | 20 #include "base/observer_list.h" |
| 19 #include "ui/aura/cursor_delegate.h" | |
| 20 #include "ui/gfx/insets.h" | 21 #include "ui/gfx/insets.h" |
| 21 #include "ui/gfx/size.h" | 22 #include "ui/gfx/size.h" |
| 22 | 23 |
| 23 class CommandLine; | 24 class CommandLine; |
| 24 | 25 |
| 25 namespace aura { | 26 namespace aura { |
| 26 class EventFilter; | 27 class EventFilter; |
| 27 class FocusManager; | 28 class FocusManager; |
| 28 class RootWindow; | 29 class RootWindow; |
| 29 class Window; | 30 class Window; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 class VisibilityController; | 103 class VisibilityController; |
| 103 class WindowModalityController; | 104 class WindowModalityController; |
| 104 class WorkspaceController; | 105 class WorkspaceController; |
| 105 } | 106 } |
| 106 | 107 |
| 107 // Shell is a singleton object that presents the Shell API and implements the | 108 // Shell is a singleton object that presents the Shell API and implements the |
| 108 // RootWindow's delegate interface. | 109 // RootWindow's delegate interface. |
| 109 // | 110 // |
| 110 // Upon creation, the Shell sets itself as the RootWindow's delegate, which | 111 // Upon creation, the Shell sets itself as the RootWindow's delegate, which |
| 111 // takes ownership of the Shell. | 112 // takes ownership of the Shell. |
| 112 class ASH_EXPORT Shell : aura::CursorDelegate { | 113 class ASH_EXPORT Shell : ash::CursorDelegate { |
| 113 public: | 114 public: |
| 114 typedef std::vector<aura::RootWindow*> RootWindowList; | 115 typedef std::vector<aura::RootWindow*> RootWindowList; |
| 115 typedef std::vector<internal::RootWindowController*> RootWindowControllerList; | 116 typedef std::vector<internal::RootWindowController*> RootWindowControllerList; |
| 116 | 117 |
| 117 enum Direction { | 118 enum Direction { |
| 118 FORWARD, | 119 FORWARD, |
| 119 BACKWARD | 120 BACKWARD |
| 120 }; | 121 }; |
| 121 | 122 |
| 122 // Accesses private data from a Shell for testing. | 123 // Accesses private data from a Shell for testing. |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 } | 279 } |
| 279 WindowCycleController* window_cycle_controller() { | 280 WindowCycleController* window_cycle_controller() { |
| 280 return window_cycle_controller_.get(); | 281 return window_cycle_controller_.get(); |
| 281 } | 282 } |
| 282 internal::FocusCycler* focus_cycler() { | 283 internal::FocusCycler* focus_cycler() { |
| 283 return focus_cycler_.get(); | 284 return focus_cycler_.get(); |
| 284 } | 285 } |
| 285 internal::DisplayController* display_controller() { | 286 internal::DisplayController* display_controller() { |
| 286 return display_controller_.get(); | 287 return display_controller_.get(); |
| 287 } | 288 } |
| 289 CursorManager* cursor_manager() { return &cursor_manager_; } |
| 288 | 290 |
| 289 ShellDelegate* delegate() { return delegate_.get(); } | 291 ShellDelegate* delegate() { return delegate_.get(); } |
| 290 | 292 |
| 291 UserWallpaperDelegate* user_wallpaper_delegate() { | 293 UserWallpaperDelegate* user_wallpaper_delegate() { |
| 292 return user_wallpaper_delegate_.get(); | 294 return user_wallpaper_delegate_.get(); |
| 293 } | 295 } |
| 294 | 296 |
| 295 HighContrastController* high_contrast_controller() { | 297 HighContrastController* high_contrast_controller() { |
| 296 return high_contrast_controller_.get(); | 298 return high_contrast_controller_.get(); |
| 297 } | 299 } |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 | 462 |
| 461 // An event filter that silently keeps track of all touch events and controls | 463 // An event filter that silently keeps track of all touch events and controls |
| 462 // a heads-up display. This is enabled only if --ash-touch-hud flag is used. | 464 // a heads-up display. This is enabled only if --ash-touch-hud flag is used. |
| 463 scoped_ptr<internal::TouchObserverHUD> touch_observer_hud_; | 465 scoped_ptr<internal::TouchObserverHUD> touch_observer_hud_; |
| 464 | 466 |
| 465 #if defined(OS_CHROMEOS) | 467 #if defined(OS_CHROMEOS) |
| 466 // Controls video output device state. | 468 // Controls video output device state. |
| 467 scoped_ptr<chromeos::OutputConfigurator> output_configurator_; | 469 scoped_ptr<chromeos::OutputConfigurator> output_configurator_; |
| 468 #endif // defined(OS_CHROMEOS) | 470 #endif // defined(OS_CHROMEOS) |
| 469 | 471 |
| 472 CursorManager cursor_manager_; |
| 473 |
| 470 // The shelf for managing the launcher and the status widget in non-compact | 474 // The shelf for managing the launcher and the status widget in non-compact |
| 471 // mode. Shell does not own the shelf. Instead, it is owned by container of | 475 // mode. Shell does not own the shelf. Instead, it is owned by container of |
| 472 // the status area. | 476 // the status area. |
| 473 internal::ShelfLayoutManager* shelf_; | 477 internal::ShelfLayoutManager* shelf_; |
| 474 | 478 |
| 475 // Manages layout of panels. Owned by PanelContainer. | 479 // Manages layout of panels. Owned by PanelContainer. |
| 476 internal::PanelLayoutManager* panel_layout_manager_; | 480 internal::PanelLayoutManager* panel_layout_manager_; |
| 477 | 481 |
| 478 ObserverList<ShellObserver> observers_; | 482 ObserverList<ShellObserver> observers_; |
| 479 | 483 |
| 480 // Widget containing system tray. | 484 // Widget containing system tray. |
| 481 internal::StatusAreaWidget* status_area_widget_; | 485 internal::StatusAreaWidget* status_area_widget_; |
| 482 | 486 |
| 483 // Used by ash/shell. | 487 // Used by ash/shell. |
| 484 content::BrowserContext* browser_context_; | 488 content::BrowserContext* browser_context_; |
| 485 | 489 |
| 486 DISALLOW_COPY_AND_ASSIGN(Shell); | 490 DISALLOW_COPY_AND_ASSIGN(Shell); |
| 487 }; | 491 }; |
| 488 | 492 |
| 489 } // namespace ash | 493 } // namespace ash |
| 490 | 494 |
| 491 #endif // ASH_SHELL_H_ | 495 #endif // ASH_SHELL_H_ |
| OLD | NEW |