| 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 <memory> | 8 #include <memory> |
| 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 "ash/metrics/user_metrics_recorder.h" | 13 #include "ash/metrics/user_metrics_recorder.h" |
| 14 #include "ash/public/cpp/shelf_types.h" | 14 #include "ash/public/cpp/shelf_types.h" |
| 15 #include "ash/wm/cursor_manager_chromeos.h" | 15 #include "ash/wm/cursor_manager_chromeos.h" |
| 16 #include "ash/wm/system_modal_container_event_filter_delegate.h" | 16 #include "ash/wm/system_modal_container_event_filter_delegate.h" |
| 17 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
| 18 #include "base/macros.h" | 18 #include "base/macros.h" |
| 19 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
| 20 #include "base/observer_list.h" | 20 #include "base/observer_list.h" |
| 21 #include "ui/aura/window.h" | 21 #include "ui/aura/window.h" |
| 22 #include "ui/display/screen.h" | 22 #include "ui/display/screen.h" |
| 23 #include "ui/events/event_target.h" | 23 #include "ui/events/event_target.h" |
| 24 #include "ui/gfx/geometry/insets.h" | |
| 25 #include "ui/gfx/geometry/size.h" | |
| 26 #include "ui/wm/core/cursor_manager.h" | 24 #include "ui/wm/core/cursor_manager.h" |
| 27 | 25 |
| 28 namespace aura { | 26 namespace aura { |
| 29 class RootWindow; | 27 class RootWindow; |
| 30 class Window; | 28 class Window; |
| 31 namespace client { | 29 namespace client { |
| 32 class ActivationClient; | 30 class ActivationClient; |
| 33 class FocusClient; | 31 class FocusClient; |
| 34 } | 32 } |
| 35 } | 33 } |
| 36 | 34 |
| 37 namespace chromeos { | 35 namespace chromeos { |
| 38 class AudioA11yController; | 36 class AudioA11yController; |
| 39 } | 37 } |
| 40 | 38 |
| 41 namespace display { | 39 namespace display { |
| 42 class DisplayChangeObserver; | 40 class DisplayChangeObserver; |
| 43 class DisplayManager; | 41 class DisplayManager; |
| 44 } | 42 } |
| 45 | 43 |
| 46 namespace gfx { | 44 namespace gfx { |
| 47 class Rect; | 45 class Insets; |
| 48 } | 46 } |
| 49 | 47 |
| 50 namespace ui { | 48 namespace ui { |
| 51 class DisplayConfigurator; | 49 class DisplayConfigurator; |
| 52 class UserActivityDetector; | 50 class UserActivityDetector; |
| 53 class UserActivityPowerManagerNotifier; | 51 class UserActivityPowerManagerNotifier; |
| 54 } | 52 } |
| 55 namespace views { | 53 namespace views { |
| 56 class NonClientFrameView; | 54 class NonClientFrameView; |
| 57 class Widget; | 55 class Widget; |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 GPUSupport* gpu_support() { return gpu_support_.get(); } | 389 GPUSupport* gpu_support() { return gpu_support_.get(); } |
| 392 | 390 |
| 393 private: | 391 private: |
| 394 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor); | 392 FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, TestCursor); |
| 395 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors); | 393 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, MouseEventCursors); |
| 396 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate); | 394 FRIEND_TEST_ALL_PREFIXES(WindowManagerTest, TransformActivate); |
| 397 friend class RootWindowController; | 395 friend class RootWindowController; |
| 398 friend class test::ShellTestApi; | 396 friend class test::ShellTestApi; |
| 399 friend class shell::WindowWatcher; | 397 friend class shell::WindowWatcher; |
| 400 | 398 |
| 401 typedef std::pair<aura::Window*, gfx::Rect> WindowAndBoundsPair; | |
| 402 | |
| 403 // Takes ownership of |delegate|. | 399 // Takes ownership of |delegate|. |
| 404 explicit Shell(ShellDelegate* delegate); | 400 explicit Shell(ShellDelegate* delegate); |
| 405 ~Shell() override; | 401 ~Shell() override; |
| 406 | 402 |
| 407 void Init(const ShellInitParams& init_params); | 403 void Init(const ShellInitParams& init_params); |
| 408 | 404 |
| 409 // Initializes virtual keyboard controller. | 405 // Initializes virtual keyboard controller. |
| 410 void InitKeyboard(); | 406 void InitKeyboard(); |
| 411 | 407 |
| 412 // Initializes the root window so that it can host browser windows. | 408 // Initializes the root window so that it can host browser windows. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 427 // when the screen is initially created. | 423 // when the screen is initially created. |
| 428 static bool initially_hide_cursor_; | 424 static bool initially_hide_cursor_; |
| 429 | 425 |
| 430 std::unique_ptr<ScopedOverviewAnimationSettingsFactoryAura> | 426 std::unique_ptr<ScopedOverviewAnimationSettingsFactoryAura> |
| 431 scoped_overview_animation_settings_factory_; | 427 scoped_overview_animation_settings_factory_; |
| 432 std::unique_ptr<WmShellAura> wm_shell_; | 428 std::unique_ptr<WmShellAura> wm_shell_; |
| 433 | 429 |
| 434 // The CompoundEventFilter owned by aura::Env object. | 430 // The CompoundEventFilter owned by aura::Env object. |
| 435 std::unique_ptr<::wm::CompoundEventFilter> env_filter_; | 431 std::unique_ptr<::wm::CompoundEventFilter> env_filter_; |
| 436 | 432 |
| 437 std::vector<WindowAndBoundsPair> to_restore_; | |
| 438 | |
| 439 std::unique_ptr<UserMetricsRecorder> user_metrics_recorder_; | 433 std::unique_ptr<UserMetricsRecorder> user_metrics_recorder_; |
| 440 std::unique_ptr<AcceleratorControllerDelegateAura> | 434 std::unique_ptr<AcceleratorControllerDelegateAura> |
| 441 accelerator_controller_delegate_; | 435 accelerator_controller_delegate_; |
| 442 std::unique_ptr<SessionStateDelegate> session_state_delegate_; | 436 std::unique_ptr<SessionStateDelegate> session_state_delegate_; |
| 443 std::unique_ptr<WindowPositioner> window_positioner_; | 437 std::unique_ptr<WindowPositioner> window_positioner_; |
| 444 | 438 |
| 445 std::unique_ptr<DragDropController> drag_drop_controller_; | 439 std::unique_ptr<DragDropController> drag_drop_controller_; |
| 446 std::unique_ptr<ResizeShadowController> resize_shadow_controller_; | 440 std::unique_ptr<ResizeShadowController> resize_shadow_controller_; |
| 447 std::unique_ptr<::wm::ShadowController> shadow_controller_; | 441 std::unique_ptr<::wm::ShadowController> shadow_controller_; |
| 448 std::unique_ptr<::wm::VisibilityController> visibility_controller_; | 442 std::unique_ptr<::wm::VisibilityController> visibility_controller_; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 std::unique_ptr<GPUSupport> gpu_support_; | 535 std::unique_ptr<GPUSupport> gpu_support_; |
| 542 | 536 |
| 543 std::unique_ptr<ImmersiveHandlerFactoryAsh> immersive_handler_factory_; | 537 std::unique_ptr<ImmersiveHandlerFactoryAsh> immersive_handler_factory_; |
| 544 | 538 |
| 545 DISALLOW_COPY_AND_ASSIGN(Shell); | 539 DISALLOW_COPY_AND_ASSIGN(Shell); |
| 546 }; | 540 }; |
| 547 | 541 |
| 548 } // namespace ash | 542 } // namespace ash |
| 549 | 543 |
| 550 #endif // ASH_SHELL_H_ | 544 #endif // ASH_SHELL_H_ |
| OLD | NEW |