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

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

Issue 2042913002: Converts MruWindowTracker to work with common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: not equal Created 4 years, 6 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_window_mus.h ('k') | ash/shelf/shelf_layout_manager.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/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_state.h" 8 #include "ash/common/wm/window_state.h"
9 #include "ash/common/wm_layout_manager.h" 9 #include "ash/common/wm_layout_manager.h"
10 #include "ash/common/wm_window_observer.h" 10 #include "ash/common/wm_window_observer.h"
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 } 681 }
682 682
683 void WmWindowMus::AddObserver(WmWindowObserver* observer) { 683 void WmWindowMus::AddObserver(WmWindowObserver* observer) {
684 observers_.AddObserver(observer); 684 observers_.AddObserver(observer);
685 } 685 }
686 686
687 void WmWindowMus::RemoveObserver(WmWindowObserver* observer) { 687 void WmWindowMus::RemoveObserver(WmWindowObserver* observer) {
688 observers_.RemoveObserver(observer); 688 observers_.RemoveObserver(observer);
689 } 689 }
690 690
691 void WmWindowMus::OnTreeChanging(const TreeChangeParams& params) {
692 WmWindowObserver::TreeChangeParams wm_params;
693 wm_params.target = Get(params.target);
694 wm_params.new_parent = Get(params.new_parent);
695 wm_params.old_parent = Get(params.old_parent);
696 FOR_EACH_OBSERVER(WmWindowObserver, observers_,
697 OnWindowTreeChanging(this, wm_params));
698 }
699
691 void WmWindowMus::OnTreeChanged(const TreeChangeParams& params) { 700 void WmWindowMus::OnTreeChanged(const TreeChangeParams& params) {
692 WmWindowObserver::TreeChangeParams wm_params; 701 WmWindowObserver::TreeChangeParams wm_params;
693 wm_params.target = Get(params.target); 702 wm_params.target = Get(params.target);
694 wm_params.new_parent = Get(params.new_parent); 703 wm_params.new_parent = Get(params.new_parent);
695 wm_params.old_parent = Get(params.old_parent); 704 wm_params.old_parent = Get(params.old_parent);
696 FOR_EACH_OBSERVER(WmWindowObserver, observers_, 705 FOR_EACH_OBSERVER(WmWindowObserver, observers_,
697 OnWindowTreeChanged(this, wm_params)); 706 OnWindowTreeChanged(this, wm_params));
698 } 707 }
699 708
700 void WmWindowMus::OnWindowReordered(::mus::Window* window, 709 void WmWindowMus::OnWindowReordered(::mus::Window* window,
(...skipping 27 matching lines...) Expand all
728 const gfx::Rect& old_bounds, 737 const gfx::Rect& old_bounds,
729 const gfx::Rect& new_bounds) { 738 const gfx::Rect& new_bounds) {
730 FOR_EACH_OBSERVER(WmWindowObserver, observers_, 739 FOR_EACH_OBSERVER(WmWindowObserver, observers_,
731 OnWindowBoundsChanged(this, old_bounds, new_bounds)); 740 OnWindowBoundsChanged(this, old_bounds, new_bounds));
732 } 741 }
733 742
734 void WmWindowMus::OnWindowDestroying(::mus::Window* window) { 743 void WmWindowMus::OnWindowDestroying(::mus::Window* window) {
735 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroying(this)); 744 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroying(this));
736 } 745 }
737 746
747 void WmWindowMus::OnWindowDestroyed(::mus::Window* window) {
748 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroyed(this));
749 }
750
738 } // namespace mus 751 } // namespace mus
739 } // namespace ash 752 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/wm_window_mus.h ('k') | ash/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698