Index: content/browser/loader/resource_dispatcher_host_impl.cc |
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc |
index 923431582ceb0ce4d5575d7bae386ac35d74e166..574122e2b2723875f2671bc7f5579196c5506b66 100644 |
--- a/content/browser/loader/resource_dispatcher_host_impl.cc |
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc |
@@ -679,8 +679,15 @@ bool ResourceDispatcherHostImpl::HandleExternalProtocol(ResourceLoader* loader, |
if (job_factory->IsHandledURL(url)) |
return false; |
- return delegate_->HandleExternalProtocol(url, info->GetChildID(), |
- info->GetRouteID()); |
+ bool initiated_by_user_gesture = |
+ (loader->request()->load_flags() & net::LOAD_MAYBE_USER_GESTURE) != 0; |
+ bool handled = delegate_->HandleExternalProtocol(url, info->GetChildID(), |
+ info->GetRouteID(), |
+ initiated_by_user_gesture); |
+ // Consume the user gesture if the external protocol dialog is shown. |
+ if (handled) |
+ last_user_gesture_time_ = base::TimeTicks(); |
+ return handled; |
} |
void ResourceDispatcherHostImpl::DidStartRequest(ResourceLoader* loader) { |