| 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 "ash/devtools/view_element.h" |
| 6 | 6 |
| 7 #include "ash/devtools/ui_element_delegate.h" | 7 #include "ash/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 ash { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 void ViewElement::GetVisible(bool* visible) const { | 68 void ViewElement::GetVisible(bool* visible) const { |
| 69 *visible = view_->visible(); | 69 *visible = view_->visible(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void ViewElement::SetVisible(bool visible) { | 72 void ViewElement::SetVisible(bool visible) { |
| 73 view_->SetVisible(visible); | 73 view_->SetVisible(visible); |
| 74 } | 74 } |
| 75 | 75 |
| 76 std::pair<aura::Window*, gfx::Rect> ViewElement::GetNodeWindowAndBounds() | 76 std::pair<aura::Window*, gfx::Rect> ViewElement::GetNodeWindowAndBounds() |
| 77 const { | 77 const { |
| 78 return std::make_pair(view_->GetWidget()->GetNativeWindow(), view_->bounds()); | 78 return std::make_pair(view_->GetWidget()->GetNativeWindow(), |
| 79 view_->GetBoundsInScreen()); |
| 79 } | 80 } |
| 80 | 81 |
| 81 // static | 82 // static |
| 82 views::View* ViewElement::From(UIElement* element) { | 83 views::View* ViewElement::From(UIElement* element) { |
| 83 DCHECK_EQ(UIElementType::VIEW, element->type()); | 84 DCHECK_EQ(UIElementType::VIEW, element->type()); |
| 84 return static_cast<ViewElement*>(element)->view_; | 85 return static_cast<ViewElement*>(element)->view_; |
| 85 } | 86 } |
| 86 | 87 |
| 87 } // namespace devtools | 88 } // namespace devtools |
| 88 } // namespace ash | 89 } // namespace ash |
| OLD | NEW |