OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/devtools/widget_element.h" | 5 #include "components/ui_devtools/views/widget_element.h" |
6 | 6 |
7 #include "ash/devtools/ui_element_delegate.h" | 7 #include "components/ui_devtools/views/ui_element_delegate.h" |
8 | 8 |
9 namespace ash { | 9 namespace ui_devtools { |
10 namespace devtools { | |
11 | 10 |
12 WidgetElement::WidgetElement(views::Widget* widget, | 11 WidgetElement::WidgetElement(views::Widget* widget, |
13 UIElementDelegate* ui_element_delegate, | 12 UIElementDelegate* ui_element_delegate, |
14 UIElement* parent) | 13 UIElement* parent) |
15 : UIElement(UIElementType::WIDGET, ui_element_delegate, parent), | 14 : UIElement(UIElementType::WIDGET, ui_element_delegate, parent), |
16 widget_(widget) { | 15 widget_(widget) { |
17 widget_->AddRemovalsObserver(this); | 16 widget_->AddRemovalsObserver(this); |
18 } | 17 } |
19 | 18 |
20 WidgetElement::~WidgetElement() { | 19 WidgetElement::~WidgetElement() { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 return std::make_pair(widget_->GetNativeWindow(), | 61 return std::make_pair(widget_->GetNativeWindow(), |
63 widget_->GetWindowBoundsInScreen()); | 62 widget_->GetWindowBoundsInScreen()); |
64 } | 63 } |
65 | 64 |
66 // static | 65 // static |
67 views::Widget* WidgetElement::From(UIElement* element) { | 66 views::Widget* WidgetElement::From(UIElement* element) { |
68 DCHECK_EQ(UIElementType::WIDGET, element->type()); | 67 DCHECK_EQ(UIElementType::WIDGET, element->type()); |
69 return static_cast<WidgetElement*>(element)->widget_; | 68 return static_cast<WidgetElement*>(element)->widget_; |
70 } | 69 } |
71 | 70 |
72 } // namespace devtools | 71 } // namespace ui_devtools |
73 } // namespace ash | |
OLD | NEW |