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

Unified Diff: Source/modules/notifications/Notification.h

Issue 1078783002: Update the Notification Blink API to use integral persistent ids. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | Source/modules/notifications/Notification.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/notifications/Notification.h
diff --git a/Source/modules/notifications/Notification.h b/Source/modules/notifications/Notification.h
index 1f780a0a9bfdd265eb3e0c2c89bc3e0ed2ae1cb6..77a79313558bed5c1b68261eac10dfc7c3b5a79a 100644
--- a/Source/modules/notifications/Notification.h
+++ b/Source/modules/notifications/Notification.h
@@ -64,6 +64,8 @@ public:
static Notification* create(ExecutionContext*, const String& title, const NotificationOptions&, ExceptionState&);
// Used for embedder-created Notification objects. Will initialize the Notification's state as showing.
+ static Notification* create(ExecutionContext*, int64_t persistentId, const WebNotificationData&);
+ // TODO(peter): Remove this method when the embedder only passes us int64_t persistent notification ids.
static Notification* create(ExecutionContext*, const String& persistentId, const WebNotificationData&);
virtual ~Notification();
@@ -130,7 +132,8 @@ private:
void setSilent(bool silent) { m_silent = silent; }
void setSerializedData(PassRefPtr<SerializedScriptValue> data) { m_serializedData = data; }
- void setPersistentId(const String& persistentId) { m_persistentId = persistentId; }
+ void setPersistentId(int64_t persistentId) { m_persistentId = persistentId; }
+ void setPersistentIdString(const String& persistentId) { m_persistentIdString = persistentId; }
private:
String m_title;
@@ -146,7 +149,8 @@ private:
// Notifications can either be bound to the page, which means they're identified by
// their delegate, or persistent, which means they're identified by a persistent Id
// given to us by the embedder. This influences how we close the notification.
- String m_persistentId;
+ int64_t m_persistentId;
+ String m_persistentIdString;
enum NotificationState {
NotificationStateIdle,
« no previous file with comments | « no previous file | Source/modules/notifications/Notification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698