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

Unified Diff: Source/core/inspector/InspectorCanvasAgent.cpp

Issue 17030009: Inspector: wrapped inspector agent instances into factory-like wrappers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed comments Created 7 years, 6 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/inspector/InspectorCanvasAgent.h ('k') | Source/core/inspector/InspectorConsoleAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorCanvasAgent.cpp
diff --git a/Source/core/inspector/InspectorCanvasAgent.cpp b/Source/core/inspector/InspectorCanvasAgent.cpp
index eaa53142de34c28ae3377a29739ec8d1913394c8..487dbd0027036278bc98f90fb36a6a3ce915ea6c 100644
--- a/Source/core/inspector/InspectorCanvasAgent.cpp
+++ b/Source/core/inspector/InspectorCanvasAgent.cpp
@@ -62,8 +62,13 @@ namespace CanvasAgentState {
static const char canvasAgentEnabled[] = "canvasAgentEnabled";
};
-InspectorCanvasAgent::InspectorCanvasAgent(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* state, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager)
- : InspectorBaseAgent<InspectorCanvasAgent>("Canvas", instrumentingAgents, state)
+PassRefPtr<InspectorCanvasAgent> InspectorCanvasAgent::create(InstrumentingAgents* instrumentingAgents, InspectorState* state, PassRefPtr<InspectorPageAgent> pageAgent, InjectedScriptManager* injectedScriptManager)
+{
+ return adoptRef(new InspectorCanvasAgent(instrumentingAgents, state, pageAgent, injectedScriptManager));
+}
+
+InspectorCanvasAgent::InspectorCanvasAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, PassRefPtr<InspectorPageAgent> pageAgent, InjectedScriptManager* injectedScriptManager)
+ : InspectorBaseAgent(instrumentingAgents, state)
, m_pageAgent(pageAgent)
, m_injectedScriptManager(injectedScriptManager)
, m_frontend(0)
@@ -349,5 +354,11 @@ void InspectorCanvasAgent::didBeginFrame()
}
}
+InspectorCanvasFactory::InspectorCanvasFactory(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageFactory* pageFactory, InjectedScriptManager* injectedScriptManager)
+ : InspectorBaseFactory<InspectorCanvasFactory, InspectorCanvasAgent>("Canvas", instrumentingAgents, compositeState)
+{
+ setAgent(InspectorCanvasAgent::create(m_instrumentingAgents, m_state, pageFactory->agent(), injectedScriptManager));
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/inspector/InspectorCanvasAgent.h ('k') | Source/core/inspector/InspectorConsoleAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698