| 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_manager.h" | 13 #include "ash/wm/cursor_manager.h" |
| 14 #include "ash/wm/shelf_types.h" | 14 #include "ash/wm/shelf_types.h" |
| 15 #include "ash/wm/system_modal_container_event_filter_delegate.h" | 15 #include "ash/wm/system_modal_container_event_filter_delegate.h" |
| 16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
| 17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
| 18 #include "base/gtest_prod_util.h" | 18 #include "base/gtest_prod_util.h" |
| 19 #include "base/memory/scoped_ptr.h" | 19 #include "base/memory/scoped_ptr.h" |
| 20 #include "base/observer_list.h" | 20 #include "base/observer_list.h" |
| 21 #include "ui/base/events/event_target.h" |
| 21 #include "ui/gfx/insets.h" | 22 #include "ui/gfx/insets.h" |
| 22 #include "ui/gfx/screen.h" | 23 #include "ui/gfx/screen.h" |
| 23 #include "ui/gfx/size.h" | 24 #include "ui/gfx/size.h" |
| 24 | 25 |
| 25 class CommandLine; | 26 class CommandLine; |
| 26 | 27 |
| 27 namespace aura { | 28 namespace aura { |
| 28 class EventFilter; | 29 class EventFilter; |
| 29 class FocusManager; | 30 class FocusManager; |
| 30 class RootWindow; | 31 class RootWindow; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 class VisibilityController; | 109 class VisibilityController; |
| 109 class WindowModalityController; | 110 class WindowModalityController; |
| 110 class WorkspaceController; | 111 class WorkspaceController; |
| 111 } | 112 } |
| 112 | 113 |
| 113 // Shell is a singleton object that presents the Shell API and implements the | 114 // Shell is a singleton object that presents the Shell API and implements the |
| 114 // RootWindow's delegate interface. | 115 // RootWindow's delegate interface. |
| 115 // | 116 // |
| 116 // Upon creation, the Shell sets itself as the RootWindow's delegate, which | 117 // Upon creation, the Shell sets itself as the RootWindow's delegate, which |
| 117 // takes ownership of the Shell. | 118 // takes ownership of the Shell. |
| 118 class ASH_EXPORT Shell : internal::SystemModalContainerEventFilterDelegate{ | 119 class ASH_EXPORT Shell : internal::SystemModalContainerEventFilterDelegate, |
| 120 public ui::EventTarget { |
| 119 public: | 121 public: |
| 120 typedef std::vector<aura::RootWindow*> RootWindowList; | 122 typedef std::vector<aura::RootWindow*> RootWindowList; |
| 121 typedef std::vector<internal::RootWindowController*> RootWindowControllerList; | 123 typedef std::vector<internal::RootWindowController*> RootWindowControllerList; |
| 122 | 124 |
| 123 enum Direction { | 125 enum Direction { |
| 124 FORWARD, | 126 FORWARD, |
| 125 BACKWARD | 127 BACKWARD |
| 126 }; | 128 }; |
| 127 | 129 |
| 128 // Accesses private data from a Shell for testing. | 130 // Accesses private data from a Shell for testing. |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 void InitRootWindowController(internal::RootWindowController* root); | 420 void InitRootWindowController(internal::RootWindowController* root); |
| 419 | 421 |
| 420 // Initializes the layout managers and event filters specific for | 422 // Initializes the layout managers and event filters specific for |
| 421 // primary display. | 423 // primary display. |
| 422 void InitLayoutManagersForPrimaryDisplay( | 424 void InitLayoutManagersForPrimaryDisplay( |
| 423 internal::RootWindowController* root_window_controller); | 425 internal::RootWindowController* root_window_controller); |
| 424 | 426 |
| 425 // ash::internal::SystemModalContainerEventFilterDelegate overrides: | 427 // ash::internal::SystemModalContainerEventFilterDelegate overrides: |
| 426 virtual bool CanWindowReceiveEvents(aura::Window* window) OVERRIDE; | 428 virtual bool CanWindowReceiveEvents(aura::Window* window) OVERRIDE; |
| 427 | 429 |
| 430 // Overridden from ui::EventTarget: |
| 431 virtual bool CanAcceptEvents() OVERRIDE; |
| 432 virtual EventTarget* GetParentTarget() OVERRIDE; |
| 433 |
| 428 static Shell* instance_; | 434 static Shell* instance_; |
| 429 | 435 |
| 430 // If set before the Shell is initialized, the mouse cursor will be hidden | 436 // If set before the Shell is initialized, the mouse cursor will be hidden |
| 431 // when the screen is initially created. | 437 // when the screen is initially created. |
| 432 static bool initially_hide_cursor_; | 438 static bool initially_hide_cursor_; |
| 433 | 439 |
| 434 ScreenAsh* screen_; | 440 ScreenAsh* screen_; |
| 435 | 441 |
| 436 // Active root window. Never becomes NULL during the session. | 442 // Active root window. Never becomes NULL during the session. |
| 437 aura::RootWindow* active_root_window_; | 443 aura::RootWindow* active_root_window_; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 | 523 |
| 518 // For testing only: simulate that a modal window is open | 524 // For testing only: simulate that a modal window is open |
| 519 bool simulate_modal_window_open_for_testing_; | 525 bool simulate_modal_window_open_for_testing_; |
| 520 | 526 |
| 521 DISALLOW_COPY_AND_ASSIGN(Shell); | 527 DISALLOW_COPY_AND_ASSIGN(Shell); |
| 522 }; | 528 }; |
| 523 | 529 |
| 524 } // namespace ash | 530 } // namespace ash |
| 525 | 531 |
| 526 #endif // ASH_SHELL_H_ | 532 #endif // ASH_SHELL_H_ |
| OLD | NEW |