| Index: components/ui_devtools/views/ui_devtools_dom_agent.h
|
| diff --git a/components/ui_devtools/views/ui_devtools_dom_agent.h b/components/ui_devtools/views/ui_devtools_dom_agent.h
|
| index 701547f6cca0ee5b50a062311f45d9e2529ee8d4..77113669ad52acb1d5ba524bda281edc62e68489 100644
|
| --- a/components/ui_devtools/views/ui_devtools_dom_agent.h
|
| +++ b/components/ui_devtools/views/ui_devtools_dom_agent.h
|
| @@ -9,6 +9,7 @@
|
| #include "components/ui_devtools/devtools_base_agent.h"
|
| #include "components/ui_devtools/views/ui_element_delegate.h"
|
| #include "ui/aura/env_observer.h"
|
| +#include "ui/events/event_handler.h"
|
| #include "ui/views/view.h"
|
| #include "ui/views/widget/widget.h"
|
|
|
| @@ -16,8 +17,13 @@ namespace aura {
|
| class Window;
|
| }
|
|
|
| +namespace ui {
|
| +class MouseEvent;
|
| +}
|
| +
|
| namespace ui_devtools {
|
|
|
| +class UIDevToolsOverlayAgent;
|
| class UIElement;
|
|
|
| class UIDevToolsDOMAgentObserver {
|
| @@ -29,9 +35,10 @@ class UIDevToolsDOMAgentObserver {
|
| class UIDevToolsDOMAgent : public ui_devtools::UiDevToolsBaseAgent<
|
| ui_devtools::protocol::DOM::Metainfo>,
|
| public UIElementDelegate,
|
| - public aura::EnvObserver {
|
| + public aura::EnvObserver,
|
| + public ui::EventHandler {
|
| public:
|
| - UIDevToolsDOMAgent();
|
| + UIDevToolsDOMAgent(UIDevToolsOverlayAgent* overlay_agent);
|
| ~UIDevToolsDOMAgent() override;
|
|
|
| // DOM::Backend:
|
| @@ -42,6 +49,11 @@ class UIDevToolsDOMAgent : public ui_devtools::UiDevToolsBaseAgent<
|
| std::unique_ptr<ui_devtools::protocol::DOM::HighlightConfig>
|
| highlight_config,
|
| ui_devtools::protocol::Maybe<int> node_id) override;
|
| + ui_devtools::protocol::Response setInspectMode(
|
| + ui_devtools::protocol::Maybe<String> mode,
|
| + std::unique_ptr<ui_devtools::protocol::DOM::HighlightConfig>
|
| + highlight_config,
|
| + ui_devtools::protocol::Maybe<int> node_id) override;
|
| ui_devtools::protocol::Response hideHighlight() override;
|
|
|
| // UIElementDelegate:
|
| @@ -51,6 +63,9 @@ class UIDevToolsDOMAgent : public ui_devtools::UiDevToolsBaseAgent<
|
| void OnUIElementBoundsChanged(UIElement* ui_element) override;
|
| bool IsHighlightingWindow(aura::Window* window) override;
|
|
|
| + // ui:EventHandler:
|
| + void OnMouseEvent(ui::MouseEvent* event) override;
|
| +
|
| void AddObserver(UIDevToolsDOMAgentObserver* observer);
|
| void RemoveObserver(UIDevToolsDOMAgentObserver* observer);
|
| UIElement* GetElementFromNodeId(int node_id);
|
| @@ -89,6 +104,7 @@ class UIDevToolsDOMAgent : public ui_devtools::UiDevToolsBaseAgent<
|
| highlight_config,
|
| int node_id);
|
|
|
| + UIDevToolsOverlayAgent* overlay_agent_;
|
| bool is_building_tree_;
|
| std::unique_ptr<UIElement> window_element_root_;
|
| std::unordered_map<int, UIElement*> node_id_to_ui_element_;
|
|
|