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

Side by Side Diff: content/public/common/platform_notification_data.h

Issue 1267673003: Plumb Blink notification actions to button UI on desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 CONTENT_PUBLIC_COMMON_PLATFORM_NOTIFICATION_DATA_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_PLATFORM_NOTIFICATION_DATA_H_
6 #define CONTENT_PUBLIC_COMMON_PLATFORM_NOTIFICATION_DATA_H_ 6 #define CONTENT_PUBLIC_COMMON_PLATFORM_NOTIFICATION_DATA_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/public/common/platform_notification_action.h"
13 #include "url/gurl.h" 14 #include "url/gurl.h"
14 15
15 namespace content { 16 namespace content {
16 17
17 // Structure representing the information associated with a Web Notification. 18 // Structure representing the information associated with a Web Notification.
18 // This struct should include the developer-visible information, kept 19 // This struct should include the developer-visible information, kept
19 // synchronized with the WebNotificationData structure defined in the Blink API. 20 // synchronized with the WebNotificationData structure defined in the Blink API.
20 struct CONTENT_EXPORT PlatformNotificationData { 21 struct CONTENT_EXPORT PlatformNotificationData {
21 PlatformNotificationData(); 22 PlatformNotificationData();
22 ~PlatformNotificationData(); 23 ~PlatformNotificationData();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Vibration API. https://www.w3.org/TR/vibration/ 56 // Vibration API. https://www.w3.org/TR/vibration/
56 std::vector<int> vibration_pattern; 57 std::vector<int> vibration_pattern;
57 58
58 // Whether default notification indicators (sound, vibration, light) should 59 // Whether default notification indicators (sound, vibration, light) should
59 // be suppressed. 60 // be suppressed.
60 bool silent = false; 61 bool silent = false;
61 62
62 // Developer-provided data associated with the notification, in the form of 63 // Developer-provided data associated with the notification, in the form of
63 // a serialized string. Must not exceed |kMaximumDeveloperDataSize| bytes. 64 // a serialized string. Must not exceed |kMaximumDeveloperDataSize| bytes.
64 std::vector<char> data; 65 std::vector<char> data;
66
67 // Actions that should be shown as buttons on the notification.
68 std::vector<PlatformNotificationAction> actions;
65 }; 69 };
66 70
67 } // namespace content 71 } // namespace content
68 72
69 #endif // CONTENT_PUBLIC_COMMON_PLATFORM_NOTIFICATION_DATA_H_ 73 #endif // CONTENT_PUBLIC_COMMON_PLATFORM_NOTIFICATION_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698