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

Side by Side Diff: chrome/browser/ui/website_settings/permission_bubble_request.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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/website_settings/permission_bubble_manager_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_REQUEST_H_ 5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_REQUEST_H_
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_REQUEST_H_ 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_REQUEST_H_
7 7
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "url/gurl.h" 9 #include "url/gurl.h"
10 10
(...skipping 17 matching lines...) Expand all
28 // that will be shown in the single-permission case and should be phrased 28 // that will be shown in the single-permission case and should be phrased
29 // positively as a complete sentence. 29 // positively as a complete sentence.
30 virtual base::string16 GetMessageText() const = 0; 30 virtual base::string16 GetMessageText() const = 0;
31 31
32 // Returns the shortened prompt text for this permission. Must be phrased 32 // Returns the shortened prompt text for this permission. Must be phrased
33 // as a heading, e.g. "Location", or "Camera". The permission bubble may 33 // as a heading, e.g. "Location", or "Camera". The permission bubble may
34 // coalesce different requests, and if it does, this text will be displayed 34 // coalesce different requests, and if it does, this text will be displayed
35 // next to an image and indicate the user grants the permission. 35 // next to an image and indicate the user grants the permission.
36 virtual base::string16 GetMessageTextFragment() const = 0; 36 virtual base::string16 GetMessageTextFragment() const = 0;
37 37
38 // Get whether this request was accompanied by a user gesture. User gestured 38 // Get whether this request was accompanied by a user gesture. Non-gestured
39 // permissions requests will not be suppressed. 39 // requests will be delayed if PermissionBubbleManager::
40 // RequireUserGesture(true) has been called on the manager.
40 virtual bool HasUserGesture() const = 0; 41 virtual bool HasUserGesture() const = 0;
41 42
42 // Get the hostname on whose behalf this permission request is being made. 43 // Get the hostname on whose behalf this permission request is being made.
43 virtual GURL GetRequestingHostname() const = 0; 44 virtual GURL GetRequestingHostname() const = 0;
44 45
45 // Called when the user has granted the requested permission. 46 // Called when the user has granted the requested permission.
46 virtual void PermissionGranted() = 0; 47 virtual void PermissionGranted() = 0;
47 48
48 // Called when the user has denied the requested permission. 49 // Called when the user has denied the requested permission.
49 virtual void PermissionDenied() = 0; 50 virtual void PermissionDenied() = 0;
50 51
51 // Called when the user has cancelled the permission request. This 52 // Called when the user has cancelled the permission request. This
52 // corresponds to a denial, but is segregated in case the context needs to 53 // corresponds to a denial, but is segregated in case the context needs to
53 // be able to distinguish between an active refusal or an implicit refusal. 54 // be able to distinguish between an active refusal or an implicit refusal.
54 virtual void Cancelled() = 0; 55 virtual void Cancelled() = 0;
55 56
56 // The bubble this request was associated with was answered by the user. 57 // The bubble this request was associated with was answered by the user.
57 // It is safe for the request to be deleted at this point -- it will receive 58 // It is safe for the request to be deleted at this point -- it will receive
58 // no further message from the permission bubble system. This method will 59 // no further message from the permission bubble system. This method will
59 // eventually be called on every request which is not unregistered. 60 // eventually be called on every request which is not unregistered.
60 virtual void RequestFinished() = 0; 61 virtual void RequestFinished() = 0;
61 }; 62 };
62 63
63 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_REQUEST_H_ 64 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_REQUEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/website_settings/permission_bubble_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698