| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_LOADER_ASYNC_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_ASYNC_RESOURCE_HANDLER_H_ |
| 6 #define CONTENT_BROWSER_LOADER_ASYNC_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_LOADER_ASYNC_RESOURCE_HANDLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 class CONTENT_EXPORT AsyncResourceHandler : public ResourceHandler, | 31 class CONTENT_EXPORT AsyncResourceHandler : public ResourceHandler, |
| 32 public ResourceMessageDelegate { | 32 public ResourceMessageDelegate { |
| 33 public: | 33 public: |
| 34 AsyncResourceHandler(net::URLRequest* request, | 34 AsyncResourceHandler(net::URLRequest* request, |
| 35 ResourceDispatcherHostImpl* rdh); | 35 ResourceDispatcherHostImpl* rdh); |
| 36 ~AsyncResourceHandler() override; | 36 ~AsyncResourceHandler() override; |
| 37 | 37 |
| 38 bool OnMessageReceived(const IPC::Message& message) override; | 38 bool OnMessageReceived(const IPC::Message& message) override; |
| 39 | 39 |
| 40 // ResourceHandler implementation: | 40 // ResourceHandler implementation: |
| 41 bool OnRequestRedirected(const net::RedirectInfo& redirect_info, | 41 void OnRequestRedirected(const net::RedirectInfo& redirect_info, |
| 42 ResourceResponse* response, | 42 ResourceResponse* response, |
| 43 bool* defer) override; | 43 bool* defer_or_cancel) override; |
| 44 bool OnResponseStarted(ResourceResponse* response, bool* defer) override; | 44 void OnResponseStarted(ResourceResponse* response, |
| 45 bool OnWillStart(const GURL& url, bool* defer) override; | 45 bool* defer_or_cancel) override; |
| 46 void OnWillStart(const GURL& url, bool* defer_or_cancel) override; |
| 46 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, | 47 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, |
| 47 int* buf_size, | 48 int* buf_size, |
| 48 int min_size) override; | 49 int min_size) override; |
| 49 bool OnReadCompleted(int bytes_read, bool* defer) override; | 50 void OnReadCompleted(int bytes_read, bool* defer_or_cancel) override; |
| 50 void OnResponseCompleted(const net::URLRequestStatus& status, | 51 void OnResponseCompleted(const net::URLRequestStatus& status, |
| 51 bool* defer) override; | 52 bool* defer) override; |
| 52 void OnDataDownloaded(int bytes_downloaded) override; | 53 void OnDataDownloaded(int bytes_downloaded) override; |
| 53 | 54 |
| 54 private: | 55 private: |
| 55 class InliningHelper; | 56 class InliningHelper; |
| 56 | 57 |
| 57 // IPC message handlers: | 58 // IPC message handlers: |
| 58 void OnFollowRedirect(int request_id); | 59 void OnFollowRedirect(int request_id); |
| 59 void OnDataReceivedACK(int request_id); | 60 void OnDataReceivedACK(int request_id); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 97 |
| 97 int64_t reported_transfer_size_; | 98 int64_t reported_transfer_size_; |
| 98 int64_t reported_encoded_body_length_; | 99 int64_t reported_encoded_body_length_; |
| 99 | 100 |
| 100 DISALLOW_COPY_AND_ASSIGN(AsyncResourceHandler); | 101 DISALLOW_COPY_AND_ASSIGN(AsyncResourceHandler); |
| 101 }; | 102 }; |
| 102 | 103 |
| 103 } // namespace content | 104 } // namespace content |
| 104 | 105 |
| 105 #endif // CONTENT_BROWSER_LOADER_ASYNC_RESOURCE_HANDLER_H_ | 106 #endif // CONTENT_BROWSER_LOADER_ASYNC_RESOURCE_HANDLER_H_ |
| OLD | NEW |