Index: ash/common/devtools/widget_element.h |
diff --git a/ash/common/devtools/widget_element.h b/ash/common/devtools/widget_element.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..877382c5b76cac46b34f313eeac6956bd4c3a1f9 |
--- /dev/null |
+++ b/ash/common/devtools/widget_element.h |
@@ -0,0 +1,44 @@ |
+// 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_WIDGET_ELEMENT_H_ |
+#define ASH_COMMON_DEVTOOLS_WIDGET_ELEMENT_H_ |
+ |
+#include "ash/common/devtools/ui_element.h" |
+#include "ui/gfx/geometry/rect.h" |
+#include "ui/views/widget/widget.h" |
+#include "ui/views/widget/widget_observer.h" |
+#include "ui/views/widget/widget_removals_observer.h" |
+ |
+namespace ash { |
+namespace devtools { |
+ |
+class WidgetElement : public views::WidgetObserver, |
+ public views::WidgetRemovalsObserver, |
+ public UIElement { |
+ public: |
+ WidgetElement(views::Widget* widget); |
+ |
+ // views::WidgetRemovalsObserver: |
+ void OnWillRemoveView(views::Widget* widget, views::View* view) override; |
+ |
+ // views::WidgetObserver: |
+ void OnWidgetBoundsChanged(views::Widget* widget, |
+ const gfx::Rect& new_bounds) 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::Widget* widget_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(WidgetElement); |
+}; |
+ |
+} // namespace devtools |
+} // namespace ash |
+ |
+#endif // ASH_COMMON_DEVTOOLS_WIDGET_ELEMENT_H_ |