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

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

Issue 2776543002: Create a unified UIElement interface for Widget, View and Window. (Closed)
Patch Set: . Created 3 years, 9 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_WINDOW_ELEMENT_H_
6 #define ASH_COMMON_DEVTOOLS_WINDOW_ELEMENT_H_
7
8 #include "ash/common/devtools/ui_element.h"
9 #include "ash/common/wm_window.h"
10 #include "ui/aura/window_observer.h"
11 #include "ui/gfx/geometry/rect.h"
12
13 namespace ash {
14 namespace devtools {
15
16 class WindowElement : public aura::WindowObserver, public UIElement {
17 public:
18 // WindowObserver:
19 void OnWindowHierarchyChanging(
20 const aura::WindowObserver::HierarchyChangeParams& params) override;
21 void OnWindowHierarchyChanged(
22 const aura::WindowObserver::HierarchyChangeParams& params) override;
23 void OnWindowStackingChanged(aura::Window* window) override;
24 void OnWindowBoundsChanged(aura::Window* window,
25 const gfx::Rect& old_bounds,
26 const gfx::Rect& new_bounds) override;
27 bool GetBounds(gfx::Rect* bounds) override;
28 bool SetBounds(const gfx::Rect& bounds) override;
29 bool GetVisible(bool* visible) override;
30 bool SetVisible(bool visible) override;
31
32 private:
33 WmWindow* window;
34
35 DISALLOW_COPY_AND_ASSIGN(WindowElement);
36 };
37
38 } // namespace devtools
39 } // namespace ash
40
41 #endif // ASH_COMMON_DEVTOOLS_WINDOW_ELEMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698