| Index: content/renderer/render_frame_impl.cc
|
| diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
| index 0483c3d0781c3c8393f1c3d29009769c38df48bd..24fafd9677c7276347a0184ad8d35278aed818e8 100644
|
| --- a/content/renderer/render_frame_impl.cc
|
| +++ b/content/renderer/render_frame_impl.cc
|
| @@ -4859,7 +4859,8 @@ void RenderFrameImpl::OnCommitNavigation(
|
| const ResourceResponseHead& response,
|
| const GURL& stream_url,
|
| const CommonNavigationParams& common_params,
|
| - const RequestNavigationParams& request_params) {
|
| + const RequestNavigationParams& request_params,
|
| + bool user_gesture) {
|
| CHECK(IsBrowserSideNavigationEnabled());
|
| // This will override the url requested by the WebURLLoader, as well as
|
| // provide it with the response to the request.
|
| @@ -4868,6 +4869,11 @@ void RenderFrameImpl::OnCommitNavigation(
|
| stream_override->stream_url = stream_url;
|
| stream_override->response = response;
|
|
|
| + // If the request was initiated in the context of a user gesture then make
|
| + // sure that the navigation also executes in the context of a user gesture.
|
| + std::unique_ptr<blink::WebScopedUserGesture> gesture(
|
| + user_gesture ? new blink::WebScopedUserGesture : nullptr);
|
| +
|
| NavigateInternal(common_params, StartNavigationParams(), request_params,
|
| std::move(stream_override));
|
| }
|
|
|