OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef ASH_DEVTOOLS_UI_ELEMENT_DELEGATE_H_ | 5 #ifndef COMPONENTS_UI_DEVTOOLS_DEVTOOLS_UI_ELEMENT_DELEGATE_H_ |
6 #define ASH_DEVTOOLS_UI_ELEMENT_DELEGATE_H_ | 6 #define COMPONENTS_UI_DEVTOOLS_DEVTOOLS_UI_ELEMENT_DELEGATE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/ash_export.h" | |
11 #include "base/macros.h" | 10 #include "base/macros.h" |
12 #include "ui/aura/window.h" | 11 #include "ui/aura/window.h" |
13 | 12 |
14 namespace ash { | 13 namespace ui { |
15 namespace devtools { | 14 namespace devtools { |
16 | 15 |
17 class UIElement; | 16 class UIElement; |
18 | 17 |
19 class ASH_EXPORT UIElementDelegate { | 18 class UIElementDelegate { |
20 public: | 19 public: |
21 UIElementDelegate(){}; | 20 UIElementDelegate(){}; |
22 virtual ~UIElementDelegate(){}; | 21 virtual ~UIElementDelegate(){}; |
23 | 22 |
24 // |parent| adds |child| in DOM tree. | 23 // |parent| adds |child| in DOM tree. |
25 virtual void OnUIElementAdded(UIElement* parent, UIElement* child) = 0; | 24 virtual void OnUIElementAdded(UIElement* parent, UIElement* child) = 0; |
26 | 25 |
27 // Move |child| to different sibling index under |parent| in DOM tree. | 26 // Move |child| to different sibling index under |parent| in DOM tree. |
28 virtual void OnUIElementReordered(UIElement* parent, UIElement* child) = 0; | 27 virtual void OnUIElementReordered(UIElement* parent, UIElement* child) = 0; |
29 | 28 |
30 // Remove ui_element in DOM tree. | 29 // Remove ui_element in DOM tree. |
31 virtual void OnUIElementRemoved(UIElement* ui_element) = 0; | 30 virtual void OnUIElementRemoved(UIElement* ui_element) = 0; |
32 | 31 |
33 // Update CSS agent when bounds change. | 32 // Update CSS agent when bounds change. |
34 virtual void OnUIElementBoundsChanged(UIElement* ui_element) = 0; | 33 virtual void OnUIElementBoundsChanged(UIElement* ui_element) = 0; |
35 | 34 |
36 // Return |window| highlighting status. | 35 // Return |window| highlighting status. |
37 virtual bool IsHighlightingWindow(aura::Window* window) = 0; | 36 virtual bool IsHighlightingWindow(aura::Window* window) = 0; |
38 | 37 |
39 DISALLOW_COPY_AND_ASSIGN(UIElementDelegate); | 38 DISALLOW_COPY_AND_ASSIGN(UIElementDelegate); |
40 }; | 39 }; |
41 | 40 |
42 } // namespace devtools | 41 } // namespace devtools |
43 } // namespace ash | 42 } // namespace ui |
44 | 43 |
45 #endif // ASH_DEVTOOLS_UI_ELEMENT_DELEGATE_H_ | 44 #endif // COMPONENTS_UI_DEVTOOLS_DEVTOOLS_UI_ELEMENT_DELEGATE_H_ |
OLD | NEW |