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

Side by Side Diff: ash/wm/aura/wm_root_window_controller_aura.cc

Issue 1898223002: Removes most aura dependencies from WindowResizer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_aura_from_window_state
Patch Set: nit and merge Created 4 years, 8 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/wm/aura/wm_root_window_controller_aura.h ('k') | ash/wm/common/root_window_finder.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "ash/wm/aura/wm_root_window_controller_aura.h" 5 #include "ash/wm/aura/wm_root_window_controller_aura.h"
6 6
7 #include "ash/display/window_tree_host_manager.h"
7 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/shell.h"
8 #include "ash/wm/aura/wm_globals_aura.h" 10 #include "ash/wm/aura/wm_globals_aura.h"
11 #include "ash/wm/aura/wm_window_aura.h"
9 #include "ash/wm/workspace_controller.h" 12 #include "ash/wm/workspace_controller.h"
10 #include "ui/aura/window.h" 13 #include "ui/aura/window.h"
11 #include "ui/aura/window_property.h" 14 #include "ui/aura/window_property.h"
12 15
13 DECLARE_WINDOW_PROPERTY_TYPE(ash::wm::WmRootWindowControllerAura*); 16 DECLARE_WINDOW_PROPERTY_TYPE(ash::wm::WmRootWindowControllerAura*);
14 17
15 namespace ash { 18 namespace ash {
16 namespace wm { 19 namespace wm {
17 20
18 // TODO(sky): it likely makes more sense to hang this off RootWindowSettings. 21 // TODO(sky): it likely makes more sense to hang this off RootWindowSettings.
19 DEFINE_OWNED_WINDOW_PROPERTY_KEY(ash::wm::WmRootWindowControllerAura, 22 DEFINE_OWNED_WINDOW_PROPERTY_KEY(ash::wm::WmRootWindowControllerAura,
20 kWmRootWindowControllerKey, 23 kWmRootWindowControllerKey,
21 nullptr); 24 nullptr);
22 25
26 // static
27 WmRootWindowController* WmRootWindowController::GetWithDisplayId(int64_t id) {
28 return WmRootWindowControllerAura::Get(Shell::GetInstance()
29 ->window_tree_host_manager()
30 ->GetRootWindowForDisplayId(id));
31 }
32
23 WmRootWindowControllerAura::WmRootWindowControllerAura( 33 WmRootWindowControllerAura::WmRootWindowControllerAura(
24 RootWindowController* root_window_controller) 34 RootWindowController* root_window_controller)
25 : root_window_controller_(root_window_controller) { 35 : root_window_controller_(root_window_controller) {
26 root_window_controller_->GetRootWindow()->SetProperty( 36 root_window_controller_->GetRootWindow()->SetProperty(
27 kWmRootWindowControllerKey, this); 37 kWmRootWindowControllerKey, this);
28 } 38 }
29 39
30 WmRootWindowControllerAura::~WmRootWindowControllerAura() {} 40 WmRootWindowControllerAura::~WmRootWindowControllerAura() {}
31 41
32 // static 42 // static
(...skipping 22 matching lines...) Expand all
55 } 65 }
56 66
57 WmGlobals* WmRootWindowControllerAura::GetGlobals() { 67 WmGlobals* WmRootWindowControllerAura::GetGlobals() {
58 return WmGlobalsAura::Get(); 68 return WmGlobalsAura::Get();
59 } 69 }
60 70
61 WorkspaceWindowState WmRootWindowControllerAura::GetWorkspaceWindowState() { 71 WorkspaceWindowState WmRootWindowControllerAura::GetWorkspaceWindowState() {
62 return root_window_controller_->workspace_controller()->GetWindowState(); 72 return root_window_controller_->workspace_controller()->GetWindowState();
63 } 73 }
64 74
75 WmWindow* WmRootWindowControllerAura::GetWindow() {
76 return WmWindowAura::Get(root_window_controller_->GetRootWindow());
77 }
78
65 } // namespace wm 79 } // namespace wm
66 } // namespace ash 80 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/aura/wm_root_window_controller_aura.h ('k') | ash/wm/common/root_window_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698