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

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

Issue 445023005: DevTools: reduce ResourceAgent dependency on PageAgent. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
Index: Source/core/inspector/InspectorController.cpp
diff --git a/Source/core/inspector/InspectorController.cpp b/Source/core/inspector/InspectorController.cpp
index d41082ada05b6e9099965a6ba8939f73f929def3..5496024e98fecc8eec2bd868d01030aa181dc4ef 100644
--- a/Source/core/inspector/InspectorController.cpp
+++ b/Source/core/inspector/InspectorController.cpp
@@ -34,6 +34,7 @@
#include "bindings/core/v8/DOMWrapperWorld.h"
#include "core/InspectorBackendDispatcher.h"
#include "core/InspectorFrontend.h"
+#include "core/inspector/EditedResourcesContentManager.h"
#include "core/inspector/IdentifiersFactory.h"
#include "core/inspector/InjectedScriptHost.h"
#include "core/inspector/InjectedScriptManager.h"
@@ -74,6 +75,7 @@ namespace blink {
InspectorController::InspectorController(Page* page, InspectorClient* inspectorClient)
: m_instrumentingAgents(InstrumentingAgents::create())
, m_injectedScriptManager(InjectedScriptManager::createForPage())
+ , m_editedResourcesContentManager(EditedResourcesContentManager::create())
, m_state(adoptPtrWillBeNoop(new InspectorCompositeState(inspectorClient)))
, m_overlay(InspectorOverlay::create(page, inspectorClient))
, m_cssAgent(nullptr)
@@ -90,7 +92,7 @@ InspectorController::InspectorController(Page* page, InspectorClient* inspectorC
m_agents.append(InspectorInspectorAgent::create(m_page, injectedScriptManager));
- OwnPtrWillBeRawPtr<InspectorPageAgent> pageAgentPtr(InspectorPageAgent::create(m_page, injectedScriptManager, inspectorClient, overlay));
+ OwnPtrWillBeRawPtr<InspectorPageAgent> pageAgentPtr(InspectorPageAgent::create(m_page, injectedScriptManager, m_editedResourcesContentManager.get(), inspectorClient, overlay));
m_pageAgent = pageAgentPtr.get();
m_agents.append(pageAgentPtr.release());
@@ -168,12 +170,13 @@ void InspectorController::initializeDeferredAgents()
InjectedScriptManager* injectedScriptManager = m_injectedScriptManager.get();
InspectorOverlay* overlay = m_overlay.get();
+ EditedResourcesContentManager* editedResourcesContentManager = m_editedResourcesContentManager.get();
- OwnPtrWillBeRawPtr<InspectorResourceAgent> resourceAgentPtr(InspectorResourceAgent::create(m_pageAgent));
+ OwnPtrWillBeRawPtr<InspectorResourceAgent> resourceAgentPtr(InspectorResourceAgent::create(m_pageAgent, editedResourcesContentManager));
m_resourceAgent = resourceAgentPtr.get();
m_agents.append(resourceAgentPtr.release());
- OwnPtrWillBeRawPtr<InspectorCSSAgent> cssAgentPtr(InspectorCSSAgent::create(m_domAgent, m_pageAgent, m_resourceAgent));
+ OwnPtrWillBeRawPtr<InspectorCSSAgent> cssAgentPtr(InspectorCSSAgent::create(m_domAgent, m_pageAgent, m_resourceAgent, editedResourcesContentManager));
m_cssAgent = cssAgentPtr.get();
m_agents.append(cssAgentPtr.release());
@@ -185,7 +188,7 @@ void InspectorController::initializeDeferredAgents()
PageScriptDebugServer* pageScriptDebugServer = &PageScriptDebugServer::shared();
- OwnPtrWillBeRawPtr<InspectorDebuggerAgent> debuggerAgentPtr(PageDebuggerAgent::create(pageScriptDebugServer, m_pageAgent, injectedScriptManager, overlay));
+ OwnPtrWillBeRawPtr<InspectorDebuggerAgent> debuggerAgentPtr(PageDebuggerAgent::create(pageScriptDebugServer, m_pageAgent, injectedScriptManager, editedResourcesContentManager, overlay));
InspectorDebuggerAgent* debuggerAgent = debuggerAgentPtr.get();
m_agents.append(debuggerAgentPtr.release());

Powered by Google App Engine
This is Rietveld 408576698