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

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

Issue 2176813002: mash: Migrate ShelfTooltipManager to wm common types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comment. 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
« no previous file with comments | « ash/mus/bridge/wm_window_mus.h ('k') | ash/shelf/shelf_tooltip_manager.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_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"
11 #include "ash/common/wm_window_property.h" 11 #include "ash/common/wm_window_property.h"
12 #include "ash/mus/bridge/mus_layout_manager_adapter.h" 12 #include "ash/mus/bridge/mus_layout_manager_adapter.h"
13 #include "ash/mus/bridge/wm_root_window_controller_mus.h" 13 #include "ash/mus/bridge/wm_root_window_controller_mus.h"
14 #include "ash/mus/bridge/wm_shell_mus.h" 14 #include "ash/mus/bridge/wm_shell_mus.h"
15 #include "ash/mus/property_util.h" 15 #include "ash/mus/property_util.h"
16 #include "services/ui/public/cpp/property_type_converters.h" 16 #include "services/ui/public/cpp/property_type_converters.h"
17 #include "services/ui/public/cpp/window.h" 17 #include "services/ui/public/cpp/window.h"
18 #include "services/ui/public/cpp/window_property.h" 18 #include "services/ui/public/cpp/window_property.h"
19 #include "services/ui/public/cpp/window_tree_client.h" 19 #include "services/ui/public/cpp/window_tree_client.h"
20 #include "services/ui/public/interfaces/window_manager.mojom.h" 20 #include "services/ui/public/interfaces/window_manager.mojom.h"
21 #include "ui/aura/mus/mus_util.h" 21 #include "ui/aura/mus/mus_util.h"
22 #include "ui/aura/window.h"
22 #include "ui/base/hit_test.h" 23 #include "ui/base/hit_test.h"
23 #include "ui/display/display.h" 24 #include "ui/display/display.h"
24 #include "ui/views/view.h" 25 #include "ui/views/view.h"
25 #include "ui/views/widget/widget.h" 26 #include "ui/views/widget/widget.h"
26 #include "ui/views/widget/widget_delegate.h" 27 #include "ui/views/widget/widget_delegate.h"
27 28
28 MUS_DECLARE_WINDOW_PROPERTY_TYPE(ash::mus::WmWindowMus*); 29 MUS_DECLARE_WINDOW_PROPERTY_TYPE(ash::mus::WmWindowMus*);
29 30
30 // TODO(sky): fully implement this. Making DVLOG as too spammy to be useful. 31 // TODO(sky): fully implement this. Making DVLOG as too spammy to be useful.
31 #undef NOTIMPLEMENTED 32 #undef NOTIMPLEMENTED
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 } 733 }
733 734
734 void WmWindowMus::RemoveObserver(WmWindowObserver* observer) { 735 void WmWindowMus::RemoveObserver(WmWindowObserver* observer) {
735 observers_.RemoveObserver(observer); 736 observers_.RemoveObserver(observer);
736 } 737 }
737 738
738 bool WmWindowMus::HasObserver(const WmWindowObserver* observer) const { 739 bool WmWindowMus::HasObserver(const WmWindowObserver* observer) const {
739 return observers_.HasObserver(observer); 740 return observers_.HasObserver(observer);
740 } 741 }
741 742
743 void WmWindowMus::AddLimitedPreTargetHandler(ui::EventHandler* handler) {
744 DCHECK(GetInternalWidget());
745 widget_->GetNativeWindow()->AddPreTargetHandler(handler);
746 }
747
748 void WmWindowMus::RemoveLimitedPreTargetHandler(ui::EventHandler* handler) {
749 widget_->GetNativeWindow()->RemovePreTargetHandler(handler);
750 }
751
742 void WmWindowMus::OnTreeChanging(const TreeChangeParams& params) { 752 void WmWindowMus::OnTreeChanging(const TreeChangeParams& params) {
743 WmWindowObserver::TreeChangeParams wm_params; 753 WmWindowObserver::TreeChangeParams wm_params;
744 wm_params.target = Get(params.target); 754 wm_params.target = Get(params.target);
745 wm_params.new_parent = Get(params.new_parent); 755 wm_params.new_parent = Get(params.new_parent);
746 wm_params.old_parent = Get(params.old_parent); 756 wm_params.old_parent = Get(params.old_parent);
747 FOR_EACH_OBSERVER(WmWindowObserver, observers_, 757 FOR_EACH_OBSERVER(WmWindowObserver, observers_,
748 OnWindowTreeChanging(this, wm_params)); 758 OnWindowTreeChanging(this, wm_params));
749 } 759 }
750 760
751 void WmWindowMus::OnTreeChanged(const TreeChangeParams& params) { 761 void WmWindowMus::OnTreeChanged(const TreeChangeParams& params) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 void WmWindowMus::OnWindowDestroying(::ui::Window* window) { 804 void WmWindowMus::OnWindowDestroying(::ui::Window* window) {
795 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroying(this)); 805 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroying(this));
796 } 806 }
797 807
798 void WmWindowMus::OnWindowDestroyed(::ui::Window* window) { 808 void WmWindowMus::OnWindowDestroyed(::ui::Window* window) {
799 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroyed(this)); 809 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroyed(this));
800 } 810 }
801 811
802 } // namespace mus 812 } // namespace mus
803 } // namespace ash 813 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/wm_window_mus.h ('k') | ash/shelf/shelf_tooltip_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698