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

Side by Side 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, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 WebNotificationConstants_h 5 #ifndef WebNotificationConstants_h
6 #define WebNotificationConstants_h 6 #define WebNotificationConstants_h
7 7
8 namespace blink { 8 namespace blink {
9 9
10 // TODO(johnme): The maximum number of actions is platform-specific and should 10 // TODO(johnme): The maximum number of actions is platform-specific and should
11 // be indicated by the embedder. 11 // be indicated by the embedder.
12 12
13 // Maximum number of actions on a Platform Notification. 13 // Maximum number of actions on a Platform Notification.
14 static const size_t kWebNotificationMaxActions = 2; 14 static constexpr size_t kWebNotificationMaxActions = 2;
15 15
16 // TODO(mvanouwerkerk): Update the notification resource loader to get the 16 // TODO(mvanouwerkerk): Update the notification resource loader to get the
17 // appropriate image sizes from the embedder. 17 // appropriate image sizes from the embedder.
18 18
19 // The maximum reasonable image size, scaled from dip units to pixels using the
20 // largest supported scaling factor. TODO(johnme): Check sizes are correct.
21 static constexpr int kWebNotificationMaxImageWidthPx = 1800; // 450 dip * 4
22 static constexpr int kWebNotificationMaxImageHeightPx = 900; // 225 dip * 4
23
19 // The maximum reasonable notification icon size, scaled from dip units to 24 // The maximum reasonable notification icon size, scaled from dip units to
20 // pixels using the largest supported scaling factor. 25 // pixels using the largest supported scaling factor.
21 static const int kWebNotificationMaxIconSizePx = 320; // 80 dip * 4 26 static constexpr int kWebNotificationMaxIconSizePx = 320; // 80 dip * 4
22 27
23 // The maximum reasonable badge size, scaled from dip units to pixels using the 28 // The maximum reasonable badge size, scaled from dip units to pixels using the
24 // largest supported scaling factor. 29 // largest supported scaling factor.
25 static const int kWebNotificationMaxBadgeSizePx = 96; // 24 dip * 4 30 static constexpr int kWebNotificationMaxBadgeSizePx = 96; // 24 dip * 4
26 31
27 // The maximum reasonable action icon size, scaled from dip units to 32 // The maximum reasonable action icon size, scaled from dip units to
28 // pixels using the largest supported scaling factor. 33 // pixels using the largest supported scaling factor.
29 static const int kWebNotificationMaxActionIconSizePx = 128; // 32 dip * 4 34 static constexpr int kWebNotificationMaxActionIconSizePx = 128; // 32 dip * 4
30 35
31 } // namespace blink 36 } // namespace blink
32 37
33 #endif // WebNotificationConstants_h 38 #endif // WebNotificationConstants_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698