OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> | 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> |
4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
6 | 6 |
7 This library is free software; you can redistribute it and/or | 7 This library is free software; you can redistribute it and/or |
8 modify it under the terms of the GNU Library General Public | 8 modify it under the terms of the GNU Library General Public |
9 License as published by the Free Software Foundation; either | 9 License as published by the Free Software Foundation; either |
10 version 2 of the License, or (at your option) any later version. | 10 version 2 of the License, or (at your option) any later version. |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 | 287 |
288 // Returns the memory dump name used for tracing. See Resource::onMemoryDump
. | 288 // Returns the memory dump name used for tracing. See Resource::onMemoryDump
. |
289 String getMemoryDumpName() const; | 289 String getMemoryDumpName() const; |
290 | 290 |
291 const HashCountedSet<ResourceClient*>& clients() const { return m_clients; } | 291 const HashCountedSet<ResourceClient*>& clients() const { return m_clients; } |
292 DataBufferingPolicy dataBufferingPolicy() const { return m_options.dataBuffe
ringPolicy; } | 292 DataBufferingPolicy dataBufferingPolicy() const { return m_options.dataBuffe
ringPolicy; } |
293 | 293 |
294 ResourceRequest m_resourceRequest; | 294 ResourceRequest m_resourceRequest; |
295 Member<ResourceLoader> m_loader; | 295 Member<ResourceLoader> m_loader; |
296 | 296 |
297 ResourceResponse m_response; | |
298 | |
299 RefPtr<SharedBuffer> m_data; | 297 RefPtr<SharedBuffer> m_data; |
300 | 298 |
301 private: | 299 private: |
302 class ResourceCallback; | 300 class ResourceCallback; |
303 class CachedMetadataHandlerImpl; | 301 class CachedMetadataHandlerImpl; |
304 class ServiceWorkerResponseCachedMetadataHandler; | 302 class ServiceWorkerResponseCachedMetadataHandler; |
305 | 303 |
306 void cancelTimerFired(Timer<Resource>*); | 304 void cancelTimerFired(Timer<Resource>*); |
307 | 305 |
308 void revalidationSucceeded(const ResourceResponse&); | 306 void revalidationSucceeded(const ResourceResponse&); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 | 349 |
352 HashCountedSet<ResourceClient*> m_clients; | 350 HashCountedSet<ResourceClient*> m_clients; |
353 HashCountedSet<ResourceClient*> m_clientsAwaitingCallback; | 351 HashCountedSet<ResourceClient*> m_clientsAwaitingCallback; |
354 HashCountedSet<ResourceClient*> m_finishedClients; | 352 HashCountedSet<ResourceClient*> m_finishedClients; |
355 | 353 |
356 ResourceLoaderOptions m_options; | 354 ResourceLoaderOptions m_options; |
357 | 355 |
358 double m_responseTimestamp; | 356 double m_responseTimestamp; |
359 | 357 |
360 Timer<Resource> m_cancelTimer; | 358 Timer<Resource> m_cancelTimer; |
| 359 |
| 360 ResourceResponse m_response; |
361 }; | 361 }; |
362 | 362 |
363 class ResourceFactory { | 363 class ResourceFactory { |
364 STACK_ALLOCATED(); | 364 STACK_ALLOCATED(); |
365 public: | 365 public: |
366 virtual Resource* create(const ResourceRequest&, const ResourceLoaderOptions
&, const String&) const = 0; | 366 virtual Resource* create(const ResourceRequest&, const ResourceLoaderOptions
&, const String&) const = 0; |
367 Resource::Type type() const { return m_type; } | 367 Resource::Type type() const { return m_type; } |
368 | 368 |
369 protected: | 369 protected: |
370 ResourceFactory(Resource::Type type) : m_type(type) { } | 370 ResourceFactory(Resource::Type type) : m_type(type) { } |
371 | 371 |
372 Resource::Type m_type; | 372 Resource::Type m_type; |
373 }; | 373 }; |
374 | 374 |
375 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 375 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
376 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType(
) == Resource::typeName, resource.getType() == Resource::typeName); | 376 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType(
) == Resource::typeName, resource.getType() == Resource::typeName); |
377 | 377 |
378 } // namespace blink | 378 } // namespace blink |
379 | 379 |
380 #endif | 380 #endif |
OLD | NEW |