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

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

Issue 2899783002: Move DevTools out of ash and turn it to a component. (Closed)
Patch Set: rebase 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/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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698