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_WIDGET_ELEMENT_H_ |
| 6 #define ASH_COMMON_DEVTOOLS_WIDGET_ELEMENT_H_ |
| 7 |
| 8 #include "ash/common/devtools/ui_element.h" |
| 9 #include "ui/gfx/geometry/rect.h" |
| 10 #include "ui/views/widget/widget.h" |
| 11 #include "ui/views/widget/widget_observer.h" |
| 12 #include "ui/views/widget/widget_removals_observer.h" |
| 13 |
| 14 namespace ash { |
| 15 namespace devtools { |
| 16 |
| 17 class WidgetElement : public views::WidgetObserver, |
| 18 public views::WidgetRemovalsObserver, |
| 19 public UIElement { |
| 20 public: |
| 21 WidgetElement(views::Widget* widget); |
| 22 |
| 23 // views::WidgetRemovalsObserver: |
| 24 void OnWillRemoveView(views::Widget* widget, views::View* view) override; |
| 25 |
| 26 // views::WidgetObserver: |
| 27 void OnWidgetBoundsChanged(views::Widget* widget, |
| 28 const gfx::Rect& new_bounds) override; |
| 29 |
| 30 bool GetBounds(gfx::Rect* bounds) override; |
| 31 bool SetBounds(const gfx::Rect& bounds) override; |
| 32 bool GetVisible(bool* visible) override; |
| 33 bool SetVisible(bool visible) override; |
| 34 |
| 35 private: |
| 36 views::Widget* widget_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(WidgetElement); |
| 39 }; |
| 40 |
| 41 } // namespace devtools |
| 42 } // namespace ash |
| 43 |
| 44 #endif // ASH_COMMON_DEVTOOLS_WIDGET_ELEMENT_H_ |
OLD | NEW |