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

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

Issue 892693006: Revert of DevTools: use per-LocalFrame instrumenting agents instead of per-Page ones. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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/InspectorApplicationCacheAgent.cpp
diff --git a/Source/core/inspector/InspectorApplicationCacheAgent.cpp b/Source/core/inspector/InspectorApplicationCacheAgent.cpp
index 005c613e4baef6302761754a0a283487e200e8f4..271f1cf746f5575dd05c8758aa29d93fee789b0b 100644
--- a/Source/core/inspector/InspectorApplicationCacheAgent.cpp
+++ b/Source/core/inspector/InspectorApplicationCacheAgent.cpp
@@ -71,7 +71,9 @@
{
m_state->setBoolean(ApplicationCacheAgentState::applicationCacheAgentEnabled, true);
m_instrumentingAgents->setInspectorApplicationCacheAgent(this);
- m_frontend->networkStateUpdated(networkStateNotifier().onLine());
+
+ // We need to pass initial navigator.onOnline.
+ networkStateChanged(networkStateNotifier().onLine());
}
void InspectorApplicationCacheAgent::updateApplicationCacheStatus(LocalFrame* frame)
@@ -88,18 +90,17 @@
m_frontend->applicationCacheStatusUpdated(m_pageAgent->frameId(frame), manifestURL, static_cast<int>(status));
}
-void InspectorApplicationCacheAgent::networkStateChanged(LocalFrame* frame, bool online)
-{
- if (frame == m_pageAgent->inspectedFrame())
- m_frontend->networkStateUpdated(online);
+void InspectorApplicationCacheAgent::networkStateChanged(bool online)
+{
+ m_frontend->networkStateUpdated(online);
}
void InspectorApplicationCacheAgent::getFramesWithManifests(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::ApplicationCache::FrameWithManifest> >& result)
{
result = TypeBuilder::Array<TypeBuilder::ApplicationCache::FrameWithManifest>::create();
- LocalFrame* inspectedFrame = m_pageAgent->inspectedFrame();
- for (Frame* frame = inspectedFrame; frame; frame = frame->tree().traverseNext(inspectedFrame)) {
+ LocalFrame* mainFrame = m_pageAgent->mainFrame();
+ for (Frame* frame = mainFrame; frame; frame = frame->tree().traverseNext(mainFrame)) {
if (!frame->isLocalFrame())
continue;
DocumentLoader* documentLoader = toLocalFrame(frame)->loader().documentLoader();
« no previous file with comments | « Source/core/inspector/InspectorApplicationCacheAgent.h ('k') | Source/core/inspector/InspectorCanvasAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698