Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 const 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. | |
|
Peter Beverloo
2016/08/22 20:11:07
Please do this prior to landing the CL.
johnme
2016/08/23 14:59:49
Ack, though gonna be tricky since it's platform-de
Peter Beverloo
2016/08/24 15:21:11
Right now it'd come down to max([android dips] * 4
| |
| 21 static const int kWebNotificationMaxImageWidthPx = 1800; // 450 dip * 4 | |
| 22 static const int kWebNotificationMaxImageHeightPx = 900; // 225 dip * 4 | |
|
Peter Beverloo
2016/08/22 20:11:07
nit: consider s/const/constexpr/ in this file.
johnme
2016/08/23 14:59:49
Done.
| |
| 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 const 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 const 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 const int kWebNotificationMaxActionIconSizePx = 128; // 32 dip * 4 |
| 30 | 35 |
| 31 } // namespace blink | 36 } // namespace blink |
| 32 | 37 |
| 33 #endif // WebNotificationConstants_h | 38 #endif // WebNotificationConstants_h |
| OLD | NEW |