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

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

Issue 2243513004: mash: Partially migrate WorkspaceController to ash common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 4 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/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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 } 348 }
349 349
350 std::vector<WmWindow*> WmWindowAura::GetTransientChildren() { 350 std::vector<WmWindow*> WmWindowAura::GetTransientChildren() {
351 return FromAuraWindows(::wm::GetTransientChildren(window_)); 351 return FromAuraWindows(::wm::GetTransientChildren(window_));
352 } 352 }
353 353
354 void WmWindowAura::SetLayoutManager( 354 void WmWindowAura::SetLayoutManager(
355 std::unique_ptr<WmLayoutManager> layout_manager) { 355 std::unique_ptr<WmLayoutManager> layout_manager) {
356 // |window_| takes ownership of AuraLayoutManagerAdapter. 356 // |window_| takes ownership of AuraLayoutManagerAdapter.
357 window_->SetLayoutManager( 357 window_->SetLayoutManager(
358 new AuraLayoutManagerAdapter(std::move(layout_manager))); 358 layout_manager ? new AuraLayoutManagerAdapter(std::move(layout_manager))
359 : nullptr);
359 } 360 }
360 361
361 WmLayoutManager* WmWindowAura::GetLayoutManager() { 362 WmLayoutManager* WmWindowAura::GetLayoutManager() {
362 return static_cast<AuraLayoutManagerAdapter*>(window_->layout_manager()) 363 AuraLayoutManagerAdapter* adapter =
363 ->wm_layout_manager(); 364 static_cast<AuraLayoutManagerAdapter*>(window_->layout_manager());
365 return adapter ? adapter->wm_layout_manager() : nullptr;
364 } 366 }
365 367
366 void WmWindowAura::SetVisibilityAnimationType(int type) { 368 void WmWindowAura::SetVisibilityAnimationType(int type) {
367 ::wm::SetWindowVisibilityAnimationType(window_, type); 369 ::wm::SetWindowVisibilityAnimationType(window_, type);
368 } 370 }
369 371
370 void WmWindowAura::SetVisibilityAnimationDuration(base::TimeDelta delta) { 372 void WmWindowAura::SetVisibilityAnimationDuration(base::TimeDelta delta) {
371 ::wm::SetWindowVisibilityAnimationDuration(window_, delta); 373 ::wm::SetWindowVisibilityAnimationDuration(window_, delta);
372 } 374 }
373 375
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 OnTransientChildAdded(this, Get(transient))); 824 OnTransientChildAdded(this, Get(transient)));
823 } 825 }
824 826
825 void WmWindowAura::OnTransientChildRemoved(aura::Window* window, 827 void WmWindowAura::OnTransientChildRemoved(aura::Window* window,
826 aura::Window* transient) { 828 aura::Window* transient) {
827 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, 829 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_,
828 OnTransientChildRemoved(this, Get(transient))); 830 OnTransientChildRemoved(this, Get(transient)));
829 } 831 }
830 832
831 } // namespace ash 833 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698