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

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

Issue 21388003: Move routing to RenderFrameHost instead of RenderViewHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move global map to .cc file. Created 7 years, 4 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 | 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" 7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 25 matching lines...) Expand all
36 #include "content/browser/loader/power_save_block_resource_throttle.h" 36 #include "content/browser/loader/power_save_block_resource_throttle.h"
37 #include "content/browser/loader/redirect_to_file_resource_handler.h" 37 #include "content/browser/loader/redirect_to_file_resource_handler.h"
38 #include "content/browser/loader/resource_message_filter.h" 38 #include "content/browser/loader/resource_message_filter.h"
39 #include "content/browser/loader/resource_request_info_impl.h" 39 #include "content/browser/loader/resource_request_info_impl.h"
40 #include "content/browser/loader/stream_resource_handler.h" 40 #include "content/browser/loader/stream_resource_handler.h"
41 #include "content/browser/loader/sync_resource_handler.h" 41 #include "content/browser/loader/sync_resource_handler.h"
42 #include "content/browser/loader/throttling_resource_handler.h" 42 #include "content/browser/loader/throttling_resource_handler.h"
43 #include "content/browser/loader/transfer_navigation_resource_throttle.h" 43 #include "content/browser/loader/transfer_navigation_resource_throttle.h"
44 #include "content/browser/loader/upload_data_stream_builder.h" 44 #include "content/browser/loader/upload_data_stream_builder.h"
45 #include "content/browser/plugin_service_impl.h" 45 #include "content/browser/plugin_service_impl.h"
46 #include "content/browser/renderer_host/render_frame_host_impl.h"
46 #include "content/browser/renderer_host/render_view_host_delegate.h" 47 #include "content/browser/renderer_host/render_view_host_delegate.h"
47 #include "content/browser/renderer_host/render_view_host_impl.h" 48 #include "content/browser/renderer_host/render_view_host_impl.h"
48 #include "content/browser/resource_context_impl.h" 49 #include "content/browser/resource_context_impl.h"
49 #include "content/browser/streams/stream.h" 50 #include "content/browser/streams/stream.h"
50 #include "content/browser/streams/stream_context.h" 51 #include "content/browser/streams/stream_context.h"
51 #include "content/browser/streams/stream_registry.h" 52 #include "content/browser/streams/stream_registry.h"
52 #include "content/browser/worker_host/worker_service_impl.h" 53 #include "content/browser/worker_host/worker_service_impl.h"
53 #include "content/common/resource_messages.h" 54 #include "content/common/resource_messages.h"
54 #include "content/common/ssl_status_serialization.h" 55 #include "content/common/ssl_status_serialization.h"
55 #include "content/common/view_messages.h" 56 #include "content/common/view_messages.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 child_id); 265 child_id);
265 } 266 }
266 return 0; 267 return 0;
267 } 268 }
268 269
269 template <class T> 270 template <class T>
270 void NotifyOnUI(int type, int render_process_id, int render_view_id, 271 void NotifyOnUI(int type, int render_process_id, int render_view_id,
271 scoped_ptr<T> detail) { 272 scoped_ptr<T> detail) {
272 RenderViewHostImpl* host = 273 RenderViewHostImpl* host =
273 RenderViewHostImpl::FromID(render_process_id, render_view_id); 274 RenderViewHostImpl::FromID(render_process_id, render_view_id);
275 if (!host) {
276 RenderFrameHost* rfh =
277 RenderFrameHost::FromID(render_process_id, render_view_id);
278 if (!rfh)
279 return;
280
281 host = static_cast<RenderViewHostImpl*>(rfh->GetRenderViewHost());
282 }
274 if (host) { 283 if (host) {
275 RenderViewHostDelegate* delegate = host->GetDelegate(); 284 RenderViewHostDelegate* delegate = host->GetDelegate();
276 NotificationService::current()->Notify( 285 NotificationService::current()->Notify(
277 type, Source<WebContents>(delegate->GetAsWebContents()), 286 type, Source<WebContents>(delegate->GetAsWebContents()),
278 Details<T>(detail.get())); 287 Details<T>(detail.get()));
279 } 288 }
280 } 289 }
281 290
282 } // namespace 291 } // namespace
283 292
(...skipping 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after
1871 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS) 1880 if ((load_flags & net::LOAD_REPORT_RAW_HEADERS)
1872 && !policy->CanReadRawCookies(child_id)) { 1881 && !policy->CanReadRawCookies(child_id)) {
1873 VLOG(1) << "Denied unauthorized request for raw headers"; 1882 VLOG(1) << "Denied unauthorized request for raw headers";
1874 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS; 1883 load_flags &= ~net::LOAD_REPORT_RAW_HEADERS;
1875 } 1884 }
1876 1885
1877 return load_flags; 1886 return load_flags;
1878 } 1887 }
1879 1888
1880 } // namespace content 1889 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/render_view_host_tracker.cc ('k') | content/browser/renderer_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698