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

Side by Side Diff: ash/common/devtools/view_element.h

Issue 2776543002: Create a unified UIElement interface for Widget, View and Window. (Closed)
Patch Set: . Created 3 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_COMMON_DEVTOOLS_VIEW_ELEMENT_H_
6 #define ASH_COMMON_DEVTOOLS_VIEW_ELEMENT_H_
7
8 #include "ash/common/devtools/ui_element.h"
9 #include "ui/gfx/geometry/rect.h"
10 #include "ui/views/view.h"
11 #include "ui/views/view_observer.h"
12
13 namespace ash {
14 namespace devtools {
15
16 class ViewElement : public views::ViewObserver, public UIElement {
17 public:
18 // views::ViewObserver
19 void OnChildViewRemoved(views::View* parent, views::View* view) override;
20 void OnChildViewAdded(views::View* parent, views::View* view) override;
21 void OnChildViewReordered(views::View* parent, views::View*) override;
22 void OnViewBoundsChanged(views::View* view) override;
23
24 bool GetBounds(gfx::Rect* bounds) override;
25 bool SetBounds(const gfx::Rect& bounds) override;
26 bool GetVisible(bool* visible) override;
27 bool SetVisible(bool visible) override;
28
29 private:
30 views::View* view;
31
32 DISALLOW_COPY_AND_ASSIGN(ViewElement);
33 };
34
35 } // namespace devtools
36 } // namespace ash
37
38 #endif // ASH_COMMON_DEVTOOLS_VIEW_ELEMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698