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

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

Issue 2498593002: Revert of Fix bug where removed (but not deleted) windows are not reflected in the tree properly (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | 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" 9 #include "ash/common/wm_window_observer.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 10 matching lines...) Expand all
21 public: 21 public:
22 explicit AshDevToolsDOMAgent(ash::WmShell* shell); 22 explicit AshDevToolsDOMAgent(ash::WmShell* shell);
23 ~AshDevToolsDOMAgent() override; 23 ~AshDevToolsDOMAgent() override;
24 24
25 // DOM::Backend 25 // DOM::Backend
26 ui::devtools::protocol::Response disable() override; 26 ui::devtools::protocol::Response disable() override;
27 ui::devtools::protocol::Response getDocument( 27 ui::devtools::protocol::Response getDocument(
28 std::unique_ptr<ui::devtools::protocol::DOM::Node>* out_root) override; 28 std::unique_ptr<ui::devtools::protocol::DOM::Node>* out_root) override;
29 29
30 // WindowObserver 30 // WindowObserver
31 void OnWindowTreeChanging(WmWindow* window, 31 void OnWindowDestroying(WmWindow* window) override;
32 const TreeChangeParams& params) override;
33 void OnWindowTreeChanged(WmWindow* window, 32 void OnWindowTreeChanged(WmWindow* window,
34 const TreeChangeParams& params) override; 33 const TreeChangeParams& params) override;
35 void OnWindowStackingChanged(WmWindow* window) override; 34 void OnWindowStackingChanged(WmWindow* window) override;
36 35
37 private: 36 private:
38 std::unique_ptr<ui::devtools::protocol::DOM::Node> BuildTreeForWindow( 37 std::unique_ptr<ui::devtools::protocol::DOM::Node> BuildTreeForWindow(
39 WmWindow* window); 38 WmWindow* window);
40 std::unique_ptr<ui::devtools::protocol::DOM::Node> BuildInitialTree(); 39 std::unique_ptr<ui::devtools::protocol::DOM::Node> BuildInitialTree();
41 void AddWindowNode(WmWindow* window); 40 void AddWindowNode(WmWindow* window);
42 void RemoveWindowNode(WmWindow* window); 41 void RemoveWindowNode(WmWindow* window, WmWindow* old_parent);
43 void RemoveObserverFromAllWindows(); 42 void RemoveObserverFromAllWindows();
44 void AddRootWindowObservers(); 43 void AddRootWindowObservers();
45 void Reset(); 44 void Reset();
46 45
47 ash::WmShell* shell_; 46 ash::WmShell* shell_;
48 47
49 using WindowToNodeIdMap = std::unordered_map<WmWindow*, int>; 48 using WindowToNodeIdMap = std::unordered_map<WmWindow*, int>;
50 WindowToNodeIdMap window_to_node_id_map_; 49 WindowToNodeIdMap window_to_node_id_map_;
51 50
52 DISALLOW_COPY_AND_ASSIGN(AshDevToolsDOMAgent); 51 DISALLOW_COPY_AND_ASSIGN(AshDevToolsDOMAgent);
53 }; 52 };
54 53
55 } // namespace devtools 54 } // namespace devtools
56 } // namespace ash 55 } // namespace ash
57 56
58 #endif // ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_DOM_AGENT_H_ 57 #endif // ASH_COMMON_DEVTOOLS_ASH_DEVTOOLS_DOM_AGENT_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/devtools/ash_devtools_dom_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698