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

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

Issue 1901133002: Move the notification constants to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
new file mode 100644
index 0000000000000000000000000000000000000000..01714058424cd064fb79259e37e3137ea2cb16ee
--- /dev/null
+++ b/third_party/WebKit/public/platform/modules/notifications/WebNotificationConstants.h
@@ -0,0 +1,33 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WebNotificationConstants_h
+#define WebNotificationConstants_h
+
+namespace blink {
+
+// TODO(johnme): The maximum number of actions is platform-specific and should
+// be indicated by the embedder.
+
+// Maximum number of actions on a Platform Notification.
+static const size_t kWebNotificationMaxActions = 2;
+
+// TODO(mvanouwerkerk): Update the notification resource loader to get the
+// appropriate image sizes from the embedder.
+
+// 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
+
+// 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
+
+// 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
+
+} // namespace blink
+
+#endif // WebNotificationConstants_h

Powered by Google App Engine
This is Rietveld 408576698