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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 241 |
242 virtual void onMemoryDump(WebMemoryDumpLevelOfDetail, WebProcessMemoryDump*)
const; | 242 virtual void onMemoryDump(WebMemoryDumpLevelOfDetail, WebProcessMemoryDump*)
const; |
243 | 243 |
244 static const char* resourceTypeToString(Type, const FetchInitiatorInfo&); | 244 static const char* resourceTypeToString(Type, const FetchInitiatorInfo&); |
245 | 245 |
246 protected: | 246 protected: |
247 Resource(const ResourceRequest&, Type, const ResourceLoaderOptions&); | 247 Resource(const ResourceRequest&, Type, const ResourceLoaderOptions&); |
248 | 248 |
249 virtual void checkNotify(); | 249 virtual void checkNotify(); |
250 | 250 |
| 251 enum class MarkFinishedOption { |
| 252 ShouldMarkFinished, |
| 253 DoNotMarkFinished |
| 254 }; |
| 255 void notifyClientsInternal(MarkFinishedOption); |
| 256 void markClientFinished(ResourceClient*); |
| 257 |
251 virtual void destroyDecodedDataForFailedRevalidation() { } | 258 virtual void destroyDecodedDataForFailedRevalidation() { } |
252 | 259 |
253 void setEncodedSize(size_t); | 260 void setEncodedSize(size_t); |
254 void setDecodedSize(size_t); | 261 void setDecodedSize(size_t); |
255 void didAccessDecodedData(); | 262 void didAccessDecodedData(); |
256 | 263 |
257 void finishPendingClients(); | 264 void finishPendingClients(); |
258 | 265 |
259 virtual void didAddClient(ResourceClient*); | 266 virtual void didAddClient(ResourceClient*); |
260 void willAddClientOrObserver(); | 267 void willAddClientOrObserver(); |
(...skipping 14 matching lines...) Expand all Loading... |
275 } | 282 } |
276 | 283 |
277 ResourceRequest m_request; | 284 ResourceRequest m_request; |
278 ResourceResponse m_redirectResponse; | 285 ResourceResponse m_redirectResponse; |
279 }; | 286 }; |
280 const Vector<RedirectPair>& redirectChain() const { return m_redirectChain;
} | 287 const Vector<RedirectPair>& redirectChain() const { return m_redirectChain;
} |
281 | 288 |
282 virtual bool isSafeToUnlock() const { return false; } | 289 virtual bool isSafeToUnlock() const { return false; } |
283 virtual void destroyDecodedDataIfPossible() { } | 290 virtual void destroyDecodedDataIfPossible() { } |
284 | 291 |
285 virtual void markClientsAndObserversFinished(); | |
286 | |
287 // Returns the memory dump name used for tracing. See Resource::onMemoryDump
. | 292 // Returns the memory dump name used for tracing. See Resource::onMemoryDump
. |
288 String getMemoryDumpName() const; | 293 String getMemoryDumpName() const; |
289 | 294 |
290 const HashCountedSet<ResourceClient*>& clients() const { return m_clients; } | 295 const HashCountedSet<ResourceClient*>& clients() const { return m_clients; } |
291 DataBufferingPolicy dataBufferingPolicy() const { return m_options.dataBuffe
ringPolicy; } | 296 DataBufferingPolicy dataBufferingPolicy() const { return m_options.dataBuffe
ringPolicy; } |
292 | 297 |
293 void setCachePolicyBypassingCache(); | 298 void setCachePolicyBypassingCache(); |
294 void setLoFiStateOff(); | 299 void setLoFiStateOff(); |
295 | 300 |
296 SharedBuffer* data() const { return m_data.get(); } | 301 SharedBuffer* data() const { return m_data.get(); } |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 | 380 |
376 Resource::Type m_type; | 381 Resource::Type m_type; |
377 }; | 382 }; |
378 | 383 |
379 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 384 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
380 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType(
) == Resource::typeName, resource.getType() == Resource::typeName); | 385 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType(
) == Resource::typeName, resource.getType() == Resource::typeName); |
381 | 386 |
382 } // namespace blink | 387 } // namespace blink |
383 | 388 |
384 #endif | 389 #endif |
OLD | NEW |