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

Unified Diff: chrome/browser/permissions/permission_request.h

Issue 2385063005: Make PermissionRequest::GetIconId return different types (Closed)
Patch Set: android Created 4 years, 2 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/permissions/permission_request.h
diff --git a/chrome/browser/permissions/permission_request.h b/chrome/browser/permissions/permission_request.h
index c5eed7e516f572fb2ad646c7471f5a444a535cad..f3099b1c8b91578d4bcb13b0f950685eadac9bd6 100644
--- a/chrome/browser/permissions/permission_request.h
+++ b/chrome/browser/permissions/permission_request.h
@@ -60,16 +60,19 @@ enum class PermissionRequestGestureType {
// requests, or depending on the situation, not shown at all.
class PermissionRequest {
public:
+#if defined(OS_ANDROID)
+ // On Android, icons are represented with an IDR_ identifier.
+ typedef int IconId;
+#else
+ // On desktop, we use a vector icon id.
+ typedef gfx::VectorIconId IconId;
+#endif
+
PermissionRequest();
virtual ~PermissionRequest() {}
- // Returns a vector icon id if the icon should be drawn as a vector
- // resource. Otherwise, returns VECTOR_ICON_NONE.
- virtual gfx::VectorIconId GetVectorIconId() const;
-
// The icon to use next to the message text fragment in the permission bubble.
- // TODO(estade): remove this in favor of GetVectorIconId().
- virtual int GetIconId() const;
+ virtual IconId GetIconId() const = 0;
// Returns the shortened prompt text for this permission. Must be phrased
// as a heading, e.g. "Location", or "Camera". The permission bubble may

Powered by Google App Engine
This is Rietveld 408576698