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_COMMON_DEVTOOLS_UI_ELEMENT_H_ |
| 6 #define ASH_COMMON_DEVTOOLS_UI_ELEMENT_H_ |
| 7 |
| 8 #include "ash/ash_export.h" |
| 9 #include "ash/common/devtools/ui_element_delegate.h" |
| 10 #include "ui/gfx/geometry/rect.h" |
| 11 |
| 12 namespace ash { |
| 13 namespace devtools { |
| 14 |
| 15 class ASH_EXPORT UIElement : public UIElementDelegate { |
| 16 public: |
| 17 UIElement(); |
| 18 ~UIElement(); |
| 19 static UIElement* GetInstance(); |
| 20 UIElement(int node_id); |
| 21 |
| 22 static UIElement* ConvertNodeIdToUIElement(int node_id); |
| 23 virtual bool GetBounds(gfx::Rect* bounds){}; |
| 24 virtual bool SetBounds(const gfx::Rect& bounds){}; |
| 25 virtual bool GetVisible(bool* visible){}; |
| 26 virtual bool SetVisible(bool visible){}; |
| 27 |
| 28 int GetNodeId() const; |
| 29 |
| 30 private: |
| 31 int node_id_; |
| 32 std::unordered_map<int, UIElement*> node_id_to_ui_element; |
| 33 static UIElement* instance_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(UIElement); |
| 36 }; |
| 37 |
| 38 } // namespace devtools |
| 39 } // namespace ash |
| 40 |
| 41 #endif // ASH_COMMON_DEVTOOLS_UI_ELEMENT_H_ |
OLD | NEW |