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

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: Made InspectorBaseAgent RefCounted 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
Index: Source/core/inspector/InspectorLayerTreeAgent.h
diff --git a/Source/core/inspector/InspectorLayerTreeAgent.h b/Source/core/inspector/InspectorLayerTreeAgent.h
index cfb87650383b8a6459b40249e1c125eed9262722..e01e03af9325986931fd11aece7f2f357b00255c 100644
--- a/Source/core/inspector/InspectorLayerTreeAgent.h
+++ b/Source/core/inspector/InspectorLayerTreeAgent.h
@@ -46,11 +46,11 @@ 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();
@@ -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 InspectorLayerTreeController: public InspectorBaseController<InspectorLayerTreeController, InspectorLayerTreeAgent> {
+public:
+
+ static PassOwnPtr<InspectorLayerTreeController> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState)
+ {
+ return adoptPtr(new InspectorLayerTreeController(instrumentingAgents, compositeState));
+ }
+
+protected:
+ InspectorLayerTreeController(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState)
+ : InspectorBaseController<InspectorLayerTreeController, InspectorLayerTreeAgent>("LayerTree", instrumentingAgents, compositeState)
+ {
+ setAgent(InspectorLayerTreeAgent::create(m_instrumentingAgents, m_state));
+ }
+};
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698