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

Unified Diff: content/public/common/platform_notification_data.h

Issue 794633002: Remove ShowDesktopNotificationHostMsgParams in favor of PlatformNotificationData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 6 years 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: content/public/common/platform_notification_data.h
diff --git a/content/public/common/platform_notification_data.h b/content/public/common/platform_notification_data.h
new file mode 100644
index 0000000000000000000000000000000000000000..e86ed3637406bf263b8c825d63691e1142c5f72f
--- /dev/null
+++ b/content/public/common/platform_notification_data.h
@@ -0,0 +1,50 @@
+// Copyright 2014 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 CONTENT_PUBLIC_COMMON_PLATFORM_NOTIFICATION_DATA_H_
+#define CONTENT_PUBLIC_COMMON_PLATFORM_NOTIFICATION_DATA_H_
+
+#include <string>
+
+#include "base/strings/string16.h"
+#include "content/common/content_export.h"
+#include "url/gurl.h"
+
+namespace content {
+
+// Structure representing the information associated with a Web Notification.
+// This struct should include the developer-visible information, kept
+// synchronized with the WebNotificationData structure defined in the Blink API.
+struct CONTENT_EXPORT PlatformNotificationData {
+ PlatformNotificationData();
+ ~PlatformNotificationData();
+
+ enum NotificationDirection {
+ NotificationDirectionLeftToRight,
+ NotificationDirectionRightToLeft
+ };
Tom Sepez 2014/12/11 22:12:23 nit: prefer the pattern where enum NotificationDi
Peter Beverloo 2014/12/12 12:05:56 Done.
+
+ // Title to be displayed with the Web Notification.
+ base::string16 title;
+
+ // Hint to determine the directionality of the displayed notification.
+ NotificationDirection direction;
+
+ // BCP 47 language tag describing the notification's contents. Optional.
+ std::string lang;
+
+ // Contents of the notification.
+ base::string16 body;
+
+ // Tag of the notification. Notifications sharing both their origin and their
+ // tag will replace the first displayed notification.
+ base::string16 tag;
+
+ // URL of the icon which is to be displayed with the notification.
+ GURL icon;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_COMMON_PLATFORM_NOTIFICATION_DATA_H_
« no previous file with comments | « content/public/browser/platform_notification_service.h ('k') | content/public/common/platform_notification_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698