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 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 4445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4456 | 4456 |
4457 pending_navigation_params_.reset( | 4457 pending_navigation_params_.reset( |
4458 new NavigationParams(common_params, start_params, request_params)); | 4458 new NavigationParams(common_params, start_params, request_params)); |
4459 | 4459 |
4460 // Create parameters for a standard navigation. | 4460 // Create parameters for a standard navigation. |
4461 blink::WebFrameLoadType load_type = blink::WebFrameLoadType::Standard; | 4461 blink::WebFrameLoadType load_type = blink::WebFrameLoadType::Standard; |
4462 bool should_load_request = false; | 4462 bool should_load_request = false; |
4463 WebHistoryItem item_for_history_navigation; | 4463 WebHistoryItem item_for_history_navigation; |
4464 WebURLRequest request = CreateURLRequestForNavigation( | 4464 WebURLRequest request = CreateURLRequestForNavigation( |
4465 common_params, stream_params.Pass(), frame_->isViewSourceModeEnabled()); | 4465 common_params, stream_params.Pass(), frame_->isViewSourceModeEnabled()); |
| 4466 #if defined(OS_ANDROID) |
| 4467 request.setHasUserGesture(start_params.has_user_gesture); |
| 4468 #endif |
4466 | 4469 |
4467 // PlzNavigate: Make sure that Blink's loader will not try to use browser side | 4470 // PlzNavigate: Make sure that Blink's loader will not try to use browser side |
4468 // navigation for this request (since it already went to the browser). | 4471 // navigation for this request (since it already went to the browser). |
4469 if (browser_side_navigation) | 4472 if (browser_side_navigation) |
4470 request.setCheckForBrowserSideNavigation(false); | 4473 request.setCheckForBrowserSideNavigation(false); |
4471 | 4474 |
4472 // If we are reloading, then use the history state of the current frame. | 4475 // If we are reloading, then use the history state of the current frame. |
4473 // Otherwise, if we have history state, then we need to navigate to it, which | 4476 // Otherwise, if we have history state, then we need to navigate to it, which |
4474 // corresponds to a back/forward navigation event. Update the parameters | 4477 // corresponds to a back/forward navigation event. Update the parameters |
4475 // depending on the navigation type. | 4478 // depending on the navigation type. |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5069 void RenderFrameImpl::RegisterMojoServices() { | 5072 void RenderFrameImpl::RegisterMojoServices() { |
5070 // Only main frame have ImageDownloader service. | 5073 // Only main frame have ImageDownloader service. |
5071 if (!frame_->parent()) { | 5074 if (!frame_->parent()) { |
5072 GetServiceRegistry()->AddService<image_downloader::ImageDownloader>( | 5075 GetServiceRegistry()->AddService<image_downloader::ImageDownloader>( |
5073 base::Bind(&ImageDownloaderImpl::CreateMojoService, | 5076 base::Bind(&ImageDownloaderImpl::CreateMojoService, |
5074 base::Unretained(this))); | 5077 base::Unretained(this))); |
5075 } | 5078 } |
5076 } | 5079 } |
5077 | 5080 |
5078 } // namespace content | 5081 } // namespace content |
OLD | NEW |