Index: Source/bindings/modules/v8/custom/V8NotificationCustom.cpp |
diff --git a/Source/bindings/modules/v8/custom/V8NotificationCustom.cpp b/Source/bindings/modules/v8/custom/V8NotificationCustom.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4597f8c5b4ec546f342fafa44e0664b593fe4eb1 |
--- /dev/null |
+++ b/Source/bindings/modules/v8/custom/V8NotificationCustom.cpp |
@@ -0,0 +1,25 @@ |
+// 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. |
+ |
+#include "config.h" |
+#include "bindings/modules/v8/V8Notification.h" |
+ |
+#include "bindings/core/v8/SerializedScriptValue.h" |
Peter Beverloo
2015/03/12 01:16:26
nit: you can drop this include
Sanghyun Park
2015/03/12 02:58:47
I'll remove this.
|
+#include "modules/notifications/Notification.h" |
+ |
+namespace blink { |
+ |
+void V8Notification::dataAttributeGetterCustom(const v8::PropertyCallbackInfo<v8::Value>& info) |
+{ |
+ v8::Local<v8::Object> holder = info.Holder(); |
+ Notification* impl = V8Notification::toImpl(holder); |
+ if (!impl->data()) { |
+ v8SetReturnValueNull(info); |
+ return; |
+ } |
+ |
+ v8SetReturnValue(info, impl->data()->deserialize(info.GetIsolate())); |
+} |
+ |
+} // namespace blink |