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

Unified Diff: third_party/WebKit/Source/platform/PlatformNotification.h

Issue 1808513006: Introduce PlatformNotification structures and converters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-mojo-hacks
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/PlatformNotification.h
diff --git a/third_party/WebKit/Source/platform/PlatformNotification.h b/third_party/WebKit/Source/platform/PlatformNotification.h
new file mode 100644
index 0000000000000000000000000000000000000000..55058597abec75a80eb303b784d29e94235f8631
--- /dev/null
+++ b/third_party/WebKit/Source/platform/PlatformNotification.h
@@ -0,0 +1,55 @@
+// Copyright 2016 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 PlatformNotification_h
+#define PlatformNotification_h
+
+#include "platform/PlatformExport.h"
+#include "platform/weborigin/KURL.h"
+#include "public/platform/modules/notifications/notification.mojom.h"
+#include "wtf/Vector.h"
+#include "wtf/text/WTFString.h"
+
+namespace blink {
+
+// These objects are to be removed when Mojo and //base can be used in modules.
+
+// Blink representation of blink.mojom.NotificationAction. Will be converted to
+// and from using the PlatformNotificationConverters.
+struct PLATFORM_EXPORT PlatformNotificationAction {
+ String action;
+ String title;
+ KURL icon;
+};
+
+// Blink representation of blink.mojom.Notification. Will be converted to and
+// from using the PlatformNotificationConverters.
+struct PLATFORM_EXPORT PlatformNotification {
+ enum class Direction {
+ LEFT_TO_RIGHT,
+ RIGHT_TO_LEFT,
+ AUTO
+ };
+
+ PlatformNotification();
+ ~PlatformNotification();
+
+ String title;
+ Direction direction;
+ String lang;
+ String body;
+ String tag;
+ KURL icon;
+ Vector<int> vibrationPattern;
+ double timestamp;
+ bool renotify;
+ bool silent;
+ bool requireInteraction;
+ Vector<unsigned char> data;
+ Vector<PlatformNotificationAction> actions;
+};
+
+} // namespace blink
+
+#endif // PlatformNotification_h
« no previous file with comments | « third_party/WebKit/Source/platform/DEPS ('k') | third_party/WebKit/Source/platform/PlatformNotification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698