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

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

Issue 2350953009: Centralizes more shared code between ash and mash (Closed)
Patch Set: feedback 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/container_finder.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_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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 void WmWindowAura::SetParentUsingContext(WmWindow* context, 368 void WmWindowAura::SetParentUsingContext(WmWindow* context,
369 const gfx::Rect& screen_bounds) { 369 const gfx::Rect& screen_bounds) {
370 aura::client::ParentWindowWithContext(window_, GetAuraWindow(context), 370 aura::client::ParentWindowWithContext(window_, GetAuraWindow(context),
371 screen_bounds); 371 screen_bounds);
372 } 372 }
373 373
374 void WmWindowAura::AddChild(WmWindow* window) { 374 void WmWindowAura::AddChild(WmWindow* window) {
375 window_->AddChild(GetAuraWindow(window)); 375 window_->AddChild(GetAuraWindow(window));
376 } 376 }
377 377
378 void WmWindowAura::RemoveChild(WmWindow* child) {
379 window_->RemoveChild(GetAuraWindow(child));
380 }
381
378 const WmWindow* WmWindowAura::GetParent() const { 382 const WmWindow* WmWindowAura::GetParent() const {
379 return Get(window_->parent()); 383 return Get(window_->parent());
380 } 384 }
381 385
382 const WmWindow* WmWindowAura::GetTransientParent() const { 386 const WmWindow* WmWindowAura::GetTransientParent() const {
383 return Get(::wm::GetTransientParent(window_)); 387 return Get(::wm::GetTransientParent(window_));
384 } 388 }
385 389
386 std::vector<WmWindow*> WmWindowAura::GetTransientChildren() { 390 std::vector<WmWindow*> WmWindowAura::GetTransientChildren() {
387 return FromAuraWindows(::wm::GetTransientChildren(window_)); 391 return FromAuraWindows(::wm::GetTransientChildren(window_));
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 OnTransientChildAdded(this, Get(transient))); 877 OnTransientChildAdded(this, Get(transient)));
874 } 878 }
875 879
876 void WmWindowAura::OnTransientChildRemoved(aura::Window* window, 880 void WmWindowAura::OnTransientChildRemoved(aura::Window* window,
877 aura::Window* transient) { 881 aura::Window* transient) {
878 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, 882 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_,
879 OnTransientChildRemoved(this, Get(transient))); 883 OnTransientChildRemoved(this, Get(transient)));
880 } 884 }
881 885
882 } // namespace ash 886 } // namespace ash
OLDNEW
« no previous file with comments | « ash/aura/wm_window_aura.h ('k') | ash/common/wm/container_finder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698