#include "bindings/core/v8/ScriptWrappable.h"
#include "core/dom/Document.h"
#include "core/events/Event.h"
+#include "core/frame/UseCounter.h"
#include "core/page/WindowFocusAllowedIndicator.h"
#include "modules/notifications/NotificationClient.h"
#include "modules/notifications/NotificationController.h"
Notification* Notification::create(ExecutionContext* context, const String& title, const NotificationOptions& options)
{
NotificationClient& client = NotificationController::clientFrom(context);
- Notification* notification = adoptRefCountedGarbageCollectedWillBeNoop(new Notification(title, context, &client));
+ Notification* notification = new Notification(title, context, &client);
notification->setBody(options.body());
notification->setTag(options.tag());
notification->setIconUrl(iconUrl);
}
+ String insecureOriginMessage;
+ UseCounter::Feature feature = context->securityOrigin()->canAccessFeatureRequiringSecureOrigin(insecureOriginMessage)
+ ? UseCounter::NotificationSecureOrigin : UseCounter::NotificationInsecureOrigin;
+ UseCounter::count(context, feature);
+
notification->suspendIfNeeded();
return notification;
}