| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef SKY_ENGINE_BINDINGS_CORE_V8_V8HIDDENVALUE_H_ | |
| 6 #define SKY_ENGINE_BINDINGS_CORE_V8_V8HIDDENVALUE_H_ | |
| 7 | |
| 8 #include "sky/engine/bindings/core/v8/ScopedPersistent.h" | |
| 9 #include "sky/engine/bindings/core/v8/ScriptPromiseProperties.h" | |
| 10 #include "v8/include/v8.h" | |
| 11 | |
| 12 namespace blink { | |
| 13 | |
| 14 class ScriptWrappable; | |
| 15 | |
| 16 #define V8_HIDDEN_VALUES(V) \ | |
| 17 V(arrayBufferData) \ | |
| 18 V(customElementAttachedCallback) \ | |
| 19 V(customElementAttributeChangedCallback) \ | |
| 20 V(customElementCreatedCallback) \ | |
| 21 V(customElementDetachedCallback) \ | |
| 22 V(customElementDocument) \ | |
| 23 V(customElementIsInterfacePrototypeObject) \ | |
| 24 V(customElementNamespaceURI) \ | |
| 25 V(customElementTagName) \ | |
| 26 V(callback) \ | |
| 27 V(condition) \ | |
| 28 V(data) \ | |
| 29 V(detail) \ | |
| 30 V(document) \ | |
| 31 V(error) \ | |
| 32 V(idbCursorRequest) \ | |
| 33 V(port1) \ | |
| 34 V(port2) \ | |
| 35 V(state) \ | |
| 36 V(stringData) \ | |
| 37 V(scriptState) \ | |
| 38 V(thenableHiddenPromise) \ | |
| 39 V(toStringString) \ | |
| 40 SCRIPT_PROMISE_PROPERTIES(V, Promise) \ | |
| 41 SCRIPT_PROMISE_PROPERTIES(V, Resolver) | |
| 42 | |
| 43 class V8HiddenValue { | |
| 44 public: | |
| 45 #define V8_DECLARE_METHOD(name) static v8::Handle<v8::String> name(v8::Isolate*
isolate); | |
| 46 V8_HIDDEN_VALUES(V8_DECLARE_METHOD); | |
| 47 #undef V8_DECLARE_METHOD | |
| 48 | |
| 49 static v8::Local<v8::Value> getHiddenValue(v8::Isolate*, v8::Handle<v8::Obje
ct>, v8::Handle<v8::String>); | |
| 50 static bool setHiddenValue(v8::Isolate*, v8::Handle<v8::Object>, v8::Handle<
v8::String>, v8::Handle<v8::Value>); | |
| 51 static bool deleteHiddenValue(v8::Isolate*, v8::Handle<v8::Object>, v8::Hand
le<v8::String>); | |
| 52 static v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(v8::Isolate*,
ScriptWrappable*, v8::Handle<v8::String>); | |
| 53 | |
| 54 private: | |
| 55 #define V8_DECLARE_FIELD(name) ScopedPersistent<v8::String> m_##name; | |
| 56 V8_HIDDEN_VALUES(V8_DECLARE_FIELD); | |
| 57 #undef V8_DECLARE_FIELD | |
| 58 }; | |
| 59 | |
| 60 } // namespace blink | |
| 61 | |
| 62 #endif // SKY_ENGINE_BINDINGS_CORE_V8_V8HIDDENVALUE_H_ | |
| OLD | NEW |