| 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 24 matching lines...) Expand all Loading... |
| 35 #include "core/loader/appcache/ApplicationCacheHost.h" | 35 #include "core/loader/appcache/ApplicationCacheHost.h" |
| 36 #include "core/page/Frame.h" | 36 #include "core/page/Frame.h" |
| 37 #include "core/platform/network/NetworkStateNotifier.h" | 37 #include "core/platform/network/NetworkStateNotifier.h" |
| 38 | 38 |
| 39 namespace WebCore { | 39 namespace WebCore { |
| 40 | 40 |
| 41 namespace ApplicationCacheAgentState { | 41 namespace ApplicationCacheAgentState { |
| 42 static const char applicationCacheAgentEnabled[] = "applicationCacheAgentEnabled
"; | 42 static const char applicationCacheAgentEnabled[] = "applicationCacheAgentEnabled
"; |
| 43 } | 43 } |
| 44 | 44 |
| 45 InspectorApplicationCacheAgent::InspectorApplicationCacheAgent(InstrumentingAgen
ts* instrumentingAgents, InspectorCompositeState* state, InspectorPageAgent* pag
eAgent) | 45 PassRefPtr<InspectorApplicationCacheAgent> InspectorApplicationCacheAgent::creat
e(InstrumentingAgents* instrumentingAgents, InspectorState* state, PassRefPtr<In
spectorPageAgent> pageAgent) |
| 46 : InspectorBaseAgent<InspectorApplicationCacheAgent>("ApplicationCache", ins
trumentingAgents, state) | 46 { |
| 47 return adoptRef(new InspectorApplicationCacheAgent(instrumentingAgents, stat
e, pageAgent)); |
| 48 } |
| 49 |
| 50 InspectorApplicationCacheAgent::InspectorApplicationCacheAgent(InstrumentingAgen
ts* instrumentingAgents, InspectorState* state, PassRefPtr<InspectorPageAgent> p
ageAgent) |
| 51 : InspectorBaseAgent(instrumentingAgents, state) |
| 47 , m_pageAgent(pageAgent) | 52 , m_pageAgent(pageAgent) |
| 48 , m_frontend(0) | 53 , m_frontend(0) |
| 49 { | 54 { |
| 50 } | 55 } |
| 51 | 56 |
| 57 InspectorApplicationCacheAgent::~InspectorApplicationCacheAgent() |
| 58 { |
| 59 } |
| 60 |
| 52 void InspectorApplicationCacheAgent::setFrontend(InspectorFrontend* frontend) | 61 void InspectorApplicationCacheAgent::setFrontend(InspectorFrontend* frontend) |
| 53 { | 62 { |
| 54 m_frontend = frontend->applicationcache(); | 63 m_frontend = frontend->applicationcache(); |
| 55 } | 64 } |
| 56 | 65 |
| 57 void InspectorApplicationCacheAgent::clearFrontend() | 66 void InspectorApplicationCacheAgent::clearFrontend() |
| 58 { | 67 { |
| 59 m_instrumentingAgents->setInspectorApplicationCacheAgent(0); | 68 m_instrumentingAgents->setInspectorApplicationCacheAgent(0); |
| 60 m_frontend = 0; | 69 m_frontend = 0; |
| 61 } | 70 } |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 if (resourceInfo.m_isExplicit) | 204 if (resourceInfo.m_isExplicit) |
| 196 types.append("Explicit "); | 205 types.append("Explicit "); |
| 197 | 206 |
| 198 RefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> value = Type
Builder::ApplicationCache::ApplicationCacheResource::create() | 207 RefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> value = Type
Builder::ApplicationCache::ApplicationCacheResource::create() |
| 199 .setUrl(resourceInfo.m_resource.string()) | 208 .setUrl(resourceInfo.m_resource.string()) |
| 200 .setSize(static_cast<int>(resourceInfo.m_size)) | 209 .setSize(static_cast<int>(resourceInfo.m_size)) |
| 201 .setType(types); | 210 .setType(types); |
| 202 return value; | 211 return value; |
| 203 } | 212 } |
| 204 | 213 |
| 214 InspectorApplicationCacheController::InspectorApplicationCacheController(Instrum
entingAgents* instrumentingAgents, InspectorCompositeState* compositeState, Insp
ectorPageController* pageController) |
| 215 : InspectorBaseController<InspectorApplicationCacheController, InspectorAppl
icationCacheAgent>("ApplicationCache", instrumentingAgents, compositeState) |
| 216 { |
| 217 setAgent(InspectorApplicationCacheAgent::create(m_instrumentingAgents, m_sta
te, pageController->getAgent())); |
| 218 } |
| 219 |
| 205 } // namespace WebCore | 220 } // namespace WebCore |
| 206 | 221 |
| OLD | NEW |