diff options
Diffstat (limited to 'chrome/browser/ui/website_settings/permission_bubble_request.h')
-rw-r--r-- | chrome/browser/ui/website_settings/permission_bubble_request.h | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/chrome/browser/ui/website_settings/permission_bubble_request.h b/chrome/browser/ui/website_settings/permission_bubble_request.h index 4beec27..8093515 100644 --- a/chrome/browser/ui/website_settings/permission_bubble_request.h +++ b/chrome/browser/ui/website_settings/permission_bubble_request.h @@ -6,6 +6,7 @@ #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_REQUEST_H_ #include "base/strings/string16.h" +#include "url/gurl.h" // Describes the interface a feature utilizing permission bubbles should // implement. A class of this type is registered with the permission bubble @@ -19,31 +20,27 @@ class PermissionBubbleRequest { public: virtual ~PermissionBubbleRequest() {} + // The icon to use next to the message text fragment in the permission bubble. + // Must be a valid icon of size 16x16. (TODO(gbillock): tbd size) + virtual int GetIconID() const = 0; + // Returns the full prompt text for this permission. This is the only text // that will be shown in the single-permission case and should be phrased // positively as a complete sentence. virtual base::string16 GetMessageText() const = 0; // Returns the shortened prompt text for this permission. Must be phrased - // positively -- the permission bubble may coalesce different requests, and - // if it does, this text will be displayed next to a bullet or checkbox - // indicating the user grants the permission. + // as a heading, e.g. "Location", or "Camera". The permission bubble may + // coalesce different requests, and if it does, this text will be displayed + // next to an image and indicate the user grants the permission. virtual base::string16 GetMessageTextFragment() const = 0; - // May return alternative text for the accept button in the case where this - // single permission request is triggered in the bubble. If it returns an - // empty string the default is used. - // If the permission request is coalesced, the text will revert to the default - // "Accept"-alike, so the message text must be clear enough for users to - // understand even if this text is not used. - virtual base::string16 GetAlternateAcceptButtonText() const = 0; + // Get whether this request was accompanied by a user gesture. User gestured + // permissions requests will not be suppressed. + virtual bool HasUserGesture() const = 0; - // May return alternative text for the deny button in the case where this - // single permission request is triggered in the bubble. If it returns an - // empty string the default is used. This text may not be used at all, - // so the |GetMessageText()| prompt should be clear enough to convey the - // permission request with generic button text. - virtual base::string16 GetAlternateDenyButtonText() const = 0; + // Get the hostname on whose behalf this permission request is being made. + virtual GURL GetRequestingHostname() const = 0; // Called when the user has granted the requested permission. virtual void PermissionGranted() = 0; |