Index: ash/common/devtools/ui_element.h |
diff --git a/ash/common/devtools/ui_element.h b/ash/common/devtools/ui_element.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..acca1660eb5e0ef08a4c4a45d6f999a67813a40c |
--- /dev/null |
+++ b/ash/common/devtools/ui_element.h |
@@ -0,0 +1,41 @@ |
+// 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. |
+ |
+#ifndef ASH_COMMON_DEVTOOLS_UI_ELEMENT_H_ |
+#define ASH_COMMON_DEVTOOLS_UI_ELEMENT_H_ |
+ |
+#include "ash/ash_export.h" |
+#include "ash/common/devtools/ui_element_delegate.h" |
+#include "ui/gfx/geometry/rect.h" |
+ |
+namespace ash { |
+namespace devtools { |
+ |
+class ASH_EXPORT UIElement : public UIElementDelegate { |
+ public: |
+ UIElement(); |
+ ~UIElement(); |
+ static UIElement* GetInstance(); |
+ UIElement(int node_id); |
+ |
+ static UIElement* ConvertNodeIdToUIElement(int node_id); |
+ virtual bool GetBounds(gfx::Rect* bounds){}; |
+ virtual bool SetBounds(const gfx::Rect& bounds){}; |
+ virtual bool GetVisible(bool* visible){}; |
+ virtual bool SetVisible(bool visible){}; |
+ |
+ int GetNodeId() const; |
+ |
+ private: |
+ int node_id_; |
+ std::unordered_map<int, UIElement*> node_id_to_ui_element; |
+ static UIElement* instance_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(UIElement); |
+}; |
+ |
+} // namespace devtools |
+} // namespace ash |
+ |
+#endif // ASH_COMMON_DEVTOOLS_UI_ELEMENT_H_ |