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

Side by Side Diff: ash/wm_window.cc

Issue 2911393002: Nix GetRootWindowController, use RootWindowController::ForWindow. (Closed)
Patch Set: Sync and rebase. Created 3 years, 6 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
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_window.h" 5 #include "ash/wm_window.h"
6 6
7 #include "ash/ash_constants.h" 7 #include "ash/ash_constants.h"
8 #include "ash/public/cpp/config.h" 8 #include "ash/public/cpp/config.h"
9 #include "ash/public/cpp/shell_window_ids.h" 9 #include "ash/public/cpp/shell_window_ids.h"
10 #include "ash/public/cpp/window_properties.h" 10 #include "ash/public/cpp/window_properties.h"
11 #include "ash/root_window_controller.h"
12 #include "ash/shell.h" 11 #include "ash/shell.h"
13 #include "ash/wm/resize_handle_window_targeter.h" 12 #include "ash/wm/resize_handle_window_targeter.h"
14 #include "ash/wm/widget_finder.h" 13 #include "ash/wm/widget_finder.h"
15 #include "ash/wm/window_animations.h" 14 #include "ash/wm/window_animations.h"
16 #include "ash/wm/window_properties.h" 15 #include "ash/wm/window_properties.h"
17 #include "ash/wm/window_state.h" 16 #include "ash/wm/window_state.h"
18 #include "ash/wm/window_util.h" 17 #include "ash/wm/window_util.h"
19 #include "ash/wm_transient_window_observer.h" 18 #include "ash/wm_transient_window_observer.h"
20 #include "base/memory/ptr_util.h" 19 #include "base/memory/ptr_util.h"
21 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" 20 #include "services/ui/public/interfaces/window_manager_constants.mojom.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 98
100 void WmWindow::Destroy() { 99 void WmWindow::Destroy() {
101 delete window_; 100 delete window_;
102 // WARNING: this has been deleted. 101 // WARNING: this has been deleted.
103 } 102 }
104 103
105 const WmWindow* WmWindow::GetRootWindow() const { 104 const WmWindow* WmWindow::GetRootWindow() const {
106 return Get(window_->GetRootWindow()); 105 return Get(window_->GetRootWindow());
107 } 106 }
108 107
109 RootWindowController* WmWindow::GetRootWindowController() {
110 aura::Window* root = window_->GetRootWindow();
111 return root ? RootWindowController::ForWindow(root) : nullptr;
112 }
113
114 aura::client::WindowType WmWindow::GetType() const { 108 aura::client::WindowType WmWindow::GetType() const {
115 return window_->type(); 109 return window_->type();
116 } 110 }
117 111
118 int WmWindow::GetAppType() const { 112 int WmWindow::GetAppType() const {
119 return window_->GetProperty(aura::client::kAppType); 113 return window_->GetProperty(aura::client::kAppType);
120 } 114 }
121 115
122 void WmWindow::SetAppType(int app_type) const { 116 void WmWindow::SetAppType(int app_type) const {
123 window_->SetProperty(aura::client::kAppType, app_type); 117 window_->SetProperty(aura::client::kAppType, app_type);
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 observer.OnTransientChildAdded(this, Get(transient)); 524 observer.OnTransientChildAdded(this, Get(transient));
531 } 525 }
532 526
533 void WmWindow::OnTransientChildRemoved(aura::Window* window, 527 void WmWindow::OnTransientChildRemoved(aura::Window* window,
534 aura::Window* transient) { 528 aura::Window* transient) {
535 for (auto& observer : transient_observers_) 529 for (auto& observer : transient_observers_)
536 observer.OnTransientChildRemoved(this, Get(transient)); 530 observer.OnTransientChildRemoved(this, Get(transient));
537 } 531 }
538 532
539 } // namespace ash 533 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698