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

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

Issue 2320273002: Refactors DimWindow and moves to ash/common (Closed)
Patch Set: feedback and member initializer ordering Created 4 years, 3 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/wm/window_dimmer.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/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_root_window_controller_aura.h" 8 #include "ash/aura/wm_root_window_controller_aura.h"
9 #include "ash/aura/wm_shell_aura.h" 9 #include "ash/aura/wm_shell_aura.h"
10 #include "ash/common/ash_constants.h" 10 #include "ash/common/ash_constants.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 result[i] = WmWindowAura::GetAuraWindow(windows[i]); 128 result[i] = WmWindowAura::GetAuraWindow(windows[i]);
129 return result; 129 return result;
130 } 130 }
131 131
132 // static 132 // static
133 const aura::Window* WmWindowAura::GetAuraWindow(const WmWindow* wm_window) { 133 const aura::Window* WmWindowAura::GetAuraWindow(const WmWindow* wm_window) {
134 return wm_window ? static_cast<const WmWindowAura*>(wm_window)->aura_window() 134 return wm_window ? static_cast<const WmWindowAura*>(wm_window)->aura_window()
135 : nullptr; 135 : nullptr;
136 } 136 }
137 137
138 void WmWindowAura::Destroy() {
139 delete window_;
140 // WARNING: this has been deleted.
141 }
142
138 const WmWindow* WmWindowAura::GetRootWindow() const { 143 const WmWindow* WmWindowAura::GetRootWindow() const {
139 return Get(window_->GetRootWindow()); 144 return Get(window_->GetRootWindow());
140 } 145 }
141 146
142 WmRootWindowController* WmWindowAura::GetRootWindowController() { 147 WmRootWindowController* WmWindowAura::GetRootWindowController() {
143 aura::Window* root = window_->GetRootWindow(); 148 aura::Window* root = window_->GetRootWindow();
144 return root ? WmRootWindowControllerAura::Get(root) : nullptr; 149 return root ? WmRootWindowControllerAura::Get(root) : nullptr;
145 } 150 }
146 151
147 WmShell* WmWindowAura::GetShell() const { 152 WmShell* WmWindowAura::GetShell() const {
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 layout_manager ? new AuraLayoutManagerAdapter(std::move(layout_manager)) 363 layout_manager ? new AuraLayoutManagerAdapter(std::move(layout_manager))
359 : nullptr); 364 : nullptr);
360 } 365 }
361 366
362 WmLayoutManager* WmWindowAura::GetLayoutManager() { 367 WmLayoutManager* WmWindowAura::GetLayoutManager() {
363 AuraLayoutManagerAdapter* adapter = 368 AuraLayoutManagerAdapter* adapter =
364 static_cast<AuraLayoutManagerAdapter*>(window_->layout_manager()); 369 static_cast<AuraLayoutManagerAdapter*>(window_->layout_manager());
365 return adapter ? adapter->wm_layout_manager() : nullptr; 370 return adapter ? adapter->wm_layout_manager() : nullptr;
366 } 371 }
367 372
373 void WmWindowAura::SetVisibilityChangesAnimated() {
374 ::wm::SetWindowVisibilityChangesAnimated(window_);
375 }
376
368 void WmWindowAura::SetVisibilityAnimationType(int type) { 377 void WmWindowAura::SetVisibilityAnimationType(int type) {
369 ::wm::SetWindowVisibilityAnimationType(window_, type); 378 ::wm::SetWindowVisibilityAnimationType(window_, type);
370 } 379 }
371 380
372 void WmWindowAura::SetVisibilityAnimationDuration(base::TimeDelta delta) { 381 void WmWindowAura::SetVisibilityAnimationDuration(base::TimeDelta delta) {
373 ::wm::SetWindowVisibilityAnimationDuration(window_, delta); 382 ::wm::SetWindowVisibilityAnimationDuration(window_, delta);
374 } 383 }
375 384
376 void WmWindowAura::SetVisibilityAnimationTransition( 385 void WmWindowAura::SetVisibilityAnimationTransition(
377 ::wm::WindowVisibilityAnimationTransition transition) { 386 ::wm::WindowVisibilityAnimationTransition transition) {
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 OnTransientChildAdded(this, Get(transient))); 833 OnTransientChildAdded(this, Get(transient)));
825 } 834 }
826 835
827 void WmWindowAura::OnTransientChildRemoved(aura::Window* window, 836 void WmWindowAura::OnTransientChildRemoved(aura::Window* window,
828 aura::Window* transient) { 837 aura::Window* transient) {
829 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, 838 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_,
830 OnTransientChildRemoved(this, Get(transient))); 839 OnTransientChildRemoved(this, Get(transient)));
831 } 840 }
832 841
833 } // namespace ash 842 } // namespace ash
OLDNEW
« no previous file with comments | « ash/aura/wm_window_aura.h ('k') | ash/common/wm/window_dimmer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698