| Index: chrome/browser/external_protocol/external_protocol_handler.h
|
| diff --git a/chrome/browser/external_protocol/external_protocol_handler.h b/chrome/browser/external_protocol/external_protocol_handler.h
|
| index 7c934c5f7c6db51fe133bc4f5e2ad581836dd512..d7c7891a75b245fc4dd4cafaefc710f7ce81bd83 100644
|
| --- a/chrome/browser/external_protocol/external_protocol_handler.h
|
| +++ b/chrome/browser/external_protocol/external_protocol_handler.h
|
| @@ -30,7 +30,8 @@ class ExternalProtocolHandler {
|
| virtual ShellIntegration::DefaultProtocolClientWorker* CreateShellWorker(
|
| ShellIntegration::DefaultWebClientObserver* observer,
|
| const std::string& protocol) = 0;
|
| - virtual BlockState GetBlockState(const std::string& scheme) = 0;
|
| + virtual BlockState GetBlockState(const std::string& scheme,
|
| + bool user_gesture) = 0;
|
| virtual void BlockRequest() = 0;
|
| virtual void RunExternalProtocolDialog(const GURL& url,
|
| int render_process_host_id,
|
| @@ -41,7 +42,7 @@ class ExternalProtocolHandler {
|
| };
|
|
|
| // Returns whether we should block a given scheme.
|
| - static BlockState GetBlockState(const std::string& scheme);
|
| + static BlockState GetBlockState(const std::string& scheme, bool user_gesture);
|
|
|
| // Sets whether we should block a given scheme.
|
| static void SetBlockState(const std::string& scheme, BlockState state);
|
| @@ -54,14 +55,16 @@ class ExternalProtocolHandler {
|
| // application is launched.
|
| // Must run on the UI thread.
|
| static void LaunchUrl(const GURL& url, int render_process_host_id,
|
| - int tab_contents_id) {
|
| - LaunchUrlWithDelegate(url, render_process_host_id, tab_contents_id, NULL);
|
| + int tab_contents_id, bool user_gesture) {
|
| + LaunchUrlWithDelegate(
|
| + url, render_process_host_id, tab_contents_id, NULL, user_gesture);
|
| }
|
|
|
| // Version of LaunchUrl allowing use of a delegate to facilitate unit
|
| // testing.
|
| static void LaunchUrlWithDelegate(const GURL& url, int render_process_host_id,
|
| - int tab_contents_id, Delegate* delegate);
|
| + int tab_contents_id, Delegate* delegate,
|
| + bool user_gesture);
|
|
|
| // Creates and runs a External Protocol dialog box.
|
| // |url| - The url of the request.
|
| @@ -95,12 +98,6 @@ class ExternalProtocolHandler {
|
| // Prepopulates the dictionary with known protocols to deny or allow, if
|
| // preferences for them do not already exist.
|
| static void PrepopulateDictionary(base::DictionaryValue* win_pref);
|
| -
|
| - // 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_EXTERNAL_PROTOCOL_HANDLER_H_
|
|
|