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

Unified Diff: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc

Issue 131783012: Fix the handling of user gestures for external protocol handler dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unnecessary DCHECK Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
index c1c3126aeb2ebea3d48ad7c647155def0966a120..af9c19d7a9d75862fdec9e22f2d9c62d99e2fd91 100644
--- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
@@ -198,7 +198,8 @@ void SendExecuteMimeTypeHandlerEvent(scoped_ptr<content::StreamHandle> stream,
extension_id, web_contents, stream.Pass(), expected_content_size);
}
-void LaunchURL(const GURL& url, int render_process_id, int render_view_id) {
+void LaunchURL(const GURL& url, int render_process_id, int render_view_id,
+ bool user_gesture) {
// If there is no longer a WebContents, the request may have raced with tab
// closing. Don't fire the external request. (It may have been a prerender.)
content::WebContents* web_contents =
@@ -217,7 +218,8 @@ void LaunchURL(const GURL& url, int render_process_id, int render_view_id) {
ExternalProtocolHandler::LaunchUrlWithDelegate(
url, render_process_id, render_view_id,
- g_external_protocol_handler_delegate);
+ g_external_protocol_handler_delegate,
+ user_gesture);
}
#endif // !defined(OS_ANDROID)
@@ -441,7 +443,10 @@ ResourceDispatcherHostLoginDelegate*
}
bool ChromeResourceDispatcherHostDelegate::HandleExternalProtocol(
- const GURL& url, int child_id, int route_id) {
+ const GURL& url,
+ int child_id,
+ int route_id,
+ bool initiated_by_user_gesture) {
#if defined(OS_ANDROID)
// Android use a resource throttle to handle external as well as internal
// protocols.
@@ -457,7 +462,8 @@ bool ChromeResourceDispatcherHostDelegate::HandleExternalProtocol(
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
- base::Bind(&LaunchURL, url, child_id, route_id));
+ base::Bind(&LaunchURL, url, child_id, route_id,
+ initiated_by_user_gesture));
return true;
#endif
}
« no previous file with comments | « chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h ('k') | chrome/browser/ui/tab_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698