diff options
author | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-27 21:28:26 +0000 |
---|---|---|
committer | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-27 21:28:26 +0000 |
commit | d070ec638d42d355dbf11fd8c1d65d80452b37b3 (patch) | |
tree | 6ba7b0b52a61b36f01c99c1dd8bb76d9f52fca54 /chrome/browser/external_protocol_handler.h | |
parent | 599f9732f1e0d9c1e53b81a579cc142d243e1fbb (diff) | |
download | chromium_src-d070ec638d42d355dbf11fd8c1d65d80452b37b3.zip chromium_src-d070ec638d42d355dbf11fd8c1d65d80452b37b3.tar.gz chromium_src-d070ec638d42d355dbf11fd8c1d65d80452b37b3.tar.bz2 |
Rename ExternalProtocolHandler::OnUserGesture -> PermitLaunchUrl & call from EFD::HandleRequest.
Extension functions should be allowed to make repeat requests to external protocol handling without needing a user gesture (see bug). This allows them to do so (and changes the method name for clarity).
BUG=39178
TEST=NONE
Review URL: http://codereview.chromium.org/2884040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53846 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/external_protocol_handler.h')
-rw-r--r-- | chrome/browser/external_protocol_handler.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/external_protocol_handler.h b/chrome/browser/external_protocol_handler.h index d9b9592..d67a273 100644 --- a/chrome/browser/external_protocol_handler.h +++ b/chrome/browser/external_protocol_handler.h @@ -69,8 +69,11 @@ class ExternalProtocolHandler { // preferences for them do not already exist. static void PrepopulateDictionary(DictionaryValue* win_pref); - // Called when the user interacts with a web page. - static void OnUserGesture(); + // Allows LaunchUrl to proceed with launching an external protocol handler. + // This is typically triggered by a user gesture, but is also called for + // each extension API function. Note that each call to LaunchUrl resets + // the state to false (not allowed). + static void PermitLaunchUrl(); }; #endif // CHROME_BROWSER_EXTERNAL_PROTOCOL_HANDLER_H_ |