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

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 3205 matching lines...) Expand 10 before | Expand all | Expand 10 after
3216 routing_id_, static_cast<int32_t>(log_severity), message.text, 3216 routing_id_, static_cast<int32_t>(log_severity), message.text,
3217 static_cast<int32_t>(source_line), source_name)); 3217 static_cast<int32_t>(source_line), source_name));
3218 } 3218 }
3219 3219
3220 void RenderFrameImpl::loadURLExternally(const blink::WebURLRequest& request, 3220 void RenderFrameImpl::loadURLExternally(const blink::WebURLRequest& request,
3221 blink::WebNavigationPolicy policy, 3221 blink::WebNavigationPolicy policy,
3222 const blink::WebString& suggested_name, 3222 const blink::WebString& suggested_name,
3223 bool should_replace_current_entry) { 3223 bool should_replace_current_entry) {
3224 Referrer referrer(RenderViewImpl::GetReferrerFromRequest(frame_, request)); 3224 Referrer referrer(RenderViewImpl::GetReferrerFromRequest(frame_, request));
3225 if (policy == blink::WebNavigationPolicyDownload) { 3225 if (policy == blink::WebNavigationPolicyDownload) {
3226 Send(new FrameHostMsg_DownloadUrl(render_view_->GetRoutingID(), 3226 ServiceWorkerNetworkProvider* provider =
3227 GetRoutingID(), request.url(), referrer, 3227 ServiceWorkerNetworkProvider::FromDocumentState(
3228 suggested_name)); 3228 DocumentState::FromDataSource(frame_->dataSource()));
3229 DCHECK(provider);
3230 FrameHostMsg_DownloadUrl_Params params;
3231 params.render_view_id = render_view_->GetRoutingID();
3232 params.render_frame_id = GetRoutingID();
3233 params.service_worker_provider_id = provider->provider_id();
3234 params.url = request.url();
3235 params.referrer = referrer;
3236 params.suggested_name = suggested_name;
3237 Send(new FrameHostMsg_DownloadUrl(params));
3229 } else { 3238 } else {
3230 OpenURL(request.url(), IsHttpPost(request), 3239 OpenURL(request.url(), IsHttpPost(request),
3231 GetRequestBodyForWebURLRequest(request), 3240 GetRequestBodyForWebURLRequest(request),
3232 GetWebURLRequestHeaders(request), referrer, policy, 3241 GetWebURLRequestHeaders(request), referrer, policy,
3233 should_replace_current_entry, false); 3242 should_replace_current_entry, false);
3234 } 3243 }
3235 } 3244 }
3236 3245
3237 blink::WebHistoryItem RenderFrameImpl::historyItemForNewChildFrame() { 3246 blink::WebHistoryItem RenderFrameImpl::historyItemForNewChildFrame() {
3238 // OOPIF enabled modes will punt this navigation to the browser in 3247 // OOPIF enabled modes will punt this navigation to the browser in
(...skipping 3392 matching lines...) Expand 10 before | Expand all | Expand 10 after
6631 // event target. Potentially a Pepper plugin will receive the event. 6640 // event target. Potentially a Pepper plugin will receive the event.
6632 // In order to tell whether a plugin gets the last mouse event and which it 6641 // In order to tell whether a plugin gets the last mouse event and which it
6633 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6642 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6634 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6643 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6635 // |pepper_last_mouse_event_target_|. 6644 // |pepper_last_mouse_event_target_|.
6636 pepper_last_mouse_event_target_ = nullptr; 6645 pepper_last_mouse_event_target_ = nullptr;
6637 #endif 6646 #endif
6638 } 6647 }
6639 6648
6640 } // namespace content 6649 } // 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