| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_CHILD_URL_LOADER_CLIENT_IMPL_H_ | 5 #ifndef CONTENT_CHILD_URL_LOADER_CLIENT_IMPL_H_ |
| 6 #define CONTENT_CHILD_URL_LOADER_CLIENT_IMPL_H_ | 6 #define CONTENT_CHILD_URL_LOADER_CLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 void SetDefersLoading(); | 44 void SetDefersLoading(); |
| 45 | 45 |
| 46 // Unsets |is_deferred_|. | 46 // Unsets |is_deferred_|. |
| 47 void UnsetDefersLoading(); | 47 void UnsetDefersLoading(); |
| 48 | 48 |
| 49 // Disaptches the messages received after SetDefersLoading is called. | 49 // Disaptches the messages received after SetDefersLoading is called. |
| 50 void FlushDeferredMessages(); | 50 void FlushDeferredMessages(); |
| 51 | 51 |
| 52 // mojom::URLLoaderClient implementation | 52 // mojom::URLLoaderClient implementation |
| 53 void OnReceiveResponse(const ResourceResponseHead& response_head, | 53 void OnReceiveResponse(const ResourceResponseHead& response_head, |
| 54 const base::Optional<net::SSLInfo>& ssl_info, |
| 54 mojom::DownloadedTempFilePtr downloaded_file) override; | 55 mojom::DownloadedTempFilePtr downloaded_file) override; |
| 55 void OnReceiveRedirect(const net::RedirectInfo& redirect_info, | 56 void OnReceiveRedirect(const net::RedirectInfo& redirect_info, |
| 56 const ResourceResponseHead& response_head) override; | 57 const ResourceResponseHead& response_head) override; |
| 57 void OnDataDownloaded(int64_t data_len, int64_t encoded_data_len) override; | 58 void OnDataDownloaded(int64_t data_len, int64_t encoded_data_len) override; |
| 58 void OnUploadProgress(int64_t current_position, | 59 void OnUploadProgress(int64_t current_position, |
| 59 int64_t total_size, | 60 int64_t total_size, |
| 60 const base::Closure& ack_callback) override; | 61 const base::Closure& ack_callback) override; |
| 61 void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override; | 62 void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override; |
| 62 void OnTransferSizeUpdated(int32_t transfer_size_diff) override; | 63 void OnTransferSizeUpdated(int32_t transfer_size_diff) override; |
| 63 void OnStartLoadingResponseBody( | 64 void OnStartLoadingResponseBody( |
| (...skipping 12 matching lines...) Expand all Loading... |
| 76 bool is_deferred_ = false; | 77 bool is_deferred_ = false; |
| 77 int32_t accumulated_transfer_size_diff_during_deferred_ = 0; | 78 int32_t accumulated_transfer_size_diff_during_deferred_ = 0; |
| 78 ResourceDispatcher* const resource_dispatcher_; | 79 ResourceDispatcher* const resource_dispatcher_; |
| 79 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 80 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 80 base::WeakPtrFactory<URLLoaderClientImpl> weak_factory_; | 81 base::WeakPtrFactory<URLLoaderClientImpl> weak_factory_; |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 } // namespace content | 84 } // namespace content |
| 84 | 85 |
| 85 #endif // CONTENT_CHILD_URL_LOADER_CLIENT_IMPL_H_ | 86 #endif // CONTENT_CHILD_URL_LOADER_CLIENT_IMPL_H_ |
| OLD | NEW |