OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_UI_DEVTOOLS_VIEWS_UI_DEVTOOLS_OVERLAY_AGENT_H_ |
| 6 #define COMPONENTS_UI_DEVTOOLS_VIEWS_UI_DEVTOOLS_OVERLAY_AGENT_H_ |
| 7 |
| 8 #include "components/ui_devtools/Overlay.h" |
| 9 #include "components/ui_devtools/views/ui_devtools_dom_agent.h" |
| 10 #include "ui/events/event_handler.h" |
| 11 |
| 12 namespace ui_devtools { |
| 13 |
| 14 class UIDevToolsOverlayAgent : public ui_devtools::UiDevToolsBaseAgent< |
| 15 ui_devtools::protocol::Overlay::Metainfo>, |
| 16 public UIDevToolsDOMAgentObserver, |
| 17 public ui::EventHandler { |
| 18 public: |
| 19 explicit UIDevToolsOverlayAgent(UIDevToolsDOMAgent* dom_agent); |
| 20 ~UIDevToolsOverlayAgent() override; |
| 21 |
| 22 // DOM::Backend: |
| 23 ui_devtools::protocol::Response enable() override; |
| 24 ui_devtools::protocol::Response disable() override; |
| 25 ui_devtools::protocol::Response setInspectMode( |
| 26 const String& in_mode, |
| 27 protocol::Maybe<protocol::Overlay::HighlightConfig> in_highlightConfig) |
| 28 override; |
| 29 ui_devtools::protocol::Response highlightNode( |
| 30 std::unique_ptr<ui_devtools::protocol::Overlay::HighlightConfig> |
| 31 highlight_config, |
| 32 ui_devtools::protocol::Maybe<int> node_id) override; |
| 33 ui_devtools::protocol::Response hideHighlight() override; |
| 34 void OnNodeBoundsChanged(int node_id) override; |
| 35 |
| 36 // ui:EventHandler: |
| 37 void OnMouseEvent(ui::MouseEvent* event) override; |
| 38 |
| 39 private: |
| 40 UIDevToolsDOMAgent* dom_agent_; |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(UIDevToolsOverlayAgent); |
| 43 }; |
| 44 |
| 45 } // namespace ui_devtools |
| 46 |
| 47 #endif // COMPONENTS_UI_DEVTOOLS_VIEWS_UI_DEVTOOLS_OVERLAY_AGENT_H_ |
OLD | NEW |