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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2498193003: [WIP not ready for review] ServiceWorker Download support.
Patch Set: rebase Created 4 years, 1 month 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
« no previous file with comments | « content/public/browser/download_url_parameters.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3211 matching lines...) Expand 10 before | Expand all | Expand 10 after
3222 routing_id_, static_cast<int32_t>(log_severity), message.text, 3222 routing_id_, static_cast<int32_t>(log_severity), message.text,
3223 static_cast<int32_t>(source_line), source_name)); 3223 static_cast<int32_t>(source_line), source_name));
3224 } 3224 }
3225 3225
3226 void RenderFrameImpl::loadURLExternally(const blink::WebURLRequest& request, 3226 void RenderFrameImpl::loadURLExternally(const blink::WebURLRequest& request,
3227 blink::WebNavigationPolicy policy, 3227 blink::WebNavigationPolicy policy,
3228 const blink::WebString& suggested_name, 3228 const blink::WebString& suggested_name,
3229 bool should_replace_current_entry) { 3229 bool should_replace_current_entry) {
3230 Referrer referrer(RenderViewImpl::GetReferrerFromRequest(frame_, request)); 3230 Referrer referrer(RenderViewImpl::GetReferrerFromRequest(frame_, request));
3231 if (policy == blink::WebNavigationPolicyDownload) { 3231 if (policy == blink::WebNavigationPolicyDownload) {
3232 Send(new FrameHostMsg_DownloadUrl(render_view_->GetRoutingID(), 3232 ServiceWorkerNetworkProvider* provider =
3233 GetRoutingID(), request.url(), referrer, 3233 ServiceWorkerNetworkProvider::FromDocumentState(
3234 suggested_name)); 3234 DocumentState::FromDataSource(frame_->dataSource()));
3235 DCHECK(provider);
3236 FrameHostMsg_DownloadUrl_Params params;
3237 params.render_view_id = render_view_->GetRoutingID();
3238 params.render_frame_id = GetRoutingID();
3239 params.service_worker_provider_id = provider->provider_id();
3240 params.url = request.url();
3241 params.referrer = referrer;
3242 params.suggested_name = suggested_name;
3243 Send(new FrameHostMsg_DownloadUrl(params));
3235 } else { 3244 } else {
3236 OpenURL(request.url(), IsHttpPost(request), 3245 OpenURL(request.url(), IsHttpPost(request),
3237 GetRequestBodyForWebURLRequest(request), 3246 GetRequestBodyForWebURLRequest(request),
3238 GetWebURLRequestHeaders(request), referrer, policy, 3247 GetWebURLRequestHeaders(request), referrer, policy,
3239 should_replace_current_entry, false); 3248 should_replace_current_entry, false);
3240 } 3249 }
3241 } 3250 }
3242 3251
3243 blink::WebHistoryItem RenderFrameImpl::historyItemForNewChildFrame() { 3252 blink::WebHistoryItem RenderFrameImpl::historyItemForNewChildFrame() {
3244 // OOPIF enabled modes will punt this navigation to the browser in 3253 // OOPIF enabled modes will punt this navigation to the browser in
(...skipping 3392 matching lines...) Expand 10 before | Expand all | Expand 10 after
6637 // event target. Potentially a Pepper plugin will receive the event. 6646 // event target. Potentially a Pepper plugin will receive the event.
6638 // In order to tell whether a plugin gets the last mouse event and which it 6647 // In order to tell whether a plugin gets the last mouse event and which it
6639 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6648 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6640 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6649 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6641 // |pepper_last_mouse_event_target_|. 6650 // |pepper_last_mouse_event_target_|.
6642 pepper_last_mouse_event_target_ = nullptr; 6651 pepper_last_mouse_event_target_ = nullptr;
6643 #endif 6652 #endif
6644 } 6653 }
6645 6654
6646 } // namespace content 6655 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/download_url_parameters.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698