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

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

Issue 2392543004: Reflow comments in the Push and Notification modules. (Closed)
Patch Set: Reflow comments in the Push and Notification modules. Created 4 years, 2 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/Notification.cpp
diff --git a/third_party/WebKit/Source/modules/notifications/Notification.cpp b/third_party/WebKit/Source/modules/notifications/Notification.cpp
index 75705784223a12196359d4c6b1b8bc99aaf7cf25..14402c0a0da1cb70ecdc9bf12b3fedca08613abb 100644
--- a/third_party/WebKit/Source/modules/notifications/Notification.cpp
+++ b/third_party/WebKit/Source/modules/notifications/Notification.cpp
@@ -68,8 +68,8 @@ Notification* Notification::create(ExecutionContext* context,
const String& title,
const NotificationOptions& options,
ExceptionState& exceptionState) {
- // The Web Notification constructor may be disabled through a runtime feature. The
- // behavior of the constructor is changing, but not completely agreed upon yet.
+ // The Notification constructor may be disabled through a runtime feature when
+ // the platform does not support non-persistent notifications.
if (!RuntimeEnabledFeatures::notificationConstructorEnabled()) {
exceptionState.throwTypeError(
"Illegal constructor. Use ServiceWorkerRegistration.showNotification() "
@@ -77,7 +77,7 @@ Notification* Notification::create(ExecutionContext* context,
return nullptr;
}
- // The Web Notification constructor may not be used in Service Worker contexts.
+ // The Notification constructor may not be used in Service Worker contexts.
if (context->isServiceWorkerGlobalScope()) {
exceptionState.throwTypeError("Illegal constructor.");
return nullptr;
@@ -218,8 +218,8 @@ void Notification::dispatchErrorEvent() {
}
void Notification::dispatchCloseEvent() {
- // The notification will be showing when the user initiated the close, or it will be
- // closing if the developer initiated the close.
+ // The notification should be Showing if the user initiated the close, or it
+ // should be Closing if the developer initiated the close.
if (m_state != State::Showing && m_state != State::Closing)
return;
@@ -325,8 +325,8 @@ Vector<v8::Local<v8::Value>> Notification::actions(
action.setIcon(m_data.actions[i].icon.string());
action.setPlaceholder(m_data.actions[i].placeholder);
- // Not just the sequence of actions itself, but also the actions contained within the
- // sequence should be frozen per the Web Notification specification.
+ // Both the Action dictionaries themselves and the sequence they'll be
+ // returned in are expected to the frozen. This cannot be done with WebIDL.
actions[i] =
freezeV8Object(toV8(action, scriptState), scriptState->isolate());
}

Powered by Google App Engine
This is Rietveld 408576698