| 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/devtools/view_element.h" |
| 6 | 6 |
| 7 #include "ash/devtools/ui_element_delegate.h" | 7 #include "components/ui_devtools/devtools/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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 return std::make_pair(view_->GetWidget()->GetNativeWindow(), view_->bounds()); | 83 return std::make_pair(view_->GetWidget()->GetNativeWindow(), view_->bounds()); |
| 84 } | 84 } |
| 85 | 85 |
| 86 // static | 86 // static |
| 87 views::View* ViewElement::From(UIElement* element) { | 87 views::View* ViewElement::From(UIElement* element) { |
| 88 DCHECK_EQ(UIElementType::VIEW, element->type()); | 88 DCHECK_EQ(UIElementType::VIEW, element->type()); |
| 89 return static_cast<ViewElement*>(element)->view_; | 89 return static_cast<ViewElement*>(element)->view_; |
| 90 } | 90 } |
| 91 | 91 |
| 92 } // namespace devtools | 92 } // namespace devtools |
| 93 } // namespace ash | 93 } // namespace ui |
| OLD | NEW |