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

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

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/InspectorInputAgent.cpp ('k') | Source/core/inspector/InspectorLayerTreeAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorLayerTreeAgent.h
diff --git a/Source/core/inspector/InspectorLayerTreeAgent.h b/Source/core/inspector/InspectorLayerTreeAgent.h
index cfb87650383b8a6459b40249e1c125eed9262722..4daeb17fcd953f3af25c72389ae6c4e336173ac2 100644
--- a/Source/core/inspector/InspectorLayerTreeAgent.h
+++ b/Source/core/inspector/InspectorLayerTreeAgent.h
@@ -46,13 +46,13 @@ class InstrumentingAgents;
typedef String ErrorString;
-class InspectorLayerTreeAgent : public InspectorBaseAgent<InspectorLayerTreeAgent>, public InspectorBackendDispatcher::LayerTreeCommandHandler {
+class InspectorLayerTreeAgent : public InspectorBaseAgent, public InspectorBackendDispatcher::LayerTreeCommandHandler {
public:
- static PassOwnPtr<InspectorLayerTreeAgent> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* state)
+ static PassRefPtr<InspectorLayerTreeAgent> create(InstrumentingAgents* instrumentingAgents, InspectorState* state)
{
- return adoptPtr(new InspectorLayerTreeAgent(instrumentingAgents, state));
+ return adoptRef(new InspectorLayerTreeAgent(instrumentingAgents, state));
}
- ~InspectorLayerTreeAgent();
+ virtual ~InspectorLayerTreeAgent();
virtual void setFrontend(InspectorFrontend*);
virtual void clearFrontend();
@@ -71,7 +71,7 @@ public:
virtual void reasonsForCompositingLayer(ErrorString*, const String& layerId, RefPtr<TypeBuilder::LayerTree::CompositingReasons>&);
private:
- InspectorLayerTreeAgent(InstrumentingAgents*, InspectorCompositeState*);
+ InspectorLayerTreeAgent(InstrumentingAgents*, InspectorState*);
// RenderLayer-related methods.
String bind(const RenderLayer*);
@@ -97,6 +97,22 @@ private:
HashMap<String, PseudoElement*> m_idToPseudoElement;
};
+class InspectorLayerTreeFactory : public InspectorBaseFactory<InspectorLayerTreeFactory, InspectorLayerTreeAgent> {
+public:
+
+ static PassOwnPtr<InspectorLayerTreeFactory> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState)
+ {
+ return adoptPtr(new InspectorLayerTreeFactory(instrumentingAgents, compositeState));
+ }
+
+protected:
+ InspectorLayerTreeFactory(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState)
+ : InspectorBaseFactory<InspectorLayerTreeFactory, InspectorLayerTreeAgent>("LayerTree", instrumentingAgents, compositeState)
+ {
+ setAgent(InspectorLayerTreeAgent::create(m_instrumentingAgents, m_state));
+ }
+};
+
} // namespace WebCore
« no previous file with comments | « Source/core/inspector/InspectorInputAgent.cpp ('k') | Source/core/inspector/InspectorLayerTreeAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698