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

Unified Diff: ash/devtools/ash_devtools_dom_agent.h

Issue 2865713003: Remove ash dependency. (Closed)
Patch Set: nits 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/devtools/ash_devtools_dom_agent.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/devtools/ash_devtools_dom_agent.h
diff --git a/ash/devtools/ash_devtools_dom_agent.h b/ash/devtools/ash_devtools_dom_agent.h
index 0569f840c89d3328bab42ab3d0c724ca9a3b41d1..8a171fea93b71589b06cfba33769106936e97637 100644
--- a/ash/devtools/ash_devtools_dom_agent.h
+++ b/ash/devtools/ash_devtools_dom_agent.h
@@ -10,6 +10,7 @@
#include "base/macros.h"
#include "components/ui_devtools/DOM.h"
#include "components/ui_devtools/devtools_base_agent.h"
+#include "ui/aura/env_observer.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
@@ -31,7 +32,8 @@ class ASH_EXPORT AshDevToolsDOMAgentObserver {
class ASH_EXPORT AshDevToolsDOMAgent
: public NON_EXPORTED_BASE(ui::devtools::UiDevToolsBaseAgent<
ui::devtools::protocol::DOM::Metainfo>),
- public UIElementDelegate {
+ public UIElementDelegate,
+ public aura::EnvObserver {
public:
AshDevToolsDOMAgent();
~AshDevToolsDOMAgent() override;
@@ -57,10 +59,16 @@ class ASH_EXPORT AshDevToolsDOMAgent
void RemoveObserver(AshDevToolsDOMAgentObserver* observer);
UIElement* GetElementFromNodeId(int node_id);
UIElement* window_element_root() const { return window_element_root_.get(); };
+ const std::vector<aura::Window*>& root_windows() const {
+ return root_windows_;
+ };
private:
- void OnNodeBoundsChanged(int node_id);
+ // aura::EnvObserver:
+ void OnWindowInitialized(aura::Window* window) override {}
+ void OnHostInitialized(aura::WindowTreeHost* host) override;
+ void OnNodeBoundsChanged(int node_id);
std::unique_ptr<ui::devtools::protocol::DOM::Node> BuildInitialTree();
std::unique_ptr<ui::devtools::protocol::DOM::Node> BuildTreeForUIElement(
UIElement* ui_element);
@@ -89,6 +97,7 @@ class ASH_EXPORT AshDevToolsDOMAgent
std::unique_ptr<UIElement> window_element_root_;
std::unordered_map<int, UIElement*> node_id_to_ui_element_;
std::unique_ptr<views::Widget> widget_for_highlighting_;
+ std::vector<aura::Window*> root_windows_;
base::ObserverList<AshDevToolsDOMAgentObserver> observers_;
DISALLOW_COPY_AND_ASSIGN(AshDevToolsDOMAgent);
« no previous file with comments | « no previous file | ash/devtools/ash_devtools_dom_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698