Index: Source/core/inspector/InspectorPageAgent.h |
diff --git a/Source/core/inspector/InspectorPageAgent.h b/Source/core/inspector/InspectorPageAgent.h |
index af638d132d2a047189dd9a756de1ea09af5f4622..3bf7218f1f5212e008abc369458645891fcacc74 100644 |
--- a/Source/core/inspector/InspectorPageAgent.h |
+++ b/Source/core/inspector/InspectorPageAgent.h |
@@ -61,7 +61,7 @@ class SharedBuffer; |
typedef String ErrorString; |
-class InspectorPageAgent : public InspectorBaseAgent<InspectorPageAgent>, public InspectorBackendDispatcher::PageCommandHandler { |
+class InspectorPageAgent : public InspectorBaseAgent, public InspectorBackendDispatcher::PageCommandHandler { |
WTF_MAKE_NONCOPYABLE(InspectorPageAgent); |
public: |
enum ResourceType { |
@@ -75,7 +75,7 @@ public: |
OtherResource |
}; |
- static PassOwnPtr<InspectorPageAgent> create(InstrumentingAgents*, Page*, InspectorCompositeState*, InjectedScriptManager*, InspectorClient*, InspectorOverlay*); |
+ static PassRefPtr<InspectorPageAgent> create(InstrumentingAgents*, InspectorState*, Page*, InjectedScriptManager*, InspectorOverlay*, InspectorClient*); |
static bool cachedResourceContent(CachedResource*, String* result, bool* base64Encoded); |
static bool sharedBufferContent(PassRefPtr<SharedBuffer>, const String& textEncodingName, bool withBase64Encode, String* result); |
@@ -174,7 +174,7 @@ public: |
static DocumentLoader* assertDocumentLoader(ErrorString*, Frame*); |
private: |
- InspectorPageAgent(InstrumentingAgents*, Page*, InspectorCompositeState*, InjectedScriptManager*, InspectorClient*, InspectorOverlay*); |
+ InspectorPageAgent(InstrumentingAgents*, InspectorState*, Page*, InjectedScriptManager*, InspectorOverlay*, InspectorClient*); |
bool deviceMetricsChanged(int width, int height, double fontScaleFactor, bool fitWindow); |
void updateViewMetrics(int, int, double, bool); |
void updateTouchEventEmulationInPage(bool); |
@@ -207,6 +207,22 @@ private: |
}; |
+class InspectorPageFactory : public InspectorBaseFactory<InspectorPageFactory, InspectorPageAgent> { |
+public: |
+ |
+ static PassOwnPtr<InspectorPageFactory> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* state, Page* page, InjectedScriptManager* injectedScriptManager, InspectorOverlay* inspectorOverlay, InspectorClient* inspectorClient) |
+ { |
+ return adoptPtr(new InspectorPageFactory(instrumentingAgents, state, page, injectedScriptManager, inspectorOverlay, inspectorClient)); |
+ } |
+ |
+protected: |
+ InspectorPageFactory(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, Page* page, InjectedScriptManager* injectedScriptManager, InspectorOverlay* inspectorOverlay, InspectorClient* inspectorClient) |
+ : InspectorBaseFactory<InspectorPageFactory, InspectorPageAgent>("Page", instrumentingAgents, compositeState) |
+ { |
+ setAgent(InspectorPageAgent::create(m_instrumentingAgents, m_state, page, injectedScriptManager, inspectorOverlay, inspectorClient)); |
+ } |
+}; |
+ |
} // namespace WebCore |