Index: ash/common/devtools/view_element.h |
diff --git a/ash/common/devtools/view_element.h b/ash/common/devtools/view_element.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..639899bf3128fd11962b1b216883514560dbd7dc |
--- /dev/null |
+++ b/ash/common/devtools/view_element.h |
@@ -0,0 +1,38 @@ |
+// 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_VIEW_ELEMENT_H_ |
+#define ASH_COMMON_DEVTOOLS_VIEW_ELEMENT_H_ |
+ |
+#include "ash/common/devtools/ui_element.h" |
+#include "ui/gfx/geometry/rect.h" |
+#include "ui/views/view.h" |
+#include "ui/views/view_observer.h" |
+ |
+namespace ash { |
+namespace devtools { |
+ |
+class ViewElement : public views::ViewObserver, public UIElement { |
+ public: |
+ // views::ViewObserver |
+ void OnChildViewRemoved(views::View* parent, views::View* view) override; |
+ void OnChildViewAdded(views::View* parent, views::View* view) override; |
+ void OnChildViewReordered(views::View* parent, views::View*) override; |
+ void OnViewBoundsChanged(views::View* view) override; |
+ |
+ bool GetBounds(gfx::Rect* bounds) override; |
+ bool SetBounds(const gfx::Rect& bounds) override; |
+ bool GetVisible(bool* visible) override; |
+ bool SetVisible(bool visible) override; |
+ |
+ private: |
+ views::View* view; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ViewElement); |
+}; |
+ |
+} // namespace devtools |
+} // namespace ash |
+ |
+#endif // ASH_COMMON_DEVTOOLS_VIEW_ELEMENT_H_ |