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/devtools/widget_element.h" |
6 | 6 |
7 #include "ash/devtools/ui_element_delegate.h" | 7 #include "components/ui_devtools/devtools/ui_element_delegate.h" |
8 | 8 |
9 namespace ash { | 9 namespace ui { |
10 namespace devtools { | 10 namespace devtools { |
11 | 11 |
12 WidgetElement::WidgetElement(views::Widget* widget, | 12 WidgetElement::WidgetElement(views::Widget* widget, |
13 UIElementDelegate* ui_element_delegate, | 13 UIElementDelegate* ui_element_delegate, |
14 UIElement* parent) | 14 UIElement* parent) |
15 : UIElement(UIElementType::WIDGET, ui_element_delegate, parent), | 15 : UIElement(UIElementType::WIDGET, ui_element_delegate, parent), |
16 widget_(widget) { | 16 widget_(widget) { |
17 widget_->AddRemovalsObserver(this); | 17 widget_->AddRemovalsObserver(this); |
18 } | 18 } |
19 | 19 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 widget_->GetWindowBoundsInScreen()); | 67 widget_->GetWindowBoundsInScreen()); |
68 } | 68 } |
69 | 69 |
70 // static | 70 // static |
71 views::Widget* WidgetElement::From(UIElement* element) { | 71 views::Widget* WidgetElement::From(UIElement* element) { |
72 DCHECK_EQ(UIElementType::WIDGET, element->type()); | 72 DCHECK_EQ(UIElementType::WIDGET, element->type()); |
73 return static_cast<WidgetElement*>(element)->widget_; | 73 return static_cast<WidgetElement*>(element)->widget_; |
74 } | 74 } |
75 | 75 |
76 } // namespace devtools | 76 } // namespace devtools |
77 } // namespace ash | 77 } // namespace ui |
OLD | NEW |