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

Side by Side Diff: ash/common/devtools/ui_element_delegate.cc

Issue 2776543002: Create a unified UIElement interface for Widget, View and Window. (Closed)
Patch Set: . Created 3 years, 9 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
(Empty)
1
2 // For WindowElement observers
3 void UIElementDelegate::NotifyOnWindowHierarchyChanging(
4 const aura::WindowObserver::HierarchyChangeParams& params) {
5 OnWindowHierarchyChanging(params);
6 }
7
8 void UIElementDelegate::NotifyOnWindowHierarchyChanged(
9 const aura::WindowObserver::HierarchyChangeParams& params) {
10 OnWindowHierarchyChanged(params);
11 }
12
13 void UIElementDelegate::NotifyRemoveWindowTree(WmWindow* window,
14 bool remove_observer) {
15 RemoveWindowTree(window, remove_observer);
16 }
17
18 void UIElementDelegate::NotifyAddWindowTree(WmWindow* window) {
19 AddWindowTree(window);
20 }
21
22 void UIElementDelegate::NotfiyOnWindowBoundsChanged(WmWindow* window) {
23 for (auto& observer : observers_)
24 observer.OnWindowBoundsChanged(window);
25 }
26
27 // For ViewElement observers
28 void UIElementDelegate::NotifyRemoveViewTree(views::View* view,
29 views::View* parent,
30 bool remove_observer) {
31 RemoveViewTree(view, parent, true);
32 }
33
34 void UIElementDelegate::NotifyAddViewTree(views::View* view) {
35 AddViewTree(view);
36 }
37
38 void UIElementDelegate::NotifyOnViewBoundsChanged(views::View* view) {
39 for (auto& observer : observers_)
40 observer.OnViewBoundsChanged(view);
41 }
42
43 // For WidgetElement observers
44 void UIElementDelegate::NotifyOnWidgetBoundsChanged(views::Widget* widget) {
45 for (auto& observer : observers_)
46 observer.OnWidgetBoundsChanged(widget);
47 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698