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

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

Issue 2852733002: Duplicate -Move DevTools out of ash and turn it to a component. (Closed)
Patch Set: move unittest to ui/views Created 3 years, 7 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/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
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
OLDNEW
« no previous file with comments | « components/ui_devtools/devtools/view_element.h ('k') | components/ui_devtools/devtools/widget_element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698