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

Side by Side Diff: content/browser/loader/resource_request_info_impl.cc

Issue 107183002: Move more of the plugin code in the renderer to use RenderFrame instead of RenderView. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 7 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) 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 #include "content/browser/loader/resource_request_info_impl.h" 5 #include "content/browser/loader/resource_request_info_impl.h"
6 6
7 #include "content/browser/loader/global_routing_id.h" 7 #include "content/browser/loader/global_routing_id.h"
8 #include "content/browser/loader/resource_message_filter.h" 8 #include "content/browser/loader/resource_message_filter.h"
9 #include "content/browser/worker_host/worker_service_impl.h" 9 #include "content/browser/worker_host/worker_service_impl.h"
10 #include "content/common/net/url_request_user_data.h" 10 #include "content/common/net/url_request_user_data.h"
(...skipping 19 matching lines...) Expand all
30 int render_process_id, 30 int render_process_id,
31 int render_view_id, 31 int render_view_id,
32 bool is_async) { 32 bool is_async) {
33 ResourceRequestInfoImpl* info = 33 ResourceRequestInfoImpl* info =
34 new ResourceRequestInfoImpl( 34 new ResourceRequestInfoImpl(
35 PROCESS_TYPE_RENDERER, // process_type 35 PROCESS_TYPE_RENDERER, // process_type
36 render_process_id, // child_id 36 render_process_id, // child_id
37 render_view_id, // route_id 37 render_view_id, // route_id
38 0, // origin_pid 38 0, // origin_pid
39 0, // request_id 39 0, // request_id
40 MSG_ROUTING_NONE, // render_frame_id
40 resource_type == ResourceType::MAIN_FRAME, // is_main_frame 41 resource_type == ResourceType::MAIN_FRAME, // is_main_frame
41 0, // frame_id 42 0, // frame_id
42 false, // parent_is_main_frame 43 false, // parent_is_main_frame
43 0, // parent_frame_id 44 0, // parent_frame_id
44 resource_type, // resource_type 45 resource_type, // resource_type
45 PAGE_TRANSITION_LINK, // transition_type 46 PAGE_TRANSITION_LINK, // transition_type
46 false, // should_replace_current_entry 47 false, // should_replace_current_entry
47 false, // is_download 48 false, // is_download
48 false, // is_stream 49 false, // is_stream
49 true, // allow_download 50 true, // allow_download
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 const net::URLRequest* request) { 84 const net::URLRequest* request) {
84 return ForRequest(const_cast<net::URLRequest*>(request)); 85 return ForRequest(const_cast<net::URLRequest*>(request));
85 } 86 }
86 87
87 ResourceRequestInfoImpl::ResourceRequestInfoImpl( 88 ResourceRequestInfoImpl::ResourceRequestInfoImpl(
88 int process_type, 89 int process_type,
89 int child_id, 90 int child_id,
90 int route_id, 91 int route_id,
91 int origin_pid, 92 int origin_pid,
92 int request_id, 93 int request_id,
94 int render_frame_id,
93 bool is_main_frame, 95 bool is_main_frame,
94 int64 frame_id, 96 int64 frame_id,
95 bool parent_is_main_frame, 97 bool parent_is_main_frame,
96 int64 parent_frame_id, 98 int64 parent_frame_id,
97 ResourceType::Type resource_type, 99 ResourceType::Type resource_type,
98 PageTransition transition_type, 100 PageTransition transition_type,
99 bool should_replace_current_entry, 101 bool should_replace_current_entry,
100 bool is_download, 102 bool is_download,
101 bool is_stream, 103 bool is_stream,
102 bool allow_download, 104 bool allow_download,
103 bool has_user_gesture, 105 bool has_user_gesture,
104 blink::WebReferrerPolicy referrer_policy, 106 blink::WebReferrerPolicy referrer_policy,
105 ResourceContext* context, 107 ResourceContext* context,
106 base::WeakPtr<ResourceMessageFilter> filter, 108 base::WeakPtr<ResourceMessageFilter> filter,
107 bool is_async) 109 bool is_async)
108 : cross_site_handler_(NULL), 110 : cross_site_handler_(NULL),
109 detachable_handler_(NULL), 111 detachable_handler_(NULL),
110 process_type_(process_type), 112 process_type_(process_type),
111 child_id_(child_id), 113 child_id_(child_id),
112 route_id_(route_id), 114 route_id_(route_id),
113 origin_pid_(origin_pid), 115 origin_pid_(origin_pid),
114 request_id_(request_id), 116 request_id_(request_id),
117 render_frame_id_(render_frame_id),
115 is_main_frame_(is_main_frame), 118 is_main_frame_(is_main_frame),
116 frame_id_(frame_id), 119 frame_id_(frame_id),
117 parent_is_main_frame_(parent_is_main_frame), 120 parent_is_main_frame_(parent_is_main_frame),
118 parent_frame_id_(parent_frame_id), 121 parent_frame_id_(parent_frame_id),
119 should_replace_current_entry_(should_replace_current_entry), 122 should_replace_current_entry_(should_replace_current_entry),
120 is_download_(is_download), 123 is_download_(is_download),
121 is_stream_(is_stream), 124 is_stream_(is_stream),
122 allow_download_(allow_download), 125 allow_download_(allow_download),
123 has_user_gesture_(has_user_gesture), 126 has_user_gesture_(has_user_gesture),
124 was_ignored_by_handler_(false), 127 was_ignored_by_handler_(false),
(...skipping 22 matching lines...) Expand all
147 } 150 }
148 151
149 int ResourceRequestInfoImpl::GetOriginPID() const { 152 int ResourceRequestInfoImpl::GetOriginPID() const {
150 return origin_pid_; 153 return origin_pid_;
151 } 154 }
152 155
153 int ResourceRequestInfoImpl::GetRequestID() const { 156 int ResourceRequestInfoImpl::GetRequestID() const {
154 return request_id_; 157 return request_id_;
155 } 158 }
156 159
160 int ResourceRequestInfoImpl::GetRenderFrameID() const {
161 return render_frame_id_;
162 }
163
157 bool ResourceRequestInfoImpl::IsMainFrame() const { 164 bool ResourceRequestInfoImpl::IsMainFrame() const {
158 return is_main_frame_; 165 return is_main_frame_;
159 } 166 }
160 167
161 int64 ResourceRequestInfoImpl::GetFrameID() const { 168 int64 ResourceRequestInfoImpl::GetFrameID() const {
162 return frame_id_; 169 return frame_id_;
163 } 170 }
164 171
165 bool ResourceRequestInfoImpl::ParentIsMainFrame() const { 172 bool ResourceRequestInfoImpl::ParentIsMainFrame() const {
166 return parent_is_main_frame_; 173 return parent_is_main_frame_;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 base::WeakPtr<ResourceMessageFilter> filter) { 258 base::WeakPtr<ResourceMessageFilter> filter) {
252 child_id_ = child_id; 259 child_id_ = child_id;
253 route_id_ = route_id; 260 route_id_ = route_id;
254 origin_pid_ = origin_pid; 261 origin_pid_ = origin_pid;
255 request_id_ = request_id; 262 request_id_ = request_id;
256 frame_id_ = frame_id; 263 frame_id_ = frame_id;
257 filter_ = filter; 264 filter_ = filter;
258 } 265 }
259 266
260 } // namespace content 267 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_request_info_impl.h ('k') | content/browser/loader/resource_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698