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