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_DEVTOOLS_UI_ELEMENT_DELEGATE_H_ | |
6 #define ASH_DEVTOOLS_UI_ELEMENT_DELEGATE_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "ash/ash_export.h" | |
11 #include "base/macros.h" | |
12 #include "ui/aura/window.h" | |
13 | |
14 namespace ash { | |
15 namespace devtools { | |
16 | |
17 class UIElement; | |
18 | |
19 class ASH_EXPORT UIElementDelegate { | |
20 public: | |
21 UIElementDelegate(){}; | |
22 ~UIElementDelegate(){}; | |
sadrul
2017/05/09 04:58:07
Make the dtor virtual
You may need to move the bo
thanhph
2017/05/09 20:52:46
Added. The dtor code runs ok here.
| |
23 | |
24 // |parent| adds |child| in DOM tree. | |
25 virtual void OnUIElementAdded(UIElement* parent, UIElement* child); | |
sadrul
2017/05/09 04:58:07
These should be pure virtuals (i.e. = 0;)
thanhph
2017/05/09 20:52:46
Done.
| |
26 | |
27 // Move |child| to different sibling location under |parent| in DOM tree. | |
28 virtual void OnUIElementReordered(UIElement* parent, UIElement* child); | |
29 | |
30 // Add map tracking node id to element. | |
31 virtual void AddNodeIdMap(UIElement* ui_element); | |
32 | |
33 // Remove map tracking node id to element. | |
34 virtual void RemoveNodeIdMap(UIElement* ui_element); | |
sadrul
2017/05/09 04:58:07
AddNodeIdMap() And RemoveNodeIdMap() should not be
thanhph
2017/05/09 20:52:46
Done. When ui_element is being constructed, the co
| |
35 | |
36 // Retun true if element is sucessfully removed in DOM tree, false otherwise. | |
37 virtual bool OnUIElementRemoved(UIElement* ui_element); | |
38 | |
39 // Update CSS agent when bounds change. | |
40 virtual void OnUIElementBoundsChanged(UIElement* ui_element); | |
41 | |
42 // Return |window| highlighting status. | |
43 virtual bool IsHighlightingWindow(aura::Window* window); | |
sadrul
2017/05/09 04:58:07
This feels a little bit weird here. We may be able
thanhph
2017/05/09 20:52:46
Acknowledged.
| |
44 | |
45 DISALLOW_COPY_AND_ASSIGN(UIElementDelegate); | |
46 }; | |
47 | |
48 } // namespace devtools | |
49 } // namespace ash | |
50 | |
51 #endif // ASH_DEVTOOLS_UI_ELEMENT_DELEGATE_H_ | |
OLD | NEW |