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

Unified Diff: components/ui_devtools/views/ui_devtools_overlay_agent.h

Issue 2959263002: Show corresponding window/widget/view in UIElement tree when clicking on a UI element. (Closed)
Patch Set: set handled for cancelable event mouse click Created 3 years, 5 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
Index: components/ui_devtools/views/ui_devtools_overlay_agent.h
diff --git a/components/ui_devtools/views/ui_devtools_overlay_agent.h b/components/ui_devtools/views/ui_devtools_overlay_agent.h
new file mode 100644
index 0000000000000000000000000000000000000000..4d14b58907910f19e1980219d79455e728433e0c
--- /dev/null
+++ b/components/ui_devtools/views/ui_devtools_overlay_agent.h
@@ -0,0 +1,47 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_UI_DEVTOOLS_VIEWS_UI_DEVTOOLS_OVERLAY_AGENT_H_
+#define COMPONENTS_UI_DEVTOOLS_VIEWS_UI_DEVTOOLS_OVERLAY_AGENT_H_
+
+#include "components/ui_devtools/Overlay.h"
+#include "components/ui_devtools/views/ui_devtools_dom_agent.h"
+#include "ui/events/event_handler.h"
+
+namespace ui_devtools {
+
+class UIDevToolsOverlayAgent : public ui_devtools::UiDevToolsBaseAgent<
+ ui_devtools::protocol::Overlay::Metainfo>,
+ public UIDevToolsDOMAgentObserver,
+ public ui::EventHandler {
+ public:
+ explicit UIDevToolsOverlayAgent(UIDevToolsDOMAgent* dom_agent);
+ ~UIDevToolsOverlayAgent() override;
+
+ // DOM::Backend:
+ ui_devtools::protocol::Response enable() override;
+ ui_devtools::protocol::Response disable() override;
+ ui_devtools::protocol::Response setInspectMode(
+ const String& in_mode,
+ protocol::Maybe<protocol::Overlay::HighlightConfig> in_highlightConfig)
+ override;
+ ui_devtools::protocol::Response highlightNode(
+ std::unique_ptr<ui_devtools::protocol::Overlay::HighlightConfig>
+ highlight_config,
+ ui_devtools::protocol::Maybe<int> node_id) override;
+ ui_devtools::protocol::Response hideHighlight() override;
+ void OnNodeBoundsChanged(int node_id) override;
+
+ // ui:EventHandler:
+ void OnMouseEvent(ui::MouseEvent* event) override;
+
+ private:
+ UIDevToolsDOMAgent* dom_agent_;
+
+ DISALLOW_COPY_AND_ASSIGN(UIDevToolsOverlayAgent);
+};
+
+} // namespace ui_devtools
+
+#endif // COMPONENTS_UI_DEVTOOLS_VIEWS_UI_DEVTOOLS_OVERLAY_AGENT_H_
« no previous file with comments | « components/ui_devtools/views/ui_devtools_dom_agent.cc ('k') | components/ui_devtools/views/ui_devtools_overlay_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698