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

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

Issue 411283002: Remove disable-embedded-shared-worker flag and shared worker process related codes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 5 months 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
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"
10 #include "content/common/net/url_request_user_data.h" 9 #include "content/common/net/url_request_user_data.h"
11 #include "content/public/browser/global_request_id.h" 10 #include "content/public/browser/global_request_id.h"
11 #include "content/public/common/process_type.h"
12 #include "net/url_request/url_request.h" 12 #include "net/url_request/url_request.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 // ---------------------------------------------------------------------------- 16 // ----------------------------------------------------------------------------
17 // ResourceRequestInfo 17 // ResourceRequestInfo
18 18
19 // static 19 // static
20 const ResourceRequestInfo* ResourceRequestInfo::ForRequest( 20 const ResourceRequestInfo* ResourceRequestInfo::ForRequest(
21 const net::URLRequest* request) { 21 const net::URLRequest* request) {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 return has_user_gesture_; 199 return has_user_gesture_;
200 } 200 }
201 201
202 bool ResourceRequestInfoImpl::WasIgnoredByHandler() const { 202 bool ResourceRequestInfoImpl::WasIgnoredByHandler() const {
203 return was_ignored_by_handler_; 203 return was_ignored_by_handler_;
204 } 204 }
205 205
206 bool ResourceRequestInfoImpl::GetAssociatedRenderFrame( 206 bool ResourceRequestInfoImpl::GetAssociatedRenderFrame(
207 int* render_process_id, 207 int* render_process_id,
208 int* render_frame_id) const { 208 int* render_frame_id) const {
209 // If the request is from the worker process, find a content that owns the 209 if (process_type_ == PROCESS_TYPE_PLUGIN) {
210 // worker.
211 if (process_type_ == PROCESS_TYPE_WORKER) {
212 // Need to display some related UI for this network request - pick an
213 // arbitrary parent to do so.
214 if (!WorkerServiceImpl::GetInstance()->GetRendererForWorker(
215 child_id_, render_process_id, render_frame_id)) {
216 *render_process_id = -1;
217 *render_frame_id = -1;
218 return false;
219 }
220 } else if (process_type_ == PROCESS_TYPE_PLUGIN) {
221 *render_process_id = origin_pid_; 210 *render_process_id = origin_pid_;
222 *render_frame_id = render_frame_id_; 211 *render_frame_id = render_frame_id_;
223 } else { 212 } else {
224 *render_process_id = child_id_; 213 *render_process_id = child_id_;
225 *render_frame_id = render_frame_id_; 214 *render_frame_id = render_frame_id_;
226 } 215 }
227 return true; 216 return true;
228 } 217 }
229 218
230 bool ResourceRequestInfoImpl::IsAsync() const { 219 bool ResourceRequestInfoImpl::IsAsync() const {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 base::WeakPtr<ResourceMessageFilter> filter) { 252 base::WeakPtr<ResourceMessageFilter> filter) {
264 child_id_ = child_id; 253 child_id_ = child_id;
265 route_id_ = route_id; 254 route_id_ = route_id;
266 origin_pid_ = origin_pid; 255 origin_pid_ = origin_pid;
267 request_id_ = request_id; 256 request_id_ = request_id;
268 parent_render_frame_id_ = parent_render_frame_id; 257 parent_render_frame_id_ = parent_render_frame_id;
269 filter_ = filter; 258 filter_ = filter;
270 } 259 }
271 260
272 } // namespace content 261 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_unittest.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698