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 // 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 "chrome/browser/renderer_host/resource_dispatcher_host.h" | 7 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 process_type, | 510 process_type, |
511 child_id, | 511 child_id, |
512 route_id, | 512 route_id, |
513 request_id, | 513 request_id, |
514 request_data.frame_origin, | 514 request_data.frame_origin, |
515 request_data.main_frame_origin, | 515 request_data.main_frame_origin, |
516 request_data.resource_type, | 516 request_data.resource_type, |
517 upload_size, | 517 upload_size, |
518 false, // is download | 518 false, // is download |
519 ResourceType::IsFrame(request_data.resource_type), // allow_download | 519 ResourceType::IsFrame(request_data.resource_type), // allow_download |
| 520 request_data.has_user_gesture, |
520 request_data.host_renderer_id, | 521 request_data.host_renderer_id, |
521 request_data.host_render_view_id); | 522 request_data.host_render_view_id); |
522 ApplyExtensionLocalizationFilter(request_data.url, request_data.resource_type, | 523 ApplyExtensionLocalizationFilter(request_data.url, request_data.resource_type, |
523 extra_info); | 524 extra_info); |
524 SetRequestInfo(request, extra_info); // Request takes ownership. | 525 SetRequestInfo(request, extra_info); // Request takes ownership. |
525 chrome_browser_net::SetOriginProcessUniqueIDForRequest( | 526 chrome_browser_net::SetOriginProcessUniqueIDForRequest( |
526 request_data.origin_child_id, request); | 527 request_data.origin_child_id, request); |
527 | 528 |
528 if (request->url().SchemeIs(chrome::kBlobScheme) && context) { | 529 if (request->url().SchemeIs(chrome::kBlobScheme) && context) { |
529 // Hang on to a reference to ensure the blob is not released prior | 530 // Hang on to a reference to ensure the blob is not released prior |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 ChildProcessInfo::RENDER_PROCESS, | 648 ChildProcessInfo::RENDER_PROCESS, |
648 child_id, | 649 child_id, |
649 route_id, | 650 route_id, |
650 request_id_, | 651 request_id_, |
651 "null", // frame_origin | 652 "null", // frame_origin |
652 "null", // main_frame_origin | 653 "null", // main_frame_origin |
653 ResourceType::SUB_RESOURCE, | 654 ResourceType::SUB_RESOURCE, |
654 0, // upload_size | 655 0, // upload_size |
655 download, // is_download | 656 download, // is_download |
656 download, // allow_download | 657 download, // allow_download |
| 658 false, // has_user_gesture |
657 -1, // Host renderer id | 659 -1, // Host renderer id |
658 -1); // Host render view id | 660 -1); // Host render view id |
659 } | 661 } |
660 | 662 |
661 void ResourceDispatcherHost::OnClosePageACK( | 663 void ResourceDispatcherHost::OnClosePageACK( |
662 const ViewMsg_ClosePage_Params& params) { | 664 const ViewMsg_ClosePage_Params& params) { |
663 if (params.for_cross_site_transition) { | 665 if (params.for_cross_site_transition) { |
664 // Closes for cross-site transitions are handled such that the cross-site | 666 // Closes for cross-site transitions are handled such that the cross-site |
665 // transition continues. | 667 // transition continues. |
666 GlobalRequestID global_id(params.new_render_process_host_id, | 668 GlobalRequestID global_id(params.new_render_process_host_id, |
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1930 return is_prefetch_enabled_; | 1932 return is_prefetch_enabled_; |
1931 } | 1933 } |
1932 | 1934 |
1933 // static | 1935 // static |
1934 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) { | 1936 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) { |
1935 is_prefetch_enabled_ = value; | 1937 is_prefetch_enabled_ = value; |
1936 } | 1938 } |
1937 | 1939 |
1938 // static | 1940 // static |
1939 bool ResourceDispatcherHost::is_prefetch_enabled_ = false; | 1941 bool ResourceDispatcherHost::is_prefetch_enabled_ = false; |
OLD | NEW |