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

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

Issue 1260793007: Generalize validation of developer input for Web Notifications (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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/NotificationData.h
diff --git a/Source/modules/notifications/NotificationData.h b/Source/modules/notifications/NotificationData.h
new file mode 100644
index 0000000000000000000000000000000000000000..9821418b82d54b9f99fcf7fe62039e6ad26efe77
--- /dev/null
+++ b/Source/modules/notifications/NotificationData.h
@@ -0,0 +1,24 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NotificationData_h
+#define NotificationData_h
+
+#include "modules/ModulesExport.h"
+#include "public/platform/modules/notifications/WebNotificationData.h"
+#include "wtf/text/WTFString.h"
+
+namespace blink {
+
+class ExceptionState;
+class ExecutionContext;
+class NotificationOptions;
+
+// Creates a WebNotificationData object based on the developer-provided notification data. When the
+// data is deemed invalid, an exception will be thrown to the passed exception state.
+MODULES_EXPORT WebNotificationData createWebNotificationData(ExecutionContext*, const String& title, const NotificationOptions&, ExceptionState&);
+
+} // namespace blink
+
+#endif // NotificationData_h

Powered by Google App Engine
This is Rietveld 408576698