| Index: third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h
|
| diff --git a/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h b/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h
|
| index 37b076c9297fd31ce7ce54663ab657d252fa4492..1e1680febeab01765609c434b5694b2c42d3af3c 100644
|
| --- a/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h
|
| +++ b/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h
|
| @@ -34,6 +34,7 @@
|
| #include "core/CoreExport.h"
|
| #include "core/events/EventListenerMap.h"
|
| #include "core/inspector/InspectorBaseAgent.h"
|
| +#include "core/inspector/InspectorHighlight.h"
|
| #include "core/inspector/protocol/DOM.h"
|
| #include "core/style/ComputedStyleConstants.h"
|
| #include "platform/geometry/FloatQuad.h"
|
| @@ -47,7 +48,6 @@
|
| namespace blink {
|
|
|
| class CharacterData;
|
| -class Color;
|
| class DOMEditor;
|
| class Document;
|
| class DocumentLoader;
|
| @@ -77,14 +77,33 @@
|
| virtual void DidModifyDOMAttr(Element*) = 0;
|
| };
|
|
|
| + enum SearchMode {
|
| + kNotSearching,
|
| + kSearchingForNormal,
|
| + kSearchingForUAShadow,
|
| + };
|
| +
|
| + class Client {
|
| + public:
|
| + virtual ~Client() {}
|
| + virtual void HideHighlight() {}
|
| + virtual void HighlightNode(Node*,
|
| + const InspectorHighlightConfig&,
|
| + bool omit_tooltip) {}
|
| + virtual void HighlightQuad(std::unique_ptr<FloatQuad>,
|
| + const InspectorHighlightConfig&) {}
|
| + virtual void SetInspectMode(SearchMode search_mode,
|
| + std::unique_ptr<InspectorHighlightConfig>) {}
|
| + };
|
| +
|
| static protocol::Response ToResponse(ExceptionState&);
|
| static bool GetPseudoElementType(PseudoId, String*);
|
| static ShadowRoot* UserAgentShadowRoot(Node*);
|
| - static Color ParseColor(protocol::DOM::RGBA*);
|
|
|
| InspectorDOMAgent(v8::Isolate*,
|
| InspectedFrames*,
|
| - v8_inspector::V8InspectorSession*);
|
| + v8_inspector::V8InspectorSession*,
|
| + Client*);
|
| ~InspectorDOMAgent() override;
|
| DECLARE_VIRTUAL_TRACE();
|
|
|
| @@ -146,6 +165,30 @@
|
| protocol::Response discardSearchResults(const String& search_id) override;
|
| protocol::Response requestNode(const String& object_id,
|
| int* out_node_id) override;
|
| + protocol::Response setInspectMode(
|
| + const String& mode,
|
| + protocol::Maybe<protocol::DOM::HighlightConfig>) override;
|
| + protocol::Response highlightRect(
|
| + int x,
|
| + int y,
|
| + int width,
|
| + int height,
|
| + protocol::Maybe<protocol::DOM::RGBA> color,
|
| + protocol::Maybe<protocol::DOM::RGBA> outline_color) override;
|
| + protocol::Response highlightQuad(
|
| + std::unique_ptr<protocol::Array<double>> quad,
|
| + protocol::Maybe<protocol::DOM::RGBA> color,
|
| + protocol::Maybe<protocol::DOM::RGBA> outline_color) override;
|
| + protocol::Response highlightNode(
|
| + std::unique_ptr<protocol::DOM::HighlightConfig>,
|
| + protocol::Maybe<int> node_id,
|
| + protocol::Maybe<int> backend_node_id,
|
| + protocol::Maybe<String> object_id) override;
|
| + protocol::Response hideHighlight() override;
|
| + protocol::Response highlightFrame(
|
| + const String& frame_id,
|
| + protocol::Maybe<protocol::DOM::RGBA> content_color,
|
| + protocol::Maybe<protocol::DOM::RGBA> content_outline_color) override;
|
| protocol::Response pushNodeByPathToFrontend(const String& path,
|
| int* out_node_id) override;
|
| protocol::Response pushNodesByBackendIdsToFrontend(
|
| @@ -185,6 +228,9 @@
|
| int* out_node_id) override;
|
| protocol::Response getRelayoutBoundary(int node_id,
|
| int* out_node_id) override;
|
| + protocol::Response getHighlightObjectForTest(
|
| + int node_id,
|
| + std::unique_ptr<protocol::DictionaryValue>* highlight) override;
|
|
|
| bool Enabled() const;
|
| void ReleaseDanglingNodes();
|
| @@ -215,10 +261,9 @@
|
| Node* NodeForId(int node_id);
|
| int BoundNodeId(Node*);
|
| void SetDOMListener(DOMListener*);
|
| + void Inspect(Node*);
|
| + void NodeHighlightedInOverlay(Node*);
|
| int PushNodePathToFrontend(Node*);
|
| - protocol::Response PushDocumentUponHandlelessOperation();
|
| - protocol::Response NodeForRemoteObjectId(const String& remote_object_id,
|
| - Node*&);
|
|
|
| static String DocumentURLString(Document*);
|
|
|
| @@ -250,6 +295,14 @@
|
| private:
|
| void SetDocument(Document*);
|
| void InnerEnable();
|
| +
|
| + protocol::Response SetSearchingForNode(
|
| + SearchMode,
|
| + protocol::Maybe<protocol::DOM::HighlightConfig>);
|
| + protocol::Response HighlightConfigFromInspectorObject(
|
| + protocol::Maybe<protocol::DOM::HighlightConfig>
|
| + highlight_inspector_object,
|
| + std::unique_ptr<InspectorHighlightConfig>*);
|
|
|
| // Node-related methods.
|
| typedef HeapHashMap<Member<Node>, int> NodeToIdMap;
|
| @@ -292,14 +345,22 @@
|
| BuildDistributedNodesForSlot(HTMLSlotElement*);
|
|
|
| Node* NodeForPath(const String& path);
|
| + protocol::Response NodeForRemoteId(const String& id, Node*&);
|
|
|
| void DiscardFrontendBindings();
|
| +
|
| + void InnerHighlightQuad(std::unique_ptr<FloatQuad>,
|
| + protocol::Maybe<protocol::DOM::RGBA> color,
|
| + protocol::Maybe<protocol::DOM::RGBA> outline_color);
|
| +
|
| + protocol::Response PushDocumentUponHandlelessOperation();
|
|
|
| InspectorRevalidateDOMTask* RevalidateTask();
|
|
|
| v8::Isolate* isolate_;
|
| Member<InspectedFrames> inspected_frames_;
|
| v8_inspector::V8InspectorSession* v8_session_;
|
| + Client* client_;
|
| Member<DOMListener> dom_listener_;
|
| Member<NodeToIdMap> document_node_to_id_map_;
|
| // Owns node mappings for dangling nodes.
|
| @@ -317,6 +378,7 @@
|
| Member<InspectorHistory> history_;
|
| Member<DOMEditor> dom_editor_;
|
| bool suppress_attribute_modified_event_;
|
| + int backend_node_id_to_inspect_;
|
| };
|
|
|
| } // namespace blink
|
|
|