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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
296 class ResourceCallback { | 296 class ResourceCallback { |
297 public: | 297 public: |
298 static ResourceCallback* callbackHandler(); | 298 static ResourceCallback* callbackHandler(); |
299 void schedule(Resource*); | 299 void schedule(Resource*); |
300 void cancel(Resource*); | 300 void cancel(Resource*); |
301 bool isScheduled(Resource*) const; | 301 bool isScheduled(Resource*) const; |
302 private: | 302 private: |
303 ResourceCallback(); | 303 ResourceCallback(); |
304 void timerFired(Timer<ResourceCallback>*); | 304 void timerFired(Timer<ResourceCallback>*); |
305 Timer<ResourceCallback> m_callbackTimer; | 305 Timer<ResourceCallback> m_callbackTimer; |
306 HashSet<Resource*> m_resourcesWithPendingClients; | 306 HashSet<Resource*> m_resourcesWithPendingClients; |
zerny-chromium
2014/07/29 06:36:45
This set looks like it should be traced somehow no
tkent
2014/07/29 08:38:43
yeah, I'll work on it.
| |
307 }; | 307 }; |
308 | 308 |
309 bool hasClient(ResourceClient* client) { return m_clients.contains(client) | | m_clientsAwaitingCallback.contains(client); } | 309 bool hasClient(ResourceClient* client) { return m_clients.contains(client) | | m_clientsAwaitingCallback.contains(client); } |
310 | 310 |
311 struct RedirectPair { | 311 struct RedirectPair { |
312 public: | 312 public: |
313 explicit RedirectPair(const ResourceRequest& request, const ResourceResp onse& redirectResponse) | 313 explicit RedirectPair(const ResourceRequest& request, const ResourceResp onse& redirectResponse) |
314 : m_request(request) | 314 : m_request(request) |
315 , m_redirectResponse(redirectResponse) | 315 , m_redirectResponse(redirectResponse) |
316 { | 316 { |
317 } | 317 } |
318 | 318 |
319 ResourceRequest m_request; | 319 ResourceRequest m_request; |
320 ResourceResponse m_redirectResponse; | 320 ResourceResponse m_redirectResponse; |
321 }; | 321 }; |
322 const Vector<RedirectPair>& redirectChain() const { return m_redirectChain; } | 322 const Vector<RedirectPair>& redirectChain() const { return m_redirectChain; } |
323 | 323 |
324 virtual bool isSafeToUnlock() const { return false; } | 324 virtual bool isSafeToUnlock() const { return false; } |
325 virtual void destroyDecodedDataIfPossible() { } | 325 virtual void destroyDecodedDataIfPossible() { } |
326 | 326 |
327 ResourceRequest m_resourceRequest; | 327 ResourceRequest m_resourceRequest; |
328 AtomicString m_accept; | 328 AtomicString m_accept; |
329 RefPtr<ResourceLoader> m_loader; | 329 RefPtrWillBeMember<ResourceLoader> m_loader; |
330 ResourceLoaderOptions m_options; | 330 ResourceLoaderOptions m_options; |
331 | 331 |
332 ResourceResponse m_response; | 332 ResourceResponse m_response; |
333 double m_responseTimestamp; | 333 double m_responseTimestamp; |
334 | 334 |
335 RefPtr<SharedBuffer> m_data; | 335 RefPtr<SharedBuffer> m_data; |
336 Timer<Resource> m_cancelTimer; | 336 Timer<Resource> m_cancelTimer; |
337 | 337 |
338 private: | 338 private: |
339 bool addClientToSet(ResourceClient*); | 339 bool addClientToSet(ResourceClient*); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
403 const char* ResourceTypeName(Resource::Type); | 403 const char* ResourceTypeName(Resource::Type); |
404 #endif | 404 #endif |
405 | 405 |
406 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 406 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
407 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() = = Resource::typeName, resource.type() == Resource::typeName); \ | 407 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->type() = = Resource::typeName, resource.type() == Resource::typeName); \ |
408 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource >& ptr) { return to##typeName##Resource(ptr.get()); } | 408 inline typeName##Resource* to##typeName##Resource(const ResourcePtr<Resource >& ptr) { return to##typeName##Resource(ptr.get()); } |
409 | 409 |
410 } | 410 } |
411 | 411 |
412 #endif | 412 #endif |
OLD | NEW |