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

Side by Side Diff: mash/wm/bridge/mus_layout_manager_adapter.cc

Issue 1984293002: Random fixes for mash bridge classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 7 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 "mash/wm/bridge/mus_layout_manager_adapter.h" 5 #include "mash/wm/bridge/mus_layout_manager_adapter.h"
6 6
7 #include "ash/wm/common/wm_layout_manager.h" 7 #include "ash/wm/common/wm_layout_manager.h"
8 #include "components/mus/public/cpp/window.h" 8 #include "components/mus/public/cpp/window.h"
9 #include "mash/wm/bridge/wm_window_mus.h" 9 #include "mash/wm/bridge/wm_window_mus.h"
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 void MusLayoutManagerAdapter::OnTreeChanging(const TreeChangeParams& params) { 44 void MusLayoutManagerAdapter::OnTreeChanging(const TreeChangeParams& params) {
45 if (params.old_parent == window_) { 45 if (params.old_parent == window_) {
46 layout_manager_->OnWillRemoveWindowFromLayout( 46 layout_manager_->OnWillRemoveWindowFromLayout(
47 WmWindowMus::Get(params.target)); 47 WmWindowMus::Get(params.target));
48 } 48 }
49 } 49 }
50 50
51 void MusLayoutManagerAdapter::OnTreeChanged(const TreeChangeParams& params) { 51 void MusLayoutManagerAdapter::OnTreeChanged(const TreeChangeParams& params) {
52 if (params.new_parent == window_) { 52 if (params.new_parent == window_) {
53 layout_manager_->OnWindowAddedToLayout(WmWindowMus::Get(params.target)); 53 layout_manager_->OnWindowAddedToLayout(WmWindowMus::Get(params.target));
54 params.target->AddObserver(&child_window_observer_);
54 } else if (params.old_parent == window_) { 55 } else if (params.old_parent == window_) {
55 params.target->RemoveObserver(&child_window_observer_); 56 params.target->RemoveObserver(&child_window_observer_);
56 layout_manager_->OnWindowRemovedFromLayout(WmWindowMus::Get(params.target)); 57 layout_manager_->OnWindowRemovedFromLayout(WmWindowMus::Get(params.target));
57 } 58 }
58 } 59 }
59 60
60 void MusLayoutManagerAdapter::OnWindowBoundsChanged( 61 void MusLayoutManagerAdapter::OnWindowBoundsChanged(
61 mus::Window* window, 62 mus::Window* window,
62 const gfx::Rect& old_bounds, 63 const gfx::Rect& old_bounds,
63 const gfx::Rect& new_bounds) { 64 const gfx::Rect& new_bounds) {
64 layout_manager_->OnWindowResized(); 65 layout_manager_->OnWindowResized();
65 } 66 }
66 67
67 } // namespace wm 68 } // namespace wm
68 } // namespace mash 69 } // namespace mash
OLDNEW
« no previous file with comments | « components/mus/public/cpp/window_tree_connection_observer.h ('k') | mash/wm/bridge/wm_globals_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698