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

Side by Side Diff: ash/mus/bridge/wm_window_mus.cc

Issue 2369793002: WIP: Propagate SurfaceID up window tree hierarchy
Patch Set: Fix input events: EventDispatcher ignores container windows Created 4 years, 2 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/mus/bridge/wm_shell_mus.cc ('k') | ash/mus/non_client_frame_controller.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/mus/bridge/wm_window_mus.h" 5 #include "ash/mus/bridge/wm_window_mus.h"
6 6
7 #include "ash/common/wm/container_finder.h" 7 #include "ash/common/wm/container_finder.h"
8 #include "ash/common/wm/window_positioning_utils.h" 8 #include "ash/common/wm/window_positioning_utils.h"
9 #include "ash/common/wm/window_state.h" 9 #include "ash/common/wm/window_state.h"
10 #include "ash/common/wm_layout_manager.h" 10 #include "ash/common/wm_layout_manager.h"
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 return WmShellMus::GetToplevelAncestor(window_); 437 return WmShellMus::GetToplevelAncestor(window_);
438 } 438 }
439 439
440 void WmWindowMus::SetParentUsingContext(WmWindow* context, 440 void WmWindowMus::SetParentUsingContext(WmWindow* context,
441 const gfx::Rect& screen_bounds) { 441 const gfx::Rect& screen_bounds) {
442 wm::GetDefaultParent(context, this, screen_bounds)->AddChild(this); 442 wm::GetDefaultParent(context, this, screen_bounds)->AddChild(this);
443 } 443 }
444 444
445 void WmWindowMus::AddChild(WmWindow* window) { 445 void WmWindowMus::AddChild(WmWindow* window) {
446 window_->AddChild(GetMusWindow(window)); 446 window_->AddChild(GetMusWindow(window));
447 // If the child window does not have a native widget mus
448 // (and thus does not have an aura window), then we create a layer with its
449 // surface Id.
447 } 450 }
448 451
449 void WmWindowMus::RemoveChild(WmWindow* child) { 452 void WmWindowMus::RemoveChild(WmWindow* child) {
450 window_->RemoveChild(GetMusWindow(child)); 453 window_->RemoveChild(GetMusWindow(child));
451 } 454 }
452 455
453 const WmWindow* WmWindowMus::GetParent() const { 456 const WmWindow* WmWindowMus::GetParent() const {
454 return Get(window_->parent()); 457 return Get(window_->parent());
455 } 458 }
456 459
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 } 932 }
930 933
931 void WmWindowMus::OnTransientChildRemoved(ui::Window* window, 934 void WmWindowMus::OnTransientChildRemoved(ui::Window* window,
932 ui::Window* transient) { 935 ui::Window* transient) {
933 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, 936 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_,
934 OnTransientChildRemoved(this, Get(transient))); 937 OnTransientChildRemoved(this, Get(transient)));
935 } 938 }
936 939
937 } // namespace mus 940 } // namespace mus
938 } // namespace ash 941 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.cc ('k') | ash/mus/non_client_frame_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698