diff options
author | jknotten@chromium.org <jknotten@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-29 19:43:29 +0000 |
---|---|---|
committer | jknotten@chromium.org <jknotten@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-29 19:43:29 +0000 |
commit | e41f4f18f08f7379b83c7c63b31ff29c583454e6 (patch) | |
tree | 2f8835d976afcadd7e776a39d7ecf03e50f6b188 /android_webview | |
parent | fdbfc4e535ce600d6a1b9e84d3550d7a6c784516 (diff) | |
download | chromium_src-e41f4f18f08f7379b83c7c63b31ff29c583454e6.zip chromium_src-e41f4f18f08f7379b83c7c63b31ff29c583454e6.tar.gz chromium_src-e41f4f18f08f7379b83c7c63b31ff29c583454e6.tar.bz2 |
[Android] Use resource throttle instead of HandleExternalProtocol.
Chrome on Android uses a throttle-based mechanism to intercept links
so that the user may choose to run an Android application instead of
loading the link in the browser. This mechanism works for both
internal (e.g. http:, https:) as well as external protocols (e.g.
tel:, geo:).
Instead of using the HandleExternalProtocol path way to handle
external protocols, it is better to have both internal and external
protocols overridden through the same mechanism. This has the
added benefit that an error page can be shown in Chrome on Android
if there is no external handler available for the given protocol, which
is not easily done using the HandleExternalProtocol mechanism.
BUG=156044
Review URL: https://chromiumcodereview.appspot.com/11265013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164717 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview')
-rw-r--r-- | android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc | 3 | ||||
-rw-r--r-- | android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc b/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc index b0f8e9a..387c3b9 100644 --- a/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc +++ b/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc @@ -115,12 +115,13 @@ content::ResourceDispatcherHostLoginDelegate* return new AwLoginDelegate(auth_info, request); } -void AwResourceDispatcherHostDelegate::HandleExternalProtocol(const GURL& url, +bool AwResourceDispatcherHostDelegate::HandleExternalProtocol(const GURL& url, int child_id, int route_id) { // The AwURLRequestJobFactory implementation should ensure this method never // gets called. NOTREACHED(); + return false; } void AwResourceDispatcherHostDelegate::SetOnlyAllowLoadFromCache( diff --git a/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h b/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h index 73fc467..68d2352 100644 --- a/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h +++ b/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h @@ -38,7 +38,7 @@ class AwResourceDispatcherHostDelegate net::AuthChallengeInfo* auth_info, net::URLRequest* request) OVERRIDE; - virtual void HandleExternalProtocol(const GURL& url, + virtual bool HandleExternalProtocol(const GURL& url, int child_id, int route_id) OVERRIDE; |