OLD | NEW |
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 void InspectorApplicationCacheAgent::networkStateChanged(bool online) | 95 void InspectorApplicationCacheAgent::networkStateChanged(bool online) |
96 { | 96 { |
97 m_frontend->networkStateUpdated(online); | 97 m_frontend->networkStateUpdated(online); |
98 } | 98 } |
99 | 99 |
100 void InspectorApplicationCacheAgent::getFramesWithManifests(ErrorString*, RefPtr
<TypeBuilder::Array<TypeBuilder::ApplicationCache::FrameWithManifest> >& result) | 100 void InspectorApplicationCacheAgent::getFramesWithManifests(ErrorString*, RefPtr
<TypeBuilder::Array<TypeBuilder::ApplicationCache::FrameWithManifest> >& result) |
101 { | 101 { |
102 result = TypeBuilder::Array<TypeBuilder::ApplicationCache::FrameWithManifest
>::create(); | 102 result = TypeBuilder::Array<TypeBuilder::ApplicationCache::FrameWithManifest
>::create(); |
103 | 103 |
104 Frame* mainFrame = m_pageAgent->mainFrame(); | 104 Frame* mainFrame = m_pageAgent->mainFrame(); |
105 for (Frame* frame = mainFrame; frame; frame = frame->tree()->traverseNext(ma
inFrame)) { | 105 for (Frame* frame = mainFrame; frame; frame = frame->tree().traverseNext(mai
nFrame)) { |
106 DocumentLoader* documentLoader = frame->loader()->documentLoader(); | 106 DocumentLoader* documentLoader = frame->loader()->documentLoader(); |
107 if (!documentLoader) | 107 if (!documentLoader) |
108 continue; | 108 continue; |
109 | 109 |
110 ApplicationCacheHost* host = documentLoader->applicationCacheHost(); | 110 ApplicationCacheHost* host = documentLoader->applicationCacheHost(); |
111 ApplicationCacheHost::CacheInfo info = host->applicationCacheInfo(); | 111 ApplicationCacheHost::CacheInfo info = host->applicationCacheInfo(); |
112 String manifestURL = info.m_manifest.string(); | 112 String manifestURL = info.m_manifest.string(); |
113 if (!manifestURL.isEmpty()) { | 113 if (!manifestURL.isEmpty()) { |
114 RefPtr<TypeBuilder::ApplicationCache::FrameWithManifest> value = Typ
eBuilder::ApplicationCache::FrameWithManifest::create() | 114 RefPtr<TypeBuilder::ApplicationCache::FrameWithManifest> value = Typ
eBuilder::ApplicationCache::FrameWithManifest::create() |
115 .setFrameId(m_pageAgent->frameId(frame)) | 115 .setFrameId(m_pageAgent->frameId(frame)) |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 197 |
198 RefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> value = Type
Builder::ApplicationCache::ApplicationCacheResource::create() | 198 RefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> value = Type
Builder::ApplicationCache::ApplicationCacheResource::create() |
199 .setUrl(resourceInfo.m_resource.string()) | 199 .setUrl(resourceInfo.m_resource.string()) |
200 .setSize(static_cast<int>(resourceInfo.m_size)) | 200 .setSize(static_cast<int>(resourceInfo.m_size)) |
201 .setType(builder.toString()); | 201 .setType(builder.toString()); |
202 return value; | 202 return value; |
203 } | 203 } |
204 | 204 |
205 } // namespace WebCore | 205 } // namespace WebCore |
206 | 206 |
OLD | NEW |