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/view_element.h" | 5 #include "components/ui_devtools/views/view_element.h" |
6 | 6 |
7 #include "ash/devtools/ui_element_delegate.h" | 7 #include "components/ui_devtools/views/ui_element_delegate.h" |
8 #include "ui/views/widget/widget.h" | 8 #include "ui/views/widget/widget.h" |
9 | 9 |
10 namespace ash { | 10 namespace ui { |
11 namespace devtools { | 11 namespace devtools { |
12 | 12 |
13 ViewElement::ViewElement(views::View* view, | 13 ViewElement::ViewElement(views::View* view, |
14 UIElementDelegate* ui_element_delegate, | 14 UIElementDelegate* ui_element_delegate, |
15 UIElement* parent) | 15 UIElement* parent) |
16 : UIElement(UIElementType::VIEW, ui_element_delegate, parent), view_(view) { | 16 : UIElement(UIElementType::VIEW, ui_element_delegate, parent), view_(view) { |
17 view_->AddObserver(this); | 17 view_->AddObserver(this); |
18 } | 18 } |
19 | 19 |
20 ViewElement::~ViewElement() { | 20 ViewElement::~ViewElement() { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 view_->GetBoundsInScreen()); | 79 view_->GetBoundsInScreen()); |
80 } | 80 } |
81 | 81 |
82 // static | 82 // static |
83 views::View* ViewElement::From(UIElement* element) { | 83 views::View* ViewElement::From(UIElement* element) { |
84 DCHECK_EQ(UIElementType::VIEW, element->type()); | 84 DCHECK_EQ(UIElementType::VIEW, element->type()); |
85 return static_cast<ViewElement*>(element)->view_; | 85 return static_cast<ViewElement*>(element)->view_; |
86 } | 86 } |
87 | 87 |
88 } // namespace devtools | 88 } // namespace devtools |
89 } // namespace ash | 89 } // namespace ui |
OLD | NEW |