Index: ash/common/devtools/ui_element.cc |
diff --git a/ash/common/devtools/ui_element.cc b/ash/common/devtools/ui_element.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a688b589af8fc6cc977035aade66b857375a62ba |
--- /dev/null |
+++ b/ash/common/devtools/ui_element.cc |
@@ -0,0 +1,33 @@ |
+// 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/common/devtools/ui_element.h" |
+ |
+namespace ash { |
+namespace devtools { |
+ |
+UIElement::UIElement() {} |
+ |
+UIElement::~UIElement() {} |
+ |
+UIElement* UIElement::GetInstance() { |
+ DCHECK(instance_); |
+ return instance_; |
+} |
+ |
+UIElement::UIElement(int node_id) { |
+ node_id_ = node_id; |
+} |
+ |
+// static |
+UIElement* UIElement::ConvertNodeIdToUIElement(int node_id) { |
+ return GetInstance()->node_id_to_ui_element[node_id]; |
+} |
+ |
+int UIElement::GetNodeId() const { |
+ return node_id_; |
+} |
+ |
+} // namespace devtools |
+} // namespace ash |