Chromium Code Reviews| 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/wm/core/cursor_manager.h" | 24 #include "ui/wm/core/cursor_manager.h" |
| 25 | 25 |
| 26 namespace aura { | 26 namespace aura { |
| 27 class RootWindow; | 27 class RootWindow; |
| 28 class Window; | 28 class Window; |
| 29 class WindowManagerClient; | |
| 29 class WindowTreeClient; | 30 class WindowTreeClient; |
| 30 namespace client { | 31 namespace client { |
| 31 class ActivationClient; | 32 class ActivationClient; |
| 32 class FocusClient; | 33 class FocusClient; |
| 33 } | 34 } |
| 34 } | 35 } |
| 35 | 36 |
| 36 namespace chromeos { | 37 namespace chromeos { |
| 37 class AudioA11yController; | 38 class AudioA11yController; |
| 38 } | 39 } |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 178 static int64_t GetTargetDisplayId(); | 179 static int64_t GetTargetDisplayId(); |
| 179 | 180 |
| 180 // Returns all root windows. | 181 // Returns all root windows. |
| 181 static aura::Window::Windows GetAllRootWindows(); | 182 static aura::Window::Windows GetAllRootWindows(); |
| 182 | 183 |
| 183 static aura::Window* GetContainer(aura::Window* root_window, | 184 static aura::Window* GetContainer(aura::Window* root_window, |
| 184 int container_id); | 185 int container_id); |
| 185 static const aura::Window* GetContainer(const aura::Window* root_window, | 186 static const aura::Window* GetContainer(const aura::Window* root_window, |
| 186 int container_id); | 187 int container_id); |
| 187 | 188 |
| 188 // TODO(sky): better isolate this. | 189 // TODO(sky): move this and WindowManagerClient into ShellMash that is owned |
|
msw
2017/01/12 00:14:42
q: What is ShellMash? WmShell?
sky
2017/01/12 14:43:44
WmShell will go away soon. When that happens we'll
| |
| 190 // by Shell. Doing the move is gated on having mash create Shell. | |
| 189 static void set_window_tree_client(aura::WindowTreeClient* client) { | 191 static void set_window_tree_client(aura::WindowTreeClient* client) { |
| 190 window_tree_client_ = client; | 192 window_tree_client_ = client; |
| 191 } | 193 } |
| 192 | 194 |
| 193 static aura::WindowTreeClient* window_tree_client() { | 195 static aura::WindowTreeClient* window_tree_client() { |
| 194 return window_tree_client_; | 196 return window_tree_client_; |
| 195 } | 197 } |
| 196 | 198 |
| 199 static void set_window_manager_client(aura::WindowManagerClient* client) { | |
| 200 window_manager_client_ = client; | |
| 201 } | |
| 202 static aura::WindowManagerClient* window_manager_client() { | |
| 203 return window_manager_client_; | |
| 204 } | |
| 205 | |
| 197 // Creates a default views::NonClientFrameView for use by windows in the | 206 // Creates a default views::NonClientFrameView for use by windows in the |
| 198 // Ash environment. | 207 // Ash environment. |
| 199 views::NonClientFrameView* CreateDefaultNonClientFrameView( | 208 views::NonClientFrameView* CreateDefaultNonClientFrameView( |
| 200 views::Widget* widget); | 209 views::Widget* widget); |
| 201 | 210 |
| 202 // Sets work area insets of the display containing |window|, pings observers. | 211 // Sets work area insets of the display containing |window|, pings observers. |
| 203 void SetDisplayWorkAreaInsets(aura::Window* window, | 212 void SetDisplayWorkAreaInsets(aura::Window* window, |
| 204 const gfx::Insets& insets); | 213 const gfx::Insets& insets); |
| 205 | 214 |
| 206 // Called when the user logs in. | 215 // Called when the user logs in. |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 419 // Overridden from ui::EventTarget: | 428 // Overridden from ui::EventTarget: |
| 420 bool CanAcceptEvent(const ui::Event& event) override; | 429 bool CanAcceptEvent(const ui::Event& event) override; |
| 421 EventTarget* GetParentTarget() override; | 430 EventTarget* GetParentTarget() override; |
| 422 std::unique_ptr<ui::EventTargetIterator> GetChildIterator() const override; | 431 std::unique_ptr<ui::EventTargetIterator> GetChildIterator() const override; |
| 423 ui::EventTargeter* GetEventTargeter() override; | 432 ui::EventTargeter* GetEventTargeter() override; |
| 424 | 433 |
| 425 static Shell* instance_; | 434 static Shell* instance_; |
| 426 | 435 |
| 427 // Only valid in mash, for classic ash this is null. | 436 // Only valid in mash, for classic ash this is null. |
| 428 static aura::WindowTreeClient* window_tree_client_; | 437 static aura::WindowTreeClient* window_tree_client_; |
| 438 static aura::WindowManagerClient* window_manager_client_; | |
| 429 | 439 |
| 430 // If set before the Shell is initialized, the mouse cursor will be hidden | 440 // If set before the Shell is initialized, the mouse cursor will be hidden |
| 431 // when the screen is initially created. | 441 // when the screen is initially created. |
| 432 static bool initially_hide_cursor_; | 442 static bool initially_hide_cursor_; |
| 433 | 443 |
| 434 std::unique_ptr<ScopedOverviewAnimationSettingsFactoryAura> | 444 std::unique_ptr<ScopedOverviewAnimationSettingsFactoryAura> |
| 435 scoped_overview_animation_settings_factory_; | 445 scoped_overview_animation_settings_factory_; |
| 436 std::unique_ptr<WmShellAura> wm_shell_; | 446 std::unique_ptr<WmShellAura> wm_shell_; |
| 437 | 447 |
| 438 // The CompoundEventFilter owned by aura::Env object. | 448 // The CompoundEventFilter owned by aura::Env object. |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 541 std::unique_ptr<GPUSupport> gpu_support_; | 551 std::unique_ptr<GPUSupport> gpu_support_; |
| 542 | 552 |
| 543 std::unique_ptr<ImmersiveHandlerFactoryAsh> immersive_handler_factory_; | 553 std::unique_ptr<ImmersiveHandlerFactoryAsh> immersive_handler_factory_; |
| 544 | 554 |
| 545 DISALLOW_COPY_AND_ASSIGN(Shell); | 555 DISALLOW_COPY_AND_ASSIGN(Shell); |
| 546 }; | 556 }; |
| 547 | 557 |
| 548 } // namespace ash | 558 } // namespace ash |
| 549 | 559 |
| 550 #endif // ASH_SHELL_H_ | 560 #endif // ASH_SHELL_H_ |
| OLD | NEW |