Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 5116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5127 std::unique_ptr<StreamOverrideParameters> stream_override( | 5127 std::unique_ptr<StreamOverrideParameters> stream_override( |
| 5128 new StreamOverrideParameters()); | 5128 new StreamOverrideParameters()); |
| 5129 stream_override->stream_url = stream_url; | 5129 stream_override->stream_url = stream_url; |
| 5130 stream_override->consumer_handle = | 5130 stream_override->consumer_handle = |
| 5131 mojo::ScopedDataPipeConsumerHandle(commit_data.handle); | 5131 mojo::ScopedDataPipeConsumerHandle(commit_data.handle); |
| 5132 stream_override->response = response; | 5132 stream_override->response = response; |
| 5133 stream_override->redirects = request_params.redirects; | 5133 stream_override->redirects = request_params.redirects; |
| 5134 stream_override->redirect_responses = request_params.redirect_response; | 5134 stream_override->redirect_responses = request_params.redirect_response; |
| 5135 stream_override->redirect_infos = request_params.redirect_infos; | 5135 stream_override->redirect_infos = request_params.redirect_infos; |
| 5136 | 5136 |
| 5137 // PlzNavigate: Notify the browser that it can released its |stream_handle_| | |
|
clamy
2017/06/12 15:15:47
nit: no PlzNavigate needed (it's a full PlzNavigat
arthursonzogni
2017/06/13 09:21:48
Done.
| |
| 5138 // when the |stream_override| object is no more used. This is a temporary | |
| 5139 // solution until mojo is used. | |
| 5140 stream_override->on_delete = base::BindOnce( | |
| 5141 [](base::WeakPtr<RenderFrameImpl> weak_self, const GURL& url) { | |
| 5142 if (RenderFrameImpl* self = weak_self.get()) { | |
| 5143 self->Send( | |
| 5144 new FrameHostMsg_StreamHandleConsumed(self->routing_id_, url)); | |
| 5145 } | |
| 5146 }, | |
| 5147 weak_factory_.GetWeakPtr()); | |
| 5148 | |
| 5137 if (commit_data.url_loader_factory.is_valid()) { | 5149 if (commit_data.url_loader_factory.is_valid()) { |
| 5138 // Chrome doesn't use interface versioning. | 5150 // Chrome doesn't use interface versioning. |
| 5139 url_loader_factory_.Bind(mojom::URLLoaderFactoryPtrInfo( | 5151 url_loader_factory_.Bind(mojom::URLLoaderFactoryPtrInfo( |
| 5140 mojo::ScopedMessagePipeHandle(commit_data.url_loader_factory), 0u)); | 5152 mojo::ScopedMessagePipeHandle(commit_data.url_loader_factory), 0u)); |
| 5141 } | 5153 } |
| 5142 | 5154 |
| 5143 // If the request was initiated in the context of a user gesture then make | 5155 // If the request was initiated in the context of a user gesture then make |
| 5144 // sure that the navigation also executes in the context of a user gesture. | 5156 // sure that the navigation also executes in the context of a user gesture. |
| 5145 std::unique_ptr<blink::WebScopedUserGesture> gesture( | 5157 std::unique_ptr<blink::WebScopedUserGesture> gesture( |
| 5146 request_params.has_user_gesture ? new blink::WebScopedUserGesture(frame_) | 5158 request_params.has_user_gesture ? new blink::WebScopedUserGesture(frame_) |
| (...skipping 1708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6855 policy(info.default_policy), | 6867 policy(info.default_policy), |
| 6856 replaces_current_history_item(info.replaces_current_history_item), | 6868 replaces_current_history_item(info.replaces_current_history_item), |
| 6857 history_navigation_in_new_child_frame( | 6869 history_navigation_in_new_child_frame( |
| 6858 info.is_history_navigation_in_new_child_frame), | 6870 info.is_history_navigation_in_new_child_frame), |
| 6859 client_redirect(info.is_client_redirect), | 6871 client_redirect(info.is_client_redirect), |
| 6860 cache_disabled(info.is_cache_disabled), | 6872 cache_disabled(info.is_cache_disabled), |
| 6861 form(info.form), | 6873 form(info.form), |
| 6862 source_location(info.source_location) {} | 6874 source_location(info.source_location) {} |
| 6863 | 6875 |
| 6864 } // namespace content | 6876 } // namespace content |
| OLD | NEW |