Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1014)

Side by Side Diff: content/browser/renderer_host/resource_dispatcher_host_request_info.h

Issue 8760011: Move the ProcessType enum out to its own file. This is in preparation for getting rid of ChildPro... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_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"
14 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
15 #include "content/public/common/page_transition_types.h" 14 #include "content/public/common/page_transition_types.h"
15 #include "content/public/common/process_type.h"
16 #include "net/base/load_states.h" 16 #include "net/base/load_states.h"
17 #include "net/url_request/url_request.h" 17 #include "net/url_request/url_request.h"
18 #include "webkit/glue/resource_type.h" 18 #include "webkit/glue/resource_type.h"
19 19
20 class CrossSiteResourceHandler; 20 class CrossSiteResourceHandler;
21 class ResourceDispatcherHost; 21 class ResourceDispatcherHost;
22 class ResourceDispatcherHostLoginDelegate; 22 class ResourceDispatcherHostLoginDelegate;
23 class ResourceHandler; 23 class ResourceHandler;
24 class SSLClientAuthHandler; 24 class SSLClientAuthHandler;
25 25
26 namespace content { 26 namespace content {
27 class ResourceContext; 27 class ResourceContext;
28 } 28 }
29 29
30 namespace webkit_blob { 30 namespace webkit_blob {
31 class BlobData; 31 class BlobData;
32 } 32 }
33 33
34 // Holds the data ResourceDispatcherHost associates with each request. 34 // Holds the data ResourceDispatcherHost associates with each request.
35 // Retrieve this data by calling ResourceDispatcherHost::InfoForRequest. 35 // Retrieve this data by calling ResourceDispatcherHost::InfoForRequest.
36 class ResourceDispatcherHostRequestInfo : public net::URLRequest::UserData { 36 class ResourceDispatcherHostRequestInfo : public net::URLRequest::UserData {
37 public: 37 public:
38 // This will take a reference to the handler. 38 // This will take a reference to the handler.
39 CONTENT_EXPORT ResourceDispatcherHostRequestInfo( 39 CONTENT_EXPORT ResourceDispatcherHostRequestInfo(
40 ResourceHandler* handler, 40 ResourceHandler* handler,
41 ChildProcessInfo::ProcessType process_type, 41 content::ProcessType process_type,
42 int child_id, 42 int child_id,
43 int route_id, 43 int route_id,
44 int origin_pid, 44 int origin_pid,
45 int request_id, 45 int request_id,
46 bool is_main_frame, 46 bool is_main_frame,
47 int64 frame_id, 47 int64 frame_id,
48 bool parent_is_main_frame, 48 bool parent_is_main_frame,
49 int64 parent_frame_id, 49 int64 parent_frame_id,
50 ResourceType::Type resource_type, 50 ResourceType::Type resource_type,
51 content::PageTransition transition_type, 51 content::PageTransition transition_type,
(...skipping 24 matching lines...) Expand all
76 CONTENT_EXPORT void set_login_delegate( 76 CONTENT_EXPORT void set_login_delegate(
77 ResourceDispatcherHostLoginDelegate* ld); 77 ResourceDispatcherHostLoginDelegate* ld);
78 78
79 // Pointer to the SSL auth, or NULL if there is none for this request. 79 // Pointer to the SSL auth, or NULL if there is none for this request.
80 SSLClientAuthHandler* ssl_client_auth_handler() const { 80 SSLClientAuthHandler* ssl_client_auth_handler() const {
81 return ssl_client_auth_handler_.get(); 81 return ssl_client_auth_handler_.get();
82 } 82 }
83 void set_ssl_client_auth_handler(SSLClientAuthHandler* s); 83 void set_ssl_client_auth_handler(SSLClientAuthHandler* s);
84 84
85 // Identifies the type of process (renderer, plugin, etc.) making the request. 85 // Identifies the type of process (renderer, plugin, etc.) making the request.
86 ChildProcessInfo::ProcessType process_type() const { 86 content::ProcessType process_type() const {
87 return process_type_; 87 return process_type_;
88 } 88 }
89 89
90 // The child process unique ID of the requestor. This duplicates the value 90 // The child process unique ID of the requestor. This duplicates the value
91 // stored on the request by SetChildProcessUniqueIDForRequest in 91 // stored on the request by SetChildProcessUniqueIDForRequest in
92 // url_request_tracking. 92 // url_request_tracking.
93 int child_id() const { return child_id_; } 93 int child_id() const { return child_id_; }
94 94
95 // The IPC route identifier for this request (this identifies the RenderView 95 // The IPC route identifier for this request (this identifies the RenderView
96 // or like-thing in the renderer that the request gets routed to). 96 // or like-thing in the renderer that the request gets routed to).
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 // How many bytes have been read while this request has been paused. Should be 214 // How many bytes have been read while this request has been paused. Should be
215 // used only by the ResourceDispatcherHost, not the event handlers (accessors 215 // used only by the ResourceDispatcherHost, not the event handlers (accessors
216 // are provided for consistency with the rest of the interface). 216 // are provided for consistency with the rest of the interface).
217 int paused_read_bytes() const { return paused_read_bytes_; } 217 int paused_read_bytes() const { return paused_read_bytes_; }
218 void set_paused_read_bytes(int bytes) { paused_read_bytes_ = bytes; } 218 void set_paused_read_bytes(int bytes) { paused_read_bytes_ = bytes; }
219 219
220 scoped_refptr<ResourceHandler> resource_handler_; 220 scoped_refptr<ResourceHandler> resource_handler_;
221 CrossSiteResourceHandler* cross_site_handler_; // Non-owning, may be NULL. 221 CrossSiteResourceHandler* cross_site_handler_; // Non-owning, may be NULL.
222 scoped_refptr<ResourceDispatcherHostLoginDelegate> login_delegate_; 222 scoped_refptr<ResourceDispatcherHostLoginDelegate> login_delegate_;
223 scoped_refptr<SSLClientAuthHandler> ssl_client_auth_handler_; 223 scoped_refptr<SSLClientAuthHandler> ssl_client_auth_handler_;
224 ChildProcessInfo::ProcessType process_type_; 224 content::ProcessType process_type_;
225 int child_id_; 225 int child_id_;
226 int route_id_; 226 int route_id_;
227 int origin_pid_; 227 int origin_pid_;
228 int request_id_; 228 int request_id_;
229 bool is_main_frame_; 229 bool is_main_frame_;
230 int64 frame_id_; 230 int64 frame_id_;
231 bool parent_is_main_frame_; 231 bool parent_is_main_frame_;
232 int64 parent_frame_id_; 232 int64 parent_frame_id_;
233 int pending_data_count_; 233 int pending_data_count_;
234 bool is_download_; 234 bool is_download_;
(...skipping 14 matching lines...) Expand all
249 // accessors above for consistency). 249 // accessors above for consistency).
250 bool is_paused_; 250 bool is_paused_;
251 bool called_on_response_started_; 251 bool called_on_response_started_;
252 bool has_started_reading_; 252 bool has_started_reading_;
253 int paused_read_bytes_; 253 int paused_read_bytes_;
254 254
255 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo); 255 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo);
256 }; 256 };
257 257
258 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H _ 258 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698