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

Unified Diff: Source/core/inspector/InspectorDOMAgent.h

Issue 1315283002: [DevTools] Reverse dependencies between InspectorOverlay and agents. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: more compile Created 5 years, 4 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 | « Source/core/core.gypi ('k') | Source/core/inspector/InspectorDOMAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorDOMAgent.h
diff --git a/Source/core/inspector/InspectorDOMAgent.h b/Source/core/inspector/InspectorDOMAgent.h
index b2a2bcfb271985872668e1b00f423759b39bc6c5..514e2046e8f3e0cdb8c68e14a426372e5149224b 100644
--- a/Source/core/inspector/InspectorDOMAgent.h
+++ b/Source/core/inspector/InspectorDOMAgent.h
@@ -38,6 +38,7 @@
#include "core/inspector/InspectorBaseAgent.h"
#include "core/style/ComputedStyleConstants.h"
#include "platform/JSONValues.h"
+#include "platform/geometry/FloatQuad.h"
#include "wtf/HashMap.h"
#include "wtf/HashSet.h"
@@ -60,7 +61,6 @@ class FloatQuad;
class InsertionPoint;
class InspectorFrontend;
class InspectorHistory;
-class InspectorOverlay;
class InspectorPageAgent;
class Node;
class QualifiedName;
@@ -87,9 +87,18 @@ public:
virtual void didModifyDOMAttr(Element*) = 0;
};
- static PassOwnPtrWillBeRawPtr<InspectorDOMAgent> create(InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay)
+ class Client {
+ public:
+ virtual ~Client() { }
+ virtual void setInspectModeEnabled(bool) { }
+ virtual void hideHighlight() { }
+ virtual void highlightNode(Node*, Node* eventTarget, const InspectorHighlightConfig&, bool omitTooltip) { }
+ virtual void highlightQuad(PassOwnPtr<FloatQuad>, const InspectorHighlightConfig&) { }
+ };
+
+ static PassOwnPtrWillBeRawPtr<InspectorDOMAgent> create(InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, Client* client)
{
- return adoptPtrWillBeNoop(new InspectorDOMAgent(pageAgent, injectedScriptManager, overlay));
+ return adoptPtrWillBeNoop(new InspectorDOMAgent(pageAgent, injectedScriptManager, client));
}
static String toErrorString(ExceptionState&);
@@ -198,7 +207,7 @@ public:
private:
enum SearchMode { NotSearching, SearchingForNormal, SearchingForUAShadow };
- InspectorDOMAgent(InspectorPageAgent*, InjectedScriptManager*, InspectorOverlay*);
+ InspectorDOMAgent(InspectorPageAgent*, InjectedScriptManager*, Client*);
void setDocument(Document*);
void innerEnable();
@@ -240,7 +249,7 @@ private:
RawPtrWillBeMember<InspectorPageAgent> m_pageAgent;
RawPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager;
- RawPtrWillBeMember<InspectorOverlay> m_overlay;
+ Client* m_client;
RawPtrWillBeMember<DOMListener> m_domListener;
OwnPtrWillBeMember<NodeToIdMap> m_documentNodeToIdMap;
// Owns node mappings for dangling nodes.
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/inspector/InspectorDOMAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698