| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 m_blockedHeaders.removeAll(m_exposedHeaders); | 111 m_blockedHeaders.removeAll(m_exposedHeaders); |
| 112 } | 112 } |
| 113 | 113 |
| 114 return m_blockedHeaders; | 114 return m_blockedHeaders; |
| 115 } | 115 } |
| 116 | 116 |
| 117 } | 117 } |
| 118 | 118 |
| 119 // This class bridges the interface differences between WebCore and WebKit loade
r clients. | 119 // This class bridges the interface differences between WebCore and WebKit loade
r clients. |
| 120 // It forwards its ThreadableLoaderClient notifications to a WebURLLoaderClient. | 120 // It forwards its ThreadableLoaderClient notifications to a WebURLLoaderClient. |
| 121 class AssociatedURLLoader::ClientAdapter FINAL : public DocumentThreadableLoader
Client { | 121 class AssociatedURLLoader::ClientAdapter final : public DocumentThreadableLoader
Client { |
| 122 WTF_MAKE_NONCOPYABLE(ClientAdapter); | 122 WTF_MAKE_NONCOPYABLE(ClientAdapter); |
| 123 public: | 123 public: |
| 124 static PassOwnPtr<ClientAdapter> create(AssociatedURLLoader*, WebURLLoaderCl
ient*, const WebURLLoaderOptions&); | 124 static PassOwnPtr<ClientAdapter> create(AssociatedURLLoader*, WebURLLoaderCl
ient*, const WebURLLoaderOptions&); |
| 125 | 125 |
| 126 virtual void didSendData(unsigned long long /*bytesSent*/, unsigned long lon
g /*totalBytesToBeSent*/) OVERRIDE; | 126 virtual void didSendData(unsigned long long /*bytesSent*/, unsigned long lon
g /*totalBytesToBeSent*/) override; |
| 127 virtual void willSendRequest(ResourceRequest& /*newRequest*/, const Resource
Response& /*redirectResponse*/) OVERRIDE; | 127 virtual void willSendRequest(ResourceRequest& /*newRequest*/, const Resource
Response& /*redirectResponse*/) override; |
| 128 | 128 |
| 129 virtual void didReceiveResponse(unsigned long, const ResourceResponse&) OVER
RIDE; | 129 virtual void didReceiveResponse(unsigned long, const ResourceResponse&) over
ride; |
| 130 virtual void didDownloadData(int /*dataLength*/) OVERRIDE; | 130 virtual void didDownloadData(int /*dataLength*/) override; |
| 131 virtual void didReceiveData(const char*, unsigned /*dataLength*/) OVERRIDE; | 131 virtual void didReceiveData(const char*, unsigned /*dataLength*/) override; |
| 132 virtual void didReceiveCachedMetadata(const char*, int /*dataLength*/) OVERR
IDE; | 132 virtual void didReceiveCachedMetadata(const char*, int /*dataLength*/) overr
ide; |
| 133 virtual void didFinishLoading(unsigned long /*identifier*/, double /*finishT
ime*/) OVERRIDE; | 133 virtual void didFinishLoading(unsigned long /*identifier*/, double /*finishT
ime*/) override; |
| 134 virtual void didFail(const ResourceError&) OVERRIDE; | 134 virtual void didFail(const ResourceError&) override; |
| 135 virtual void didFailRedirectCheck() OVERRIDE; | 135 virtual void didFailRedirectCheck() override; |
| 136 | 136 |
| 137 // Sets an error to be reported back to the client, asychronously. | 137 // Sets an error to be reported back to the client, asychronously. |
| 138 void setDelayedError(const ResourceError&); | 138 void setDelayedError(const ResourceError&); |
| 139 | 139 |
| 140 // Enables forwarding of error notifications to the WebURLLoaderClient. Thes
e must be | 140 // Enables forwarding of error notifications to the WebURLLoaderClient. Thes
e must be |
| 141 // deferred until after the call to AssociatedURLLoader::loadAsynchronously(
) completes. | 141 // deferred until after the call to AssociatedURLLoader::loadAsynchronously(
) completes. |
| 142 void enableErrorNotifications(); | 142 void enableErrorNotifications(); |
| 143 | 143 |
| 144 // Stops loading and releases the DocumentThreadableLoader as early as possi
ble. | 144 // Stops loading and releases the DocumentThreadableLoader as early as possi
ble. |
| 145 void clearClient() { m_client = 0; } | 145 void clearClient() { m_client = 0; } |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 m_loader->cancel(); | 376 m_loader->cancel(); |
| 377 } | 377 } |
| 378 | 378 |
| 379 void AssociatedURLLoader::setDefersLoading(bool defersLoading) | 379 void AssociatedURLLoader::setDefersLoading(bool defersLoading) |
| 380 { | 380 { |
| 381 if (m_loader) | 381 if (m_loader) |
| 382 m_loader->setDefersLoading(defersLoading); | 382 m_loader->setDefersLoading(defersLoading); |
| 383 } | 383 } |
| 384 | 384 |
| 385 } // namespace blink | 385 } // namespace blink |
| OLD | NEW |