Re-subimission of https://codereview.chromium.org/1041213003/
[chromium-blink-merge.git] / content / public / common / platform_notification_data.h
blobf6c999d82be080941bdcfdcc79322b6b282ce70e
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_COMMON_PLATFORM_NOTIFICATION_DATA_H_
6 #define CONTENT_PUBLIC_COMMON_PLATFORM_NOTIFICATION_DATA_H_
8 #include <string>
10 #include "base/strings/string16.h"
11 #include "content/common/content_export.h"
12 #include "url/gurl.h"
14 namespace content {
16 // Structure representing the information associated with a Web Notification.
17 // This struct should include the developer-visible information, kept
18 // synchronized with the WebNotificationData structure defined in the Blink API.
19 struct CONTENT_EXPORT PlatformNotificationData {
20 PlatformNotificationData();
21 ~PlatformNotificationData();
23 enum NotificationDirection {
24 NotificationDirectionLeftToRight,
25 NotificationDirectionRightToLeft,
27 NotificationDirectionLast = NotificationDirectionRightToLeft
30 // Title to be displayed with the Web Notification.
31 base::string16 title;
33 // Hint to determine the directionality of the displayed notification.
34 NotificationDirection direction;
36 // BCP 47 language tag describing the notification's contents. Optional.
37 std::string lang;
39 // Contents of the notification.
40 base::string16 body;
42 // Tag of the notification. Notifications sharing both their origin and their
43 // tag will replace the first displayed notification.
44 std::string tag;
46 // URL of the icon which is to be displayed with the notification.
47 GURL icon;
49 // Whether default notification indicators (sound, vibration, light) should
50 // be suppressed.
51 bool silent;
54 } // namespace content
56 #endif // CONTENT_PUBLIC_COMMON_PLATFORM_NOTIFICATION_DATA_H_