OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ASH_COMMON_DEVTOOLS_UI_ELEMENT_DELEGATE_H_ |
| 6 #define ASH_COMMON_DEVTOOLS_UI_ELEMENT_DELEGATE_H_ |
| 7 |
| 8 #include "ash/ash_export.h" |
| 9 #include "ash/common/devtools/ash_devtools_dom_agent.h" |
| 10 #include "ash/common/wm_window.h" |
| 11 #include "ui/aura/window_observer.h" |
| 12 #include "ui/views/view.h" |
| 13 #include "ui/views/widget/widget.h" |
| 14 |
| 15 namespace ash { |
| 16 namespace devtools { |
| 17 |
| 18 class ASH_EXPORT UIElementDelegate { |
| 19 public: |
| 20 // For WindowElement |
| 21 void NotifyOnWindowHierarchyChanging( |
| 22 const aura::WindowObserver::HierarchyChangeParams& params); |
| 23 void NotifyOnWindowHierarchyChanged( |
| 24 const aura::WindowObserver::HierarchyChangeParams& params); |
| 25 void NotifyRemoveWindowTree(WmWindow* window, bool remove_observer); |
| 26 void NotifyAddWindowTree(WmWindow* window); |
| 27 void NotfiyOnWindowBoundsChanged(WmWindow* window); |
| 28 |
| 29 // For ViewElement |
| 30 void NotifyRemoveViewTree(views::View* view, |
| 31 views::View* parent, |
| 32 bool remove_observer); |
| 33 void NotifyAddViewTree(views::View* view); |
| 34 void NotifyOnViewBoundsChanged(views::View* view); |
| 35 |
| 36 // For WidgetElement |
| 37 void NotifyOnWidgetBoundsChanged(views::Widget* widget); |
| 38 |
| 39 void SetDelegate(AshDevToolsDOMAgent* dom_agent) { |
| 40 dom_agent_delegate = dom_agent; |
| 41 }; |
| 42 |
| 43 AshDevToolsDOMAgent* DomAgentDelegate() { return dom_agent_delegate; } |
| 44 |
| 45 private: |
| 46 AshDevToolsDOMAgent* dom_agent_delegate; |
| 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(UIElementDelegate); |
| 49 }; |
| 50 |
| 51 } // namespace devtools |
| 52 } // namespace ash |
| 53 |
| 54 #endif // ASH_COMMON_DEVTOOLS_UI_ELEMENT_DELEGATE_H_ |
OLD | NEW |