Index: ash/devtools/ui_element.cc |
diff --git a/ash/devtools/ui_element.cc b/ash/devtools/ui_element.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d0b8c3346f7f807703e4b1d5b45cf29c2fbac88f |
--- /dev/null |
+++ b/ash/devtools/ui_element.cc |
@@ -0,0 +1,59 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "ash/devtools/ui_element.h" |
+#include "ash/devtools/ui_element_delegate.h" |
+#include "ash/devtools/view_element.h" |
+#include "ash/devtools/widget_element.h" |
+#include "ash/devtools/window_element.h" |
+ |
+namespace ash { |
+namespace devtools { |
+ |
+UIElement::UIElement() {} |
sadrul
2017/04/19 18:21:39
When a new UIElement is created, can this generate
thanhph
2017/04/24 15:56:50
No it can't at the moment but this can be addresse
|
+ |
+UIElement::~UIElement() {} |
sadrul
2017/04/19 18:21:39
Should this destroy all its children too during de
thanhph
2017/04/24 15:56:50
I'm able to move RemoveChild() to UIElement.cc but
thanhph
2017/04/24 16:51:28
Im able to get the destructor to work now. Please
|
+ |
+int UIElement::GetNodeId() const { |
+ return node_id_; |
+} |
+ |
+void UIElement::SetNodeId(int node_id) { |
+ this->node_id_ = node_id; |
+} |
+ |
+UIElement* UIElement::GetParent() { |
+ return parent_; |
+} |
+ |
+void UIElement::SetParent(UIElement* parent) { |
+ parent_ = parent; |
+} |
+ |
+UIElementDelegate* UIElement::GetUIElementDelegate() { |
+ return ui_element_delegate_; |
+} |
+ |
+void UIElement::SetUIElementDelegate(UIElementDelegate* ui_element_delegate) { |
+ this->ui_element_delegate_ = ui_element_delegate; |
+} |
+ |
+UIElementType UIElement::GetType() const { |
+ return type_; |
+} |
+ |
+void UIElement::SetType(UIElementType type) { |
+ type_ = type; |
+} |
+ |
+std::vector<UIElement*>& UIElement::GetChildren() { |
+ return children_; |
+} |
+ |
+void UIElement::SetChildren(std::vector<UIElement*>& children) { |
+ children_ = children; |
+} |
+ |
+} // namespace devtools |
+} // namespace ash |