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

Unified Diff: third_party/WebKit/public/platform/modules/notifications/WebNotificationConstants.h

Issue 2261283002: Add Notification images (Blink + desktop implementation) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check IPC drawsNothing rather than isNull Created 4 years, 4 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: third_party/WebKit/public/platform/modules/notifications/WebNotificationConstants.h
diff --git a/third_party/WebKit/public/platform/modules/notifications/WebNotificationConstants.h b/third_party/WebKit/public/platform/modules/notifications/WebNotificationConstants.h
index 01714058424cd064fb79259e37e3137ea2cb16ee..e2743929bf70407fe1f0ecd7206b21ad510a22db 100644
--- a/third_party/WebKit/public/platform/modules/notifications/WebNotificationConstants.h
+++ b/third_party/WebKit/public/platform/modules/notifications/WebNotificationConstants.h
@@ -11,22 +11,27 @@ namespace blink {
// be indicated by the embedder.
// Maximum number of actions on a Platform Notification.
-static const size_t kWebNotificationMaxActions = 2;
+static constexpr size_t kWebNotificationMaxActions = 2;
// TODO(mvanouwerkerk): Update the notification resource loader to get the
// appropriate image sizes from the embedder.
+// The maximum reasonable image size, scaled from dip units to pixels using the
+// largest supported scaling factor. TODO(johnme): Check sizes are correct.
+static constexpr int kWebNotificationMaxImageWidthPx = 1800; // 450 dip * 4
+static constexpr int kWebNotificationMaxImageHeightPx = 900; // 225 dip * 4
+
// The maximum reasonable notification icon size, scaled from dip units to
// pixels using the largest supported scaling factor.
-static const int kWebNotificationMaxIconSizePx = 320; // 80 dip * 4
+static constexpr int kWebNotificationMaxIconSizePx = 320; // 80 dip * 4
// The maximum reasonable badge size, scaled from dip units to pixels using the
// largest supported scaling factor.
-static const int kWebNotificationMaxBadgeSizePx = 96; // 24 dip * 4
+static constexpr int kWebNotificationMaxBadgeSizePx = 96; // 24 dip * 4
// The maximum reasonable action icon size, scaled from dip units to
// pixels using the largest supported scaling factor.
-static const int kWebNotificationMaxActionIconSizePx = 128; // 32 dip * 4
+static constexpr int kWebNotificationMaxActionIconSizePx = 128; // 32 dip * 4
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698