Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2012 Ericsson AB. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 988 v8::Local<v8::Value> value, | 988 v8::Local<v8::Value> value, |
| 989 ExceptionState& exceptionState) { | 989 ExceptionState& exceptionState) { |
| 990 return toImplArray<Vector<T>>(value, 0, isolate, exceptionState); | 990 return toImplArray<Vector<T>>(value, 0, isolate, exceptionState); |
| 991 } | 991 } |
| 992 }; | 992 }; |
| 993 | 993 |
| 994 CORE_EXPORT v8::Isolate* toIsolate(ExecutionContext*); | 994 CORE_EXPORT v8::Isolate* toIsolate(ExecutionContext*); |
| 995 CORE_EXPORT v8::Isolate* toIsolate(LocalFrame*); | 995 CORE_EXPORT v8::Isolate* toIsolate(LocalFrame*); |
| 996 | 996 |
| 997 CORE_EXPORT DOMWindow* toDOMWindow(v8::Isolate*, v8::Local<v8::Value>); | 997 CORE_EXPORT DOMWindow* toDOMWindow(v8::Isolate*, v8::Local<v8::Value>); |
| 998 DOMWindow* toDOMWindow(v8::Local<v8::Context>); | 998 LocalDOMWindow* toDOMWindow(v8::Local<v8::Context>); |
|
Yuki
2017/03/01 08:08:02
Maybe, we should rename this to toLocalDOMWindow?
| |
| 999 LocalDOMWindow* enteredDOMWindow(v8::Isolate*); | 999 LocalDOMWindow* enteredDOMWindow(v8::Isolate*); |
| 1000 CORE_EXPORT LocalDOMWindow* currentDOMWindow(v8::Isolate*); | 1000 CORE_EXPORT LocalDOMWindow* currentDOMWindow(v8::Isolate*); |
| 1001 CORE_EXPORT ExecutionContext* toExecutionContext(v8::Local<v8::Context>); | 1001 CORE_EXPORT ExecutionContext* toExecutionContext(v8::Local<v8::Context>); |
| 1002 CORE_EXPORT void registerToExecutionContextForModules( | 1002 CORE_EXPORT void registerToExecutionContextForModules( |
| 1003 ExecutionContext* (*toExecutionContextForModules)(v8::Local<v8::Context>)); | 1003 ExecutionContext* (*toExecutionContextForModules)(v8::Local<v8::Context>)); |
| 1004 CORE_EXPORT ExecutionContext* currentExecutionContext(v8::Isolate*); | 1004 CORE_EXPORT ExecutionContext* currentExecutionContext(v8::Isolate*); |
| 1005 | 1005 |
| 1006 // Returns a V8 context associated with a ExecutionContext and a | 1006 // Returns a V8 context associated with a ExecutionContext and a |
| 1007 // DOMWrapperWorld. This method returns an empty context if there is no frame | 1007 // DOMWrapperWorld. This method returns an empty context if there is no frame |
| 1008 // or the frame is already detached. | 1008 // or the frame is already detached. |
| 1009 CORE_EXPORT v8::Local<v8::Context> toV8Context(ExecutionContext*, | 1009 CORE_EXPORT v8::Local<v8::Context> toV8Context(ExecutionContext*, |
| 1010 DOMWrapperWorld&); | 1010 DOMWrapperWorld&); |
| 1011 // Returns a V8 context associated with a Frame and a DOMWrapperWorld. | 1011 // Returns a V8 context associated with a Frame and a DOMWrapperWorld. |
| 1012 // This method returns an empty context if the frame is already detached. | 1012 // This method returns an empty context if the frame is already detached. |
| 1013 CORE_EXPORT v8::Local<v8::Context> toV8Context(LocalFrame*, DOMWrapperWorld&); | 1013 CORE_EXPORT v8::Local<v8::Context> toV8Context(LocalFrame*, DOMWrapperWorld&); |
| 1014 // Like toV8Context but also returns the context if the frame is already | 1014 // Like toV8Context but also returns the context if the frame is already |
| 1015 // detached. | 1015 // detached. |
| 1016 CORE_EXPORT v8::Local<v8::Context> toV8ContextEvenIfDetached(LocalFrame*, | 1016 CORE_EXPORT v8::Local<v8::Context> toV8ContextEvenIfDetached(LocalFrame*, |
| 1017 DOMWrapperWorld&); | 1017 DOMWrapperWorld&); |
| 1018 | 1018 |
| 1019 // Returns the frame object of the window object associated with | 1019 // Returns the frame object of the window object associated with |
| 1020 // a context, if the window is currently being displayed in a Frame. | 1020 // a context, if the window is currently being displayed in a Frame. |
| 1021 CORE_EXPORT Frame* toFrameIfNotDetached(v8::Local<v8::Context>); | 1021 CORE_EXPORT LocalFrame* toFrameIfNotDetached(v8::Local<v8::Context>); |
| 1022 | 1022 |
| 1023 // If 'storage' is non-null, it must be large enough to copy all bytes in the | 1023 // If 'storage' is non-null, it must be large enough to copy all bytes in the |
| 1024 // array buffer view into it. Use allocateFlexibleArrayBufferStorage(v8Value) | 1024 // array buffer view into it. Use allocateFlexibleArrayBufferStorage(v8Value) |
| 1025 // to allocate it using alloca() in the callers stack frame. | 1025 // to allocate it using alloca() in the callers stack frame. |
| 1026 CORE_EXPORT void toFlexibleArrayBufferView(v8::Isolate*, | 1026 CORE_EXPORT void toFlexibleArrayBufferView(v8::Isolate*, |
| 1027 v8::Local<v8::Value>, | 1027 v8::Local<v8::Value>, |
| 1028 FlexibleArrayBufferView&, | 1028 FlexibleArrayBufferView&, |
| 1029 void* storage = nullptr); | 1029 void* storage = nullptr); |
| 1030 | 1030 |
| 1031 // Converts a V8 value to an array (an IDL sequence) as per the WebIDL | 1031 // Converts a V8 value to an array (an IDL sequence) as per the WebIDL |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1160 // If the argument isn't an object, this will crash. | 1160 // If the argument isn't an object, this will crash. |
| 1161 CORE_EXPORT v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value>, | 1161 CORE_EXPORT v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value>, |
| 1162 v8::Isolate*); | 1162 v8::Isolate*); |
| 1163 | 1163 |
| 1164 CORE_EXPORT v8::Local<v8::Value> fromJSONString(v8::Isolate*, | 1164 CORE_EXPORT v8::Local<v8::Value> fromJSONString(v8::Isolate*, |
| 1165 const String& stringifiedJSON, | 1165 const String& stringifiedJSON, |
| 1166 ExceptionState&); | 1166 ExceptionState&); |
| 1167 } // namespace blink | 1167 } // namespace blink |
| 1168 | 1168 |
| 1169 #endif // V8Binding_h | 1169 #endif // V8Binding_h |
| OLD | NEW |