OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "chrome/browser/renderer_host/resource_handler.h" | 11 #include "chrome/browser/renderer_host/resource_handler.h" |
(...skipping 15 matching lines...) Expand all Loading... |
27 // ResourceHandler implementation: | 27 // ResourceHandler implementation: |
28 virtual bool OnUploadProgress(int request_id, uint64 position, uint64 size); | 28 virtual bool OnUploadProgress(int request_id, uint64 position, uint64 size); |
29 virtual bool OnRequestRedirected(int request_id, const GURL& new_url, | 29 virtual bool OnRequestRedirected(int request_id, const GURL& new_url, |
30 ResourceResponse* response, bool* defer); | 30 ResourceResponse* response, bool* defer); |
31 virtual bool OnResponseStarted(int request_id, ResourceResponse* response); | 31 virtual bool OnResponseStarted(int request_id, ResourceResponse* response); |
32 virtual bool OnWillStart(int request_id, const GURL& url, bool* defer); | 32 virtual bool OnWillStart(int request_id, const GURL& url, bool* defer); |
33 virtual bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, | 33 virtual bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, |
34 int min_size); | 34 int min_size); |
35 virtual bool OnReadCompleted(int request_id, int* bytes_read); | 35 virtual bool OnReadCompleted(int request_id, int* bytes_read); |
36 virtual bool OnResponseCompleted(int request_id, | 36 virtual bool OnResponseCompleted(int request_id, |
37 const URLRequestStatus& status, | 37 const net::URLRequestStatus& status, |
38 const std::string& security_info); | 38 const std::string& security_info); |
39 virtual void OnRequestClosed(); | 39 virtual void OnRequestClosed(); |
40 | 40 |
41 private: | 41 private: |
42 virtual ~BufferedResourceHandler(); | 42 virtual ~BufferedResourceHandler(); |
43 | 43 |
44 // Returns true if we should delay OnResponseStarted forwarding. | 44 // Returns true if we should delay OnResponseStarted forwarding. |
45 bool DelayResponse(); | 45 bool DelayResponse(); |
46 | 46 |
47 // Returns true if there will be a need to parse the DocType of the document | 47 // Returns true if there will be a need to parse the DocType of the document |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 bool sniff_content_; | 90 bool sniff_content_; |
91 bool should_buffer_; | 91 bool should_buffer_; |
92 bool wait_for_plugins_; | 92 bool wait_for_plugins_; |
93 bool buffering_; | 93 bool buffering_; |
94 bool finished_; | 94 bool finished_; |
95 | 95 |
96 DISALLOW_COPY_AND_ASSIGN(BufferedResourceHandler); | 96 DISALLOW_COPY_AND_ASSIGN(BufferedResourceHandler); |
97 }; | 97 }; |
98 | 98 |
99 #endif // CHROME_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_ | 99 #endif // CHROME_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_ |
OLD | NEW |