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

Unified Diff: chrome/browser/external_protocol/external_protocol_handler.h

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: joi and pkasting comments 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/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..f8761d14cd5f233ffc05e0ed5afcb33df73071e7 100644
--- a/chrome/browser/external_protocol/external_protocol_handler.h
+++ b/chrome/browser/external_protocol/external_protocol_handler.h
@@ -96,11 +96,17 @@ class ExternalProtocolHandler {
// 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();
+ class ScopedUserGesture {
+ public:
+ ScopedUserGesture();
+ ~ScopedUserGesture();
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ScopedUserGesture);
+ };
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ExternalProtocolHandler);
};
+
#endif // CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698