Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(635)

Side by Side Diff: components/ui_devtools/views/view_element.cc

Issue 2899783002: Move DevTools out of ash and turn it to a component. (Closed)
Patch Set: add README.md Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_devtools {
11 namespace devtools {
12 11
13 ViewElement::ViewElement(views::View* view, 12 ViewElement::ViewElement(views::View* view,
14 UIElementDelegate* ui_element_delegate, 13 UIElementDelegate* ui_element_delegate,
15 UIElement* parent) 14 UIElement* parent)
16 : UIElement(UIElementType::VIEW, ui_element_delegate, parent), view_(view) { 15 : UIElement(UIElementType::VIEW, ui_element_delegate, parent), view_(view) {
17 view_->AddObserver(this); 16 view_->AddObserver(this);
18 } 17 }
19 18
20 ViewElement::~ViewElement() { 19 ViewElement::~ViewElement() {
21 view_->RemoveObserver(this); 20 view_->RemoveObserver(this);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 return std::make_pair(view_->GetWidget()->GetNativeWindow(), 77 return std::make_pair(view_->GetWidget()->GetNativeWindow(),
79 view_->GetBoundsInScreen()); 78 view_->GetBoundsInScreen());
80 } 79 }
81 80
82 // static 81 // static
83 views::View* ViewElement::From(UIElement* element) { 82 views::View* ViewElement::From(UIElement* element) {
84 DCHECK_EQ(UIElementType::VIEW, element->type()); 83 DCHECK_EQ(UIElementType::VIEW, element->type());
85 return static_cast<ViewElement*>(element)->view_; 84 return static_cast<ViewElement*>(element)->view_;
86 } 85 }
87 86
88 } // namespace devtools 87 } // namespace ui_devtools
89 } // namespace ash
OLDNEW
« no previous file with comments | « components/ui_devtools/views/view_element.h ('k') | components/ui_devtools/views/widget_element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698