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

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

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 #ifndef ASH_DEVTOOLS_VIEW_ELEMENT_H_ 5 #ifndef COMPONENTS_UI_DEVTOOLS_DEVTOOLS_VIEW_ELEMENT_H_
6 #define ASH_DEVTOOLS_VIEW_ELEMENT_H_ 6 #define COMPONENTS_UI_DEVTOOLS_DEVTOOLS_VIEW_ELEMENT_H_
7 7
8 #include "ash/ash_export.h"
9 #include "ash/devtools/ui_element.h"
10 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/ui_devtools/devtools/ui_element.h"
11 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
12 #include "ui/gfx/geometry/rect.h" 11 #include "ui/gfx/geometry/rect.h"
13 #include "ui/views/view.h" 12 #include "ui/views/view.h"
14 #include "ui/views/view_observer.h" 13 #include "ui/views/view_observer.h"
15 14
16 namespace ash { 15 namespace ui {
17 namespace devtools { 16 namespace devtools {
18 17
19 class UIElementDelegate; 18 class UIElementDelegate;
20 19
21 class ASH_EXPORT ViewElement : public views::ViewObserver, public UIElement { 20 class ViewElement : public views::ViewObserver, public UIElement {
22 public: 21 public:
23 ViewElement(views::View* view, 22 ViewElement(views::View* view,
24 UIElementDelegate* ui_element_delegate, 23 UIElementDelegate* ui_element_delegate,
25 UIElement* parent); 24 UIElement* parent);
26 ~ViewElement() override; 25 ~ViewElement() override;
27 views::View* view() const { return view_; }; 26 views::View* view() const { return view_; };
28 27
29 // views::ViewObserver 28 // views::ViewObserver
30 void OnChildViewRemoved(views::View* parent, views::View* view) override; 29 void OnChildViewRemoved(views::View* parent, views::View* view) override;
31 void OnChildViewAdded(views::View* parent, views::View* view) override; 30 void OnChildViewAdded(views::View* parent, views::View* view) override;
32 void OnChildViewReordered(views::View* parent, views::View*) override; 31 void OnChildViewReordered(views::View* parent, views::View*) override;
33 void OnViewBoundsChanged(views::View* view) override; 32 void OnViewBoundsChanged(views::View* view) override;
34 33
35 // UIElement: 34 // UIElement:
36 void Destroy() override; 35 void Destroy() override;
37 void GetBounds(gfx::Rect* bounds) const override; 36 void GetBounds(gfx::Rect* bounds) const override;
38 void SetBounds(const gfx::Rect& bounds) override; 37 void SetBounds(const gfx::Rect& bounds) override;
39 void GetVisible(bool* visible) const override; 38 void GetVisible(bool* visible) const override;
40 void SetVisible(bool visible) override; 39 void SetVisible(bool visible) override;
41 std::pair<aura::Window*, gfx::Rect> GetNodeWindowAndBounds() const override; 40 std::pair<aura::Window*, gfx::Rect> GetNodeWindowAndBounds() const override;
42 static views::View* From(UIElement* element); 41 static views::View* From(UIElement* element);
43 42
44 private: 43 private:
45 views::View* view_; 44 views::View* view_;
46 45
47 DISALLOW_COPY_AND_ASSIGN(ViewElement); 46 DISALLOW_COPY_AND_ASSIGN(ViewElement);
48 }; 47 };
49 48
50 } // namespace devtools 49 } // namespace devtools
51 } // namespace ash 50 } // namespace ui
52 51
53 #endif // ASH_DEVTOOLS_VIEW_ELEMENT_H_ 52 #endif // COMPONENTS_UI_DEVTOOLS_DEVTOOLS_VIEW_ELEMENT_H_
OLDNEW
« no previous file with comments | « components/ui_devtools/devtools/ui_element_delegate.h ('k') | components/ui_devtools/devtools/view_element.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698