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

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

Issue 1315023004: PlzNavigate: Add parameters to navigation structures for ServiceWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: LOCATION bis Created 5 years, 2 months 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/common/navigation_params.cc ('k') | content/test/test_render_frame_host.cc » ('j') | 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 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 4908 matching lines...) Expand 10 before | Expand all | Expand 10 after
4919 WebDataSource* provisional_data_source = frame_->provisionalDataSource(); 4919 WebDataSource* provisional_data_source = frame_->provisionalDataSource();
4920 WebDataSource* current_data_source = frame_->dataSource(); 4920 WebDataSource* current_data_source = frame_->dataSource();
4921 WebDataSource* data_source = 4921 WebDataSource* data_source =
4922 provisional_data_source ? provisional_data_source : current_data_source; 4922 provisional_data_source ? provisional_data_source : current_data_source;
4923 4923
4924 // The current entry can only be replaced if there already is an entry in the 4924 // The current entry can only be replaced if there already is an entry in the
4925 // history list. 4925 // history list.
4926 if (data_source && render_view_->history_list_length_ > 0) { 4926 if (data_source && render_view_->history_list_length_ > 0) {
4927 should_replace_current_entry = data_source->replacesCurrentHistoryItem(); 4927 should_replace_current_entry = data_source->replacesCurrentHistoryItem();
4928 } 4928 }
4929
4930 // These values are assumed on the browser side for navigations. These checks
4931 // ensure the renderer has the correct values.
4932 DCHECK_EQ(FETCH_REQUEST_MODE_SAME_ORIGIN,
4933 GetFetchRequestModeForWebURLRequest(*request));
4934 DCHECK_EQ(FETCH_CREDENTIALS_MODE_INCLUDE,
4935 GetFetchCredentialsModeForWebURLRequest(*request));
4936 DCHECK(GetFetchRedirectModeForWebURLRequest(*request) ==
4937 FetchRedirectMode::MANUAL_MODE);
4938 DCHECK_IMPLIES(!frame_->parent(),
4939 GetRequestContextFrameTypeForWebURLRequest(*request) ==
4940 REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL);
4941 DCHECK_IMPLIES(frame_->parent(),
4942 GetRequestContextFrameTypeForWebURLRequest(*request) ==
4943 REQUEST_CONTEXT_FRAME_TYPE_NESTED);
4944
4929 Send(new FrameHostMsg_BeginNavigation( 4945 Send(new FrameHostMsg_BeginNavigation(
4930 routing_id_, 4946 routing_id_,
4931 MakeCommonNavigationParams(request, should_replace_current_entry), 4947 MakeCommonNavigationParams(request, should_replace_current_entry),
4932 BeginNavigationParams( 4948 BeginNavigationParams(
4933 request->httpMethod().latin1(), GetWebURLRequestHeaders(*request), 4949 request->httpMethod().latin1(), GetWebURLRequestHeaders(*request),
4934 GetLoadFlagsForWebURLRequest(*request), request->hasUserGesture()), 4950 GetLoadFlagsForWebURLRequest(*request), request->hasUserGesture(),
4951 request->skipServiceWorker(),
4952 GetRequestContextTypeForWebURLRequest(*request)),
4935 GetRequestBodyForWebURLRequest(*request))); 4953 GetRequestBodyForWebURLRequest(*request)));
4936 } 4954 }
4937 4955
4938 void RenderFrameImpl::LoadDataURL(const CommonNavigationParams& params, 4956 void RenderFrameImpl::LoadDataURL(const CommonNavigationParams& params,
4939 WebFrame* frame) { 4957 WebFrame* frame) {
4940 // A loadData request with a specified base URL. 4958 // A loadData request with a specified base URL.
4941 std::string mime_type, charset, data; 4959 std::string mime_type, charset, data;
4942 if (net::DataURL::Parse(params.url, &mime_type, &charset, &data)) { 4960 if (net::DataURL::Parse(params.url, &mime_type, &charset, &data)) {
4943 const GURL base_url = params.base_url_for_data_url.is_empty() ? 4961 const GURL base_url = params.base_url_for_data_url.is_empty() ?
4944 params.url : params.base_url_for_data_url; 4962 params.url : params.base_url_for_data_url;
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
5196 mojo::ServiceProviderPtr service_provider(21); 5214 mojo::ServiceProviderPtr service_provider(21);
5197 mojo::URLRequestPtr request(mojo::URLRequest::New()); 5215 mojo::URLRequestPtr request(mojo::URLRequest::New());
5198 request->url = mojo::String::From(url); 5216 request->url = mojo::String::From(url);
5199 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), 5217 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider),
5200 nullptr, nullptr, 5218 nullptr, nullptr,
5201 base::Bind(&OnGotContentHandlerID)); 5219 base::Bind(&OnGotContentHandlerID));
5202 return service_provider.Pass(); 5220 return service_provider.Pass();
5203 } 5221 }
5204 5222
5205 } // namespace content 5223 } // namespace content
OLDNEW
« no previous file with comments | « content/common/navigation_params.cc ('k') | content/test/test_render_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698