| OLD | NEW |
| 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 29 matching lines...) Expand all Loading... |
| 40 // Returns the shortened prompt text for this permission. Must be phrased | 40 // Returns the shortened prompt text for this permission. Must be phrased |
| 41 // as a heading, e.g. "Location", or "Camera". The permission bubble may | 41 // as a heading, e.g. "Location", or "Camera". The permission bubble may |
| 42 // coalesce different requests, and if it does, this text will be displayed | 42 // coalesce different requests, and if it does, this text will be displayed |
| 43 // next to an image and indicate the user grants the permission. | 43 // next to an image and indicate the user grants the permission. |
| 44 virtual base::string16 GetMessageTextFragment() const = 0; | 44 virtual base::string16 GetMessageTextFragment() const = 0; |
| 45 | 45 |
| 46 // Get whether this request was accompanied by a user gesture. Gestured | 46 // Get whether this request was accompanied by a user gesture. Gestured |
| 47 // requests will have priority over non-gestured ones. | 47 // requests will have priority over non-gestured ones. |
| 48 virtual bool HasUserGesture() const = 0; | 48 virtual bool HasUserGesture() const = 0; |
| 49 | 49 |
| 50 // Get the hostname on whose behalf this permission request is being made. | 50 // Get the origin on whose behalf this permission request is being made. |
| 51 virtual GURL GetRequestingHostname() const = 0; | 51 virtual GURL GetOrigin() const = 0; |
| 52 | 52 |
| 53 // Called when the user has granted the requested permission. | 53 // Called when the user has granted the requested permission. |
| 54 virtual void PermissionGranted() = 0; | 54 virtual void PermissionGranted() = 0; |
| 55 | 55 |
| 56 // Called when the user has denied the requested permission. | 56 // Called when the user has denied the requested permission. |
| 57 virtual void PermissionDenied() = 0; | 57 virtual void PermissionDenied() = 0; |
| 58 | 58 |
| 59 // Called when the user has cancelled the permission request. This | 59 // Called when the user has cancelled the permission request. This |
| 60 // corresponds to a denial, but is segregated in case the context needs to | 60 // corresponds to a denial, but is segregated in case the context needs to |
| 61 // be able to distinguish between an active refusal or an implicit refusal. | 61 // be able to distinguish between an active refusal or an implicit refusal. |
| 62 virtual void Cancelled() = 0; | 62 virtual void Cancelled() = 0; |
| 63 | 63 |
| 64 // The bubble this request was associated with was answered by the user. | 64 // The bubble this request was associated with was answered by the user. |
| 65 // It is safe for the request to be deleted at this point -- it will receive | 65 // It is safe for the request to be deleted at this point -- it will receive |
| 66 // no further message from the permission bubble system. This method will | 66 // no further message from the permission bubble system. This method will |
| 67 // eventually be called on every request which is not unregistered. | 67 // eventually be called on every request which is not unregistered. |
| 68 virtual void RequestFinished() = 0; | 68 virtual void RequestFinished() = 0; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_REQUEST_H_ | 71 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_REQUEST_H_ |
| OLD | NEW |