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/common/resource_dispatcher.h" | 7 #include "chrome/common/resource_dispatcher.h" |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 request_.referrer = request_info.referrer; | 104 request_.referrer = request_info.referrer; |
105 request_.frame_origin = request_info.frame_origin; | 105 request_.frame_origin = request_info.frame_origin; |
106 request_.main_frame_origin = request_info.main_frame_origin; | 106 request_.main_frame_origin = request_info.main_frame_origin; |
107 request_.headers = request_info.headers; | 107 request_.headers = request_info.headers; |
108 request_.load_flags = request_info.load_flags; | 108 request_.load_flags = request_info.load_flags; |
109 request_.origin_child_id = request_info.requestor_pid; | 109 request_.origin_child_id = request_info.requestor_pid; |
110 request_.resource_type = request_info.request_type; | 110 request_.resource_type = request_info.request_type; |
111 request_.request_context = request_info.request_context; | 111 request_.request_context = request_info.request_context; |
112 request_.appcache_host_id = request_info.appcache_host_id; | 112 request_.appcache_host_id = request_info.appcache_host_id; |
113 request_.download_to_file = request_info.download_to_file; | 113 request_.download_to_file = request_info.download_to_file; |
| 114 request_.has_user_gesture = request_info.has_user_gesture; |
114 request_.host_renderer_id = host_renderer_id_; | 115 request_.host_renderer_id = host_renderer_id_; |
115 request_.host_render_view_id = host_render_view_id_; | 116 request_.host_render_view_id = host_render_view_id_; |
116 } | 117 } |
117 | 118 |
118 IPCResourceLoaderBridge::~IPCResourceLoaderBridge() { | 119 IPCResourceLoaderBridge::~IPCResourceLoaderBridge() { |
119 // we remove our hook for the resource dispatcher only when going away, since | 120 // we remove our hook for the resource dispatcher only when going away, since |
120 // it doesn't keep track of whether we've force terminated the request | 121 // it doesn't keep track of whether we've force terminated the request |
121 if (request_id_ >= 0) { | 122 if (request_id_ >= 0) { |
122 // this operation may fail, as the dispatcher will have preemptively | 123 // this operation may fail, as the dispatcher will have preemptively |
123 // removed us when the renderer sends the ReceivedAllData message. | 124 // removed us when the renderer sends the ReceivedAllData message. |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 | 609 |
609 // static | 610 // static |
610 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { | 611 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { |
611 while (!queue->empty()) { | 612 while (!queue->empty()) { |
612 IPC::Message* message = queue->front(); | 613 IPC::Message* message = queue->front(); |
613 ReleaseResourcesInDataMessage(*message); | 614 ReleaseResourcesInDataMessage(*message); |
614 queue->pop_front(); | 615 queue->pop_front(); |
615 delete message; | 616 delete message; |
616 } | 617 } |
617 } | 618 } |
OLD | NEW |