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

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

Issue 2699033002: Replace WmWindowObserver with aura::WindowObserver. (Closed)
Patch Set: Check for null images in ShelfWindowWatcher. Created 3 years, 10 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
« no previous file with comments | « ash/BUILD.gn ('k') | ash/common/devtools/ash_devtools_dom_agent.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_COMMON_DEVTOOLS_ASH_DEVTOOLS_DOM_AGENT_H_ 5 #ifndef ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_DOM_AGENT_H_
6 #define ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_DOM_AGENT_H_ 6 #define ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_DOM_AGENT_H_
7 7
8 #include "ash/common/wm_shell.h" 8 #include "ash/common/wm_shell.h"
9 #include "ash/common/wm_window_observer.h"
10 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
11 #include "base/observer_list.h" 10 #include "base/observer_list.h"
12 #include "components/ui_devtools/DOM.h" 11 #include "components/ui_devtools/DOM.h"
13 #include "components/ui_devtools/devtools_base_agent.h" 12 #include "components/ui_devtools/devtools_base_agent.h"
13 #include "ui/aura/window_observer.h"
14 #include "ui/views/view.h" 14 #include "ui/views/view.h"
15 #include "ui/views/view_observer.h" 15 #include "ui/views/view_observer.h"
16 #include "ui/views/widget/widget.h" 16 #include "ui/views/widget/widget.h"
17 #include "ui/views/widget/widget_observer.h" 17 #include "ui/views/widget/widget_observer.h"
18 #include "ui/views/widget/widget_removals_observer.h" 18 #include "ui/views/widget/widget_removals_observer.h"
19 19
20 namespace ash { 20 namespace ash {
21 namespace devtools { 21 namespace devtools {
22 22
23 class ASH_EXPORT AshDevToolsDOMAgentObserver { 23 class ASH_EXPORT AshDevToolsDOMAgentObserver {
24 public: 24 public:
25 virtual void OnWindowBoundsChanged(WmWindow* window) {} 25 virtual void OnWindowBoundsChanged(WmWindow* window) {}
26 virtual void OnWidgetBoundsChanged(views::Widget* widget) {} 26 virtual void OnWidgetBoundsChanged(views::Widget* widget) {}
27 virtual void OnViewBoundsChanged(views::View* view) {} 27 virtual void OnViewBoundsChanged(views::View* view) {}
28 }; 28 };
29 29
30 class ASH_EXPORT AshDevToolsDOMAgent 30 class ASH_EXPORT AshDevToolsDOMAgent
31 : public NON_EXPORTED_BASE(ui::devtools::UiDevToolsBaseAgent< 31 : public NON_EXPORTED_BASE(ui::devtools::UiDevToolsBaseAgent<
32 ui::devtools::protocol::DOM::Metainfo>), 32 ui::devtools::protocol::DOM::Metainfo>),
33 public WmWindowObserver, 33 public aura::WindowObserver,
34 public views::WidgetObserver, 34 public views::WidgetObserver,
35 public views::WidgetRemovalsObserver, 35 public views::WidgetRemovalsObserver,
36 public views::ViewObserver { 36 public views::ViewObserver {
37 public: 37 public:
38 AshDevToolsDOMAgent(ash::WmShell* shell); 38 AshDevToolsDOMAgent(ash::WmShell* shell);
39 ~AshDevToolsDOMAgent() override; 39 ~AshDevToolsDOMAgent() override;
40 40
41 // DOM::Backend 41 // DOM::Backend
42 ui::devtools::protocol::Response disable() override; 42 ui::devtools::protocol::Response disable() override;
43 ui::devtools::protocol::Response getDocument( 43 ui::devtools::protocol::Response getDocument(
44 std::unique_ptr<ui::devtools::protocol::DOM::Node>* out_root) override; 44 std::unique_ptr<ui::devtools::protocol::DOM::Node>* out_root) override;
45 ui::devtools::protocol::Response highlightNode( 45 ui::devtools::protocol::Response highlightNode(
46 std::unique_ptr<ui::devtools::protocol::DOM::HighlightConfig> 46 std::unique_ptr<ui::devtools::protocol::DOM::HighlightConfig>
47 highlight_config, 47 highlight_config,
48 ui::devtools::protocol::Maybe<int> node_id) override; 48 ui::devtools::protocol::Maybe<int> node_id) override;
49 ui::devtools::protocol::Response hideHighlight() override; 49 ui::devtools::protocol::Response hideHighlight() override;
50 50
51 // WindowObserver 51 // WindowObserver
52 void OnWindowTreeChanging(WmWindow* window, 52 void OnWindowHierarchyChanging(const HierarchyChangeParams& params) override;
53 const TreeChangeParams& params) override; 53 void OnWindowHierarchyChanged(const HierarchyChangeParams& params) override;
54 void OnWindowTreeChanged(WmWindow* window, 54 void OnWindowStackingChanged(aura::Window* window) override;
55 const TreeChangeParams& params) override; 55 void OnWindowBoundsChanged(aura::Window* window,
56 void OnWindowStackingChanged(WmWindow* window) override;
57 void OnWindowBoundsChanged(WmWindow* window,
58 const gfx::Rect& old_bounds, 56 const gfx::Rect& old_bounds,
59 const gfx::Rect& new_bounds) override; 57 const gfx::Rect& new_bounds) override;
60 58
61 // views::WidgetRemovalsObserver 59 // views::WidgetRemovalsObserver
62 void OnWillRemoveView(views::Widget* widget, views::View* view) override; 60 void OnWillRemoveView(views::Widget* widget, views::View* view) override;
63 61
64 // views::WidgetObserver 62 // views::WidgetObserver
65 void OnWidgetBoundsChanged(views::Widget* widget, 63 void OnWidgetBoundsChanged(views::Widget* widget,
66 const gfx::Rect& new_bounds) override; 64 const gfx::Rect& new_bounds) override;
67 65
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 146
149 base::ObserverList<AshDevToolsDOMAgentObserver> observers_; 147 base::ObserverList<AshDevToolsDOMAgentObserver> observers_;
150 148
151 DISALLOW_COPY_AND_ASSIGN(AshDevToolsDOMAgent); 149 DISALLOW_COPY_AND_ASSIGN(AshDevToolsDOMAgent);
152 }; 150 };
153 151
154 } // namespace devtools 152 } // namespace devtools
155 } // namespace ash 153 } // namespace ash
156 154
157 #endif // ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_DOM_AGENT_H_ 155 #endif // ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_DOM_AGENT_H_
OLDNEW
« no previous file with comments | « ash/BUILD.gn ('k') | ash/common/devtools/ash_devtools_dom_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698