| OLD | NEW |
| 1 // Copyright (c) 2011 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 CONTENT_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // that means that the check couldn't be fully done because the plugins aren't | 62 // that means that the check couldn't be fully done because the plugins aren't |
| 63 // loaded. The function should be called again after the plugin list is | 63 // loaded. The function should be called again after the plugin list is |
| 64 // loaded. | 64 // loaded. |
| 65 bool ShouldDownload(bool* need_plugin_list); | 65 bool ShouldDownload(bool* need_plugin_list); |
| 66 | 66 |
| 67 // Informs the original ResourceHandler |real_handler_| that the response will | 67 // Informs the original ResourceHandler |real_handler_| that the response will |
| 68 // be handled entirely by the new ResourceHandler |handler|. | 68 // be handled entirely by the new ResourceHandler |handler|. |
| 69 // A reference to |handler| is acquired. | 69 // A reference to |handler| is acquired. |
| 70 void UseAlternateResourceHandler(int request_id, ResourceHandler* handler); | 70 void UseAlternateResourceHandler(int request_id, ResourceHandler* handler); |
| 71 | 71 |
| 72 // Called on the file thread to load the list of plugins. | |
| 73 void LoadPlugins(); | |
| 74 | |
| 75 // Called on the IO thread once the list of plugins has been loaded. | 72 // Called on the IO thread once the list of plugins has been loaded. |
| 76 void OnPluginsLoaded(); | 73 void OnPluginsLoaded(); |
| 77 | 74 |
| 78 scoped_refptr<ResourceHandler> real_handler_; | 75 scoped_refptr<ResourceHandler> real_handler_; |
| 79 scoped_refptr<ResourceResponse> response_; | 76 scoped_refptr<ResourceResponse> response_; |
| 80 ResourceDispatcherHost* host_; | 77 ResourceDispatcherHost* host_; |
| 81 net::URLRequest* request_; | 78 net::URLRequest* request_; |
| 82 scoped_refptr<net::IOBuffer> read_buffer_; | 79 scoped_refptr<net::IOBuffer> read_buffer_; |
| 83 scoped_refptr<net::IOBuffer> my_buffer_; | 80 scoped_refptr<net::IOBuffer> my_buffer_; |
| 84 int read_buffer_size_; | 81 int read_buffer_size_; |
| 85 int bytes_read_; | 82 int bytes_read_; |
| 86 bool sniff_content_; | 83 bool sniff_content_; |
| 87 bool wait_for_plugins_; | 84 bool wait_for_plugins_; |
| 88 bool buffering_; | 85 bool buffering_; |
| 89 bool finished_; | 86 bool finished_; |
| 90 | 87 |
| 91 DISALLOW_COPY_AND_ASSIGN(BufferedResourceHandler); | 88 DISALLOW_COPY_AND_ASSIGN(BufferedResourceHandler); |
| 92 }; | 89 }; |
| 93 | 90 |
| 94 #endif // CONTENT_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_ | 91 #endif // CONTENT_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_ |
| OLD | NEW |