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

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

Issue 363823004: DevTools: Do not load css resources content before CSS agent is enabled. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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/InspectorResourceContentLoader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorResourceContentLoader.cpp
diff --git a/Source/core/inspector/InspectorResourceContentLoader.cpp b/Source/core/inspector/InspectorResourceContentLoader.cpp
index 7d7db6b541338eabfdffc594f594a90ff3fac1f3..3ea1fa819db24755e10405b0f6054394c8472004 100644
--- a/Source/core/inspector/InspectorResourceContentLoader.cpp
+++ b/Source/core/inspector/InspectorResourceContentLoader.cpp
@@ -51,9 +51,16 @@ void InspectorResourceContentLoader::ResourceClient::setCSSStyleSheet(const Stri
InspectorResourceContentLoader::InspectorResourceContentLoader(Page* page)
: m_allRequestsStarted(false)
+ , m_started(false)
+ , m_page(page)
{
+}
+
+void InspectorResourceContentLoader::start()
+{
+ m_started = true;
Vector<Document*> documents;
- for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
+ for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
if (!frame->isLocalFrame())
continue;
LocalFrame* localFrame = toLocalFrame(frame);
@@ -88,8 +95,10 @@ InspectorResourceContentLoader::InspectorResourceContentLoader(Page* page)
checkDone();
}
-void InspectorResourceContentLoader::addListener(PassOwnPtr<VoidCallback> callback)
+void InspectorResourceContentLoader::ensureResourcesContentLoaded(PassOwnPtr<VoidCallback> callback)
{
+ if (!m_started)
+ start();
m_callbacks.append(callback);
checkDone();
}
« no previous file with comments | « Source/core/inspector/InspectorResourceContentLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698