| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/time.h" | 12 #include "base/time.h" |
| 13 #include "content/common/child_process_info.h" | 13 #include "content/common/child_process_info.h" |
| 14 #include "net/base/load_states.h" | 14 #include "net/base/load_states.h" |
| 15 #include "net/url_request/url_request.h" | 15 #include "net/url_request/url_request.h" |
| 16 #include "webkit/glue/resource_type.h" | 16 #include "webkit/glue/resource_type.h" |
| 17 | 17 |
| 18 class CrossSiteResourceHandler; | 18 class CrossSiteResourceHandler; |
| 19 class LoginHandler; | 19 class LoginHandler; |
| 20 class ResourceDispatcherHost; | 20 class ResourceDispatcherHost; |
| 21 class ResourceDispatcherHostLoginDelegate; |
| 21 class ResourceHandler; | 22 class ResourceHandler; |
| 22 class SSLClientAuthHandler; | 23 class SSLClientAuthHandler; |
| 23 | 24 |
| 24 namespace content { | 25 namespace content { |
| 25 class ResourceContext; | 26 class ResourceContext; |
| 26 } | 27 } |
| 27 | 28 |
| 28 namespace webkit_blob { | 29 namespace webkit_blob { |
| 29 class BlobData; | 30 class BlobData; |
| 30 } | 31 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 55 // CrossSiteResourceHandler for this request, if it is a cross-site request. | 56 // CrossSiteResourceHandler for this request, if it is a cross-site request. |
| 56 // (NULL otherwise.) This handler is part of the chain of ResourceHandlers | 57 // (NULL otherwise.) This handler is part of the chain of ResourceHandlers |
| 57 // pointed to by resource_handler, and is not owned by this class. | 58 // pointed to by resource_handler, and is not owned by this class. |
| 58 CrossSiteResourceHandler* cross_site_handler() { | 59 CrossSiteResourceHandler* cross_site_handler() { |
| 59 return cross_site_handler_; | 60 return cross_site_handler_; |
| 60 } | 61 } |
| 61 void set_cross_site_handler(CrossSiteResourceHandler* h) { | 62 void set_cross_site_handler(CrossSiteResourceHandler* h) { |
| 62 cross_site_handler_ = h; | 63 cross_site_handler_ = h; |
| 63 } | 64 } |
| 64 | 65 |
| 65 // Pointer to the login handler, or NULL if there is none for this request. | 66 // Pointer to the login delegate, or NULL if there is none for this request. |
| 66 LoginHandler* login_handler() const { return login_handler_.get(); } | 67 ResourceDispatcherHostLoginDelegate* login_delegate() const { |
| 67 void set_login_handler(LoginHandler* lh); | 68 return login_delegate_.get(); |
| 69 } |
| 70 void set_login_delegate(ResourceDispatcherHostLoginDelegate* ld); |
| 68 | 71 |
| 69 // Pointer to the SSL auth, or NULL if there is none for this request. | 72 // Pointer to the SSL auth, or NULL if there is none for this request. |
| 70 SSLClientAuthHandler* ssl_client_auth_handler() const { | 73 SSLClientAuthHandler* ssl_client_auth_handler() const { |
| 71 return ssl_client_auth_handler_.get(); | 74 return ssl_client_auth_handler_.get(); |
| 72 } | 75 } |
| 73 void set_ssl_client_auth_handler(SSLClientAuthHandler* s); | 76 void set_ssl_client_auth_handler(SSLClientAuthHandler* s); |
| 74 | 77 |
| 75 // Identifies the type of process (renderer, plugin, etc.) making the request. | 78 // Identifies the type of process (renderer, plugin, etc.) making the request. |
| 76 ChildProcessInfo::ProcessType process_type() const { | 79 ChildProcessInfo::ProcessType process_type() const { |
| 77 return process_type_; | 80 return process_type_; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 void set_has_started_reading(bool reading) { has_started_reading_ = reading; } | 192 void set_has_started_reading(bool reading) { has_started_reading_ = reading; } |
| 190 | 193 |
| 191 // How many bytes have been read while this request has been paused. Should be | 194 // How many bytes have been read while this request has been paused. Should be |
| 192 // used only by the ResourceDispatcherHost, not the event handlers (accessors | 195 // used only by the ResourceDispatcherHost, not the event handlers (accessors |
| 193 // are provided for consistency with the rest of the interface). | 196 // are provided for consistency with the rest of the interface). |
| 194 int paused_read_bytes() const { return paused_read_bytes_; } | 197 int paused_read_bytes() const { return paused_read_bytes_; } |
| 195 void set_paused_read_bytes(int bytes) { paused_read_bytes_ = bytes; } | 198 void set_paused_read_bytes(int bytes) { paused_read_bytes_ = bytes; } |
| 196 | 199 |
| 197 scoped_refptr<ResourceHandler> resource_handler_; | 200 scoped_refptr<ResourceHandler> resource_handler_; |
| 198 CrossSiteResourceHandler* cross_site_handler_; // Non-owning, may be NULL. | 201 CrossSiteResourceHandler* cross_site_handler_; // Non-owning, may be NULL. |
| 199 scoped_refptr<LoginHandler> login_handler_; | 202 scoped_refptr<ResourceDispatcherHostLoginDelegate> login_delegate_; |
| 200 scoped_refptr<SSLClientAuthHandler> ssl_client_auth_handler_; | 203 scoped_refptr<SSLClientAuthHandler> ssl_client_auth_handler_; |
| 201 ChildProcessInfo::ProcessType process_type_; | 204 ChildProcessInfo::ProcessType process_type_; |
| 202 int child_id_; | 205 int child_id_; |
| 203 int route_id_; | 206 int route_id_; |
| 204 int origin_pid_; | 207 int origin_pid_; |
| 205 int request_id_; | 208 int request_id_; |
| 206 int pending_data_count_; | 209 int pending_data_count_; |
| 207 bool is_download_; | 210 bool is_download_; |
| 208 bool allow_download_; | 211 bool allow_download_; |
| 209 bool has_user_gesture_; | 212 bool has_user_gesture_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 222 // accessors above for consistency). | 225 // accessors above for consistency). |
| 223 bool is_paused_; | 226 bool is_paused_; |
| 224 bool called_on_response_started_; | 227 bool called_on_response_started_; |
| 225 bool has_started_reading_; | 228 bool has_started_reading_; |
| 226 int paused_read_bytes_; | 229 int paused_read_bytes_; |
| 227 | 230 |
| 228 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo); | 231 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo); |
| 229 }; | 232 }; |
| 230 | 233 |
| 231 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H
_ | 234 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H
_ |
| OLD | NEW |