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

Side by Side Diff: ash/aura/wm_window_aura.cc

Issue 2625843002: Folds WmRootWindowController into RootWindowController (Closed)
Patch Set: definition in wm_root_window_controller.cc 2 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/aura/wm_window_aura.h ('k') | ash/common/accelerators/accelerator_controller.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 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/aura/wm_window_aura.h" 5 #include "ash/aura/wm_window_aura.h"
6 6
7 #include "ash/aura/aura_layout_manager_adapter.h" 7 #include "ash/aura/aura_layout_manager_adapter.h"
8 #include "ash/aura/wm_shell_aura.h" 8 #include "ash/aura/wm_shell_aura.h"
9 #include "ash/common/ash_constants.h" 9 #include "ash/common/ash_constants.h"
10 #include "ash/common/shelf/shelf_item_types.h" 10 #include "ash/common/shelf/shelf_item_types.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 void WmWindowAura::Destroy() { 144 void WmWindowAura::Destroy() {
145 delete window_; 145 delete window_;
146 // WARNING: this has been deleted. 146 // WARNING: this has been deleted.
147 } 147 }
148 148
149 const WmWindow* WmWindowAura::GetRootWindow() const { 149 const WmWindow* WmWindowAura::GetRootWindow() const {
150 return Get(window_->GetRootWindow()); 150 return Get(window_->GetRootWindow());
151 } 151 }
152 152
153 WmRootWindowController* WmWindowAura::GetRootWindowController() { 153 RootWindowController* WmWindowAura::GetRootWindowController() {
154 aura::Window* root = window_->GetRootWindow(); 154 aura::Window* root = window_->GetRootWindow();
155 if (!root) 155 return root ? RootWindowController::ForWindow(root) : nullptr;
156 return nullptr;
157
158 RootWindowController* rwc = RootWindowController::ForWindow(root);
159 return rwc ? rwc->wm_root_window_controller() : nullptr;
160 } 156 }
161 157
162 WmShell* WmWindowAura::GetShell() const { 158 WmShell* WmWindowAura::GetShell() const {
163 return WmShell::Get(); 159 return WmShell::Get();
164 } 160 }
165 161
166 void WmWindowAura::SetName(const char* name) { 162 void WmWindowAura::SetName(const char* name) {
167 window_->SetName(name); 163 window_->SetName(name);
168 } 164 }
169 165
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 observer.OnTransientChildAdded(this, Get(transient)); 991 observer.OnTransientChildAdded(this, Get(transient));
996 } 992 }
997 993
998 void WmWindowAura::OnTransientChildRemoved(aura::Window* window, 994 void WmWindowAura::OnTransientChildRemoved(aura::Window* window,
999 aura::Window* transient) { 995 aura::Window* transient) {
1000 for (auto& observer : transient_observers_) 996 for (auto& observer : transient_observers_)
1001 observer.OnTransientChildRemoved(this, Get(transient)); 997 observer.OnTransientChildRemoved(this, Get(transient));
1002 } 998 }
1003 999
1004 } // namespace ash 1000 } // namespace ash
OLDNEW
« no previous file with comments | « ash/aura/wm_window_aura.h ('k') | ash/common/accelerators/accelerator_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698