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

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

Issue 1234553003: Supports the sound attribute to the Notification object Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: [WIP] Created 5 years, 5 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: Source/modules/notifications/Notification.h
diff --git a/Source/modules/notifications/Notification.h b/Source/modules/notifications/Notification.h
index c89970ab9cbe8a140bf47be35f61dee6ea9c60ec..63e4fc3861ae8551f1dd89213b312a435565e649 100644
--- a/Source/modules/notifications/Notification.h
+++ b/Source/modules/notifications/Notification.h
@@ -90,12 +90,14 @@ public:
String body() const { return m_body; }
String tag() const { return m_tag; }
String icon() const { return m_iconUrl; }
+ String sound() const { return m_soundUrl; }
NavigatorVibration::VibrationPattern vibrate(bool& isNull) const;
bool silent() const { return m_silent; }
ScriptValue data(ScriptState*) const;
TextDirection direction() const;
KURL iconURL() const { return m_iconUrl; }
+ KURL soundURL() const { return m_soundUrl; }
SerializedScriptValue* serializedData() const { return m_serializedData.get(); }
static String permissionString(WebNotificationPermission);
@@ -130,6 +132,7 @@ private:
void setLang(const String& lang) { m_lang = lang; }
void setBody(const String& body) { m_body = body; }
void setIconUrl(KURL iconUrl) { m_iconUrl = iconUrl; }
+ void setSoundUrl(KURL soundUrl) { m_soundUrl = soundUrl; }
void setTag(const String& tag) { m_tag = tag; }
void setVibrate(const NavigatorVibration::VibrationPattern& vibrate) { m_vibrate = vibrate; }
void setSilent(bool silent) { m_silent = silent; }
@@ -148,6 +151,7 @@ private:
RefPtr<SerializedScriptValue> m_serializedData;
KURL m_iconUrl;
+ KURL m_soundUrl;
// 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

Powered by Google App Engine
This is Rietveld 408576698