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

Side by Side Diff: Source/core/inspector/InspectorApplicationCacheAgent.cpp

Issue 301983003: Make Inspector aware of RemoteFrames in FrameTree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed a cast problem 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2010 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 void InspectorApplicationCacheAgent::networkStateChanged(bool online) 93 void InspectorApplicationCacheAgent::networkStateChanged(bool online)
94 { 94 {
95 m_frontend->networkStateUpdated(online); 95 m_frontend->networkStateUpdated(online);
96 } 96 }
97 97
98 void InspectorApplicationCacheAgent::getFramesWithManifests(ErrorString*, RefPtr <TypeBuilder::Array<TypeBuilder::ApplicationCache::FrameWithManifest> >& result) 98 void InspectorApplicationCacheAgent::getFramesWithManifests(ErrorString*, RefPtr <TypeBuilder::Array<TypeBuilder::ApplicationCache::FrameWithManifest> >& result)
99 { 99 {
100 result = TypeBuilder::Array<TypeBuilder::ApplicationCache::FrameWithManifest >::create(); 100 result = TypeBuilder::Array<TypeBuilder::ApplicationCache::FrameWithManifest >::create();
101 101
102 LocalFrame* mainFrame = m_pageAgent->mainFrame(); 102 LocalFrame* mainFrame = m_pageAgent->mainFrame();
103 for (LocalFrame* frame = mainFrame; frame; frame = frame->tree().traverseNex t(mainFrame)) { 103 for (Frame* frame = mainFrame; frame; frame = frame->tree().traverseNext(mai nFrame)) {
104 DocumentLoader* documentLoader = frame->loader().documentLoader(); 104 if (!frame->isLocalFrame())
105 continue;
106 DocumentLoader* documentLoader = toLocalFrame(frame)->loader().documentL oader();
105 if (!documentLoader) 107 if (!documentLoader)
106 continue; 108 continue;
107 109
108 ApplicationCacheHost* host = documentLoader->applicationCacheHost(); 110 ApplicationCacheHost* host = documentLoader->applicationCacheHost();
109 ApplicationCacheHost::CacheInfo info = host->applicationCacheInfo(); 111 ApplicationCacheHost::CacheInfo info = host->applicationCacheInfo();
110 String manifestURL = info.m_manifest.string(); 112 String manifestURL = info.m_manifest.string();
111 if (!manifestURL.isEmpty()) { 113 if (!manifestURL.isEmpty()) {
112 RefPtr<TypeBuilder::ApplicationCache::FrameWithManifest> value = Typ eBuilder::ApplicationCache::FrameWithManifest::create() 114 RefPtr<TypeBuilder::ApplicationCache::FrameWithManifest> value = Typ eBuilder::ApplicationCache::FrameWithManifest::create()
113 .setFrameId(m_pageAgent->frameId(frame)) 115 .setFrameId(m_pageAgent->frameId(toLocalFrame(frame)))
114 .setManifestURL(manifestURL) 116 .setManifestURL(manifestURL)
115 .setStatus(static_cast<int>(host->status())); 117 .setStatus(static_cast<int>(host->status()));
116 result->addItem(value); 118 result->addItem(value);
117 } 119 }
118 } 120 }
119 } 121 }
120 122
121 DocumentLoader* InspectorApplicationCacheAgent::assertFrameWithDocumentLoader(Er rorString* errorString, String frameId) 123 DocumentLoader* InspectorApplicationCacheAgent::assertFrameWithDocumentLoader(Er rorString* errorString, String frameId)
122 { 124 {
123 LocalFrame* frame = m_pageAgent->assertFrame(errorString, frameId); 125 LocalFrame* frame = m_pageAgent->assertFrame(errorString, frameId);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 197
196 RefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> value = Type Builder::ApplicationCache::ApplicationCacheResource::create() 198 RefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> value = Type Builder::ApplicationCache::ApplicationCacheResource::create()
197 .setUrl(resourceInfo.m_resource.string()) 199 .setUrl(resourceInfo.m_resource.string())
198 .setSize(static_cast<int>(resourceInfo.m_size)) 200 .setSize(static_cast<int>(resourceInfo.m_size))
199 .setType(builder.toString()); 201 .setType(builder.toString());
200 return value; 202 return value;
201 } 203 }
202 204
203 } // namespace WebCore 205 } // namespace WebCore
204 206
OLDNEW
« no previous file with comments | « no previous file | Source/core/inspector/InspectorCanvasAgent.cpp » ('j') | Source/core/inspector/InspectorCanvasAgent.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698