Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: ash/shell.h

Issue 2625873007: Promotes WmWindowMus functions to WmWindowAura and nukes WmWindowMus (Closed)
Patch Set: merge Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/mus/window_manager.cc ('k') | ash/shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 // Overridden from ui::EventTarget: 425 // Overridden from ui::EventTarget:
417 bool CanAcceptEvent(const ui::Event& event) override; 426 bool CanAcceptEvent(const ui::Event& event) override;
418 EventTarget* GetParentTarget() override; 427 EventTarget* GetParentTarget() override;
419 std::unique_ptr<ui::EventTargetIterator> GetChildIterator() const override; 428 std::unique_ptr<ui::EventTargetIterator> GetChildIterator() const override;
420 ui::EventTargeter* GetEventTargeter() override; 429 ui::EventTargeter* GetEventTargeter() override;
421 430
422 static Shell* instance_; 431 static Shell* instance_;
423 432
424 // Only valid in mash, for classic ash this is null. 433 // Only valid in mash, for classic ash this is null.
425 static aura::WindowTreeClient* window_tree_client_; 434 static aura::WindowTreeClient* window_tree_client_;
435 static aura::WindowManagerClient* window_manager_client_;
426 436
427 // If set before the Shell is initialized, the mouse cursor will be hidden 437 // If set before the Shell is initialized, the mouse cursor will be hidden
428 // when the screen is initially created. 438 // when the screen is initially created.
429 static bool initially_hide_cursor_; 439 static bool initially_hide_cursor_;
430 440
431 std::unique_ptr<ScopedOverviewAnimationSettingsFactoryAura> 441 std::unique_ptr<ScopedOverviewAnimationSettingsFactoryAura>
432 scoped_overview_animation_settings_factory_; 442 scoped_overview_animation_settings_factory_;
433 std::unique_ptr<WmShellAura> wm_shell_; 443 std::unique_ptr<WmShellAura> wm_shell_;
434 444
435 // The CompoundEventFilter owned by aura::Env object. 445 // The CompoundEventFilter owned by aura::Env object.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 std::unique_ptr<GPUSupport> gpu_support_; 548 std::unique_ptr<GPUSupport> gpu_support_;
539 549
540 std::unique_ptr<ImmersiveHandlerFactoryAsh> immersive_handler_factory_; 550 std::unique_ptr<ImmersiveHandlerFactoryAsh> immersive_handler_factory_;
541 551
542 DISALLOW_COPY_AND_ASSIGN(Shell); 552 DISALLOW_COPY_AND_ASSIGN(Shell);
543 }; 553 };
544 554
545 } // namespace ash 555 } // namespace ash
546 556
547 #endif // ASH_SHELL_H_ 557 #endif // ASH_SHELL_H_
OLDNEW
« no previous file with comments | « ash/mus/window_manager.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698