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

Unified Diff: chrome/browser/ui/website_settings/permission_bubble_manager.h

Issue 839063003: By default, remove user gesture restriction from permission bubbles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove debugging statement Created 5 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/ui/website_settings/permission_bubble_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/website_settings/permission_bubble_manager.h
diff --git a/chrome/browser/ui/website_settings/permission_bubble_manager.h b/chrome/browser/ui/website_settings/permission_bubble_manager.h
index 25e9a58fe1c7ffe14ab152e9852dcd851d6563f0..ec56c9ee57ce7d33a333c0c69f42e9ae1685db5d 100644
--- a/chrome/browser/ui/website_settings/permission_bubble_manager.h
+++ b/chrome/browser/ui/website_settings/permission_bubble_manager.h
@@ -57,6 +57,12 @@ class PermissionBubbleManager
// take ownership of the view.
void SetView(PermissionBubbleView* view) override;
+ // Controls whether incoming permission requests require user gestures.
+ // If |required| is false, requests will be displayed as soon as they come in.
+ // If |required| is true, requests will be silently queued until a request
+ // comes in with a user gesture.
+ void RequireUserGesture(bool required);
+
private:
friend class DownloadRequestLimiterTest;
friend class PermissionBubbleManagerTest;
@@ -110,6 +116,10 @@ class PermissionBubbleManager
bool HasUserGestureRequest(
const std::vector<PermissionBubbleRequest*>& queue);
+ // Whether to delay displaying the bubble until a request with a user gesture.
+ // False by default, unless RequireUserGesture(bool) changes the value.
+ bool require_user_gesture_;
+
// Whether or not we are showing the bubble in this tab.
bool bubble_showing_;
« no previous file with comments | « no previous file | chrome/browser/ui/website_settings/permission_bubble_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698