OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 16 matching lines...) Expand all Loading... |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WindowProxy_h | 31 #ifndef WindowProxy_h |
32 #define WindowProxy_h | 32 #define WindowProxy_h |
33 | 33 |
34 #include "bindings/core/v8/DOMWrapperWorld.h" | 34 #include "bindings/core/v8/DOMWrapperWorld.h" |
35 #include "bindings/core/v8/ScopedPersistent.h" | 35 #include "bindings/core/v8/ScopedPersistent.h" |
36 #include "bindings/core/v8/ScriptState.h" | 36 #include "bindings/core/v8/ScriptState.h" |
| 37 #include "core/CoreExport.h" |
37 #include "platform/heap/Handle.h" | 38 #include "platform/heap/Handle.h" |
38 #include "platform/weborigin/SecurityOrigin.h" | 39 #include "platform/weborigin/SecurityOrigin.h" |
39 #include "wtf/HashMap.h" | 40 #include "wtf/HashMap.h" |
40 #include "wtf/PassRefPtr.h" | 41 #include "wtf/PassRefPtr.h" |
41 #include "wtf/RefPtr.h" | 42 #include "wtf/RefPtr.h" |
42 #include "wtf/text/AtomicString.h" | 43 #include "wtf/text/AtomicString.h" |
43 #include <v8.h> | 44 #include <v8.h> |
44 | 45 |
45 namespace blink { | 46 namespace blink { |
46 | 47 |
(...skipping 21 matching lines...) Expand all Loading... |
68 void namedItemAdded(HTMLDocument*, const AtomicString&); | 69 void namedItemAdded(HTMLDocument*, const AtomicString&); |
69 void namedItemRemoved(HTMLDocument*, const AtomicString&); | 70 void namedItemRemoved(HTMLDocument*, const AtomicString&); |
70 | 71 |
71 // Update the security origin of a document | 72 // Update the security origin of a document |
72 // (e.g., after setting docoument.domain). | 73 // (e.g., after setting docoument.domain). |
73 void updateSecurityOrigin(SecurityOrigin*); | 74 void updateSecurityOrigin(SecurityOrigin*); |
74 | 75 |
75 bool isContextInitialized() { | 76 bool isContextInitialized() { |
76 return m_scriptState && !!m_scriptState->perContextData(); | 77 return m_scriptState && !!m_scriptState->perContextData(); |
77 } | 78 } |
78 bool isGlobalInitialized() { return !m_global.isEmpty(); } | |
79 | 79 |
80 bool initializeIfNeeded(); | 80 CORE_EXPORT bool initializeIfNeeded(); |
81 void updateDocumentWrapper(v8::Local<v8::Object> wrapper); | 81 void updateDocumentWrapper(v8::Local<v8::Object> wrapper); |
82 | 82 |
83 void clearForNavigation(); | 83 void clearForNavigation(); |
84 void clearForClose(); | 84 void clearForClose(); |
85 | 85 |
86 v8::Local<v8::Object> globalIfNotDetached(); | 86 v8::Local<v8::Object> globalIfNotDetached(); |
87 v8::Local<v8::Object> releaseGlobal(); | 87 v8::Local<v8::Object> releaseGlobal(); |
88 void setGlobal(v8::Local<v8::Object>); | 88 void setGlobal(v8::Local<v8::Object>); |
89 | 89 |
90 DOMWrapperWorld& world() { return *m_world; } | 90 DOMWrapperWorld& world() { return *m_world; } |
(...skipping 29 matching lines...) Expand all Loading... |
120 v8::Isolate* m_isolate; | 120 v8::Isolate* m_isolate; |
121 RefPtr<ScriptState> m_scriptState; | 121 RefPtr<ScriptState> m_scriptState; |
122 RefPtr<DOMWrapperWorld> m_world; | 122 RefPtr<DOMWrapperWorld> m_world; |
123 ScopedPersistent<v8::Object> m_global; | 123 ScopedPersistent<v8::Object> m_global; |
124 ScopedPersistent<v8::Object> m_document; | 124 ScopedPersistent<v8::Object> m_document; |
125 }; | 125 }; |
126 | 126 |
127 } // namespace blink | 127 } // namespace blink |
128 | 128 |
129 #endif // WindowProxy_h | 129 #endif // WindowProxy_h |
OLD | NEW |