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

Unified Diff: third_party/WebKit/Source/modules/notifications/NotificationData.cpp

Issue 1388483002: Implement the Notification `timestamp` property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/modules/notifications/NotificationData.cpp
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationData.cpp b/third_party/WebKit/Source/modules/notifications/NotificationData.cpp
index b67cd1ec28184b7fa1a0ea2d7499af9d810287be..d7bc93f1ab08eb2ee0ef0ba8502bfcd7c0355ad7 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationData.cpp
+++ b/third_party/WebKit/Source/modules/notifications/NotificationData.cpp
@@ -13,6 +13,7 @@
#include "modules/vibration/NavigatorVibration.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/weborigin/KURL.h"
+#include "wtf/CurrentTime.h"
namespace blink {
namespace {
@@ -56,6 +57,7 @@ WebNotificationData createWebNotificationData(ExecutionContext* executionContext
webData.icon = iconUrl;
webData.vibrate = NavigatorVibration::sanitizeVibrationPattern(options.vibrate());
+ webData.timestamp = options.hasTimestamp() ? static_cast<double>(options.timestamp()) : WTF::currentTimeMS();
webData.silent = options.silent();
webData.requireInteraction = options.requireInteraction();

Powered by Google App Engine
This is Rietveld 408576698