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 26 matching lines...) Expand all Loading... |
37 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Handle.h" |
38 #include "platform/weborigin/SecurityOrigin.h" | 38 #include "platform/weborigin/SecurityOrigin.h" |
39 #include "wtf/HashMap.h" | 39 #include "wtf/HashMap.h" |
40 #include "wtf/PassRefPtr.h" | 40 #include "wtf/PassRefPtr.h" |
41 #include "wtf/RefPtr.h" | 41 #include "wtf/RefPtr.h" |
42 #include "wtf/text/AtomicString.h" | 42 #include "wtf/text/AtomicString.h" |
43 #include <v8.h> | 43 #include <v8.h> |
44 | 44 |
45 namespace blink { | 45 namespace blink { |
46 | 46 |
47 class Document; | |
48 class Frame; | 47 class Frame; |
49 class HTMLDocument; | 48 class HTMLDocument; |
50 class SecurityOrigin; | 49 class SecurityOrigin; |
51 | 50 |
52 // WindowProxy represents all the per-global object state for a Frame that | 51 // WindowProxy represents all the per-global object state for a Frame that |
53 // persist between navigations. | 52 // persist between navigations. |
54 class WindowProxy final : public GarbageCollectedFinalized<WindowProxy> { | 53 class WindowProxy final : public GarbageCollectedFinalized<WindowProxy> { |
55 public: | 54 public: |
56 static WindowProxy* create(v8::Isolate*, Frame*, DOMWrapperWorld&); | 55 static WindowProxy* create(v8::Isolate*, Frame*, DOMWrapperWorld&); |
57 | 56 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // Creates a new v8::Context with the window wrapper object as the global | 109 // Creates a new v8::Context with the window wrapper object as the global |
111 // object (aka the inner global). Note that the window wrapper and its | 110 // object (aka the inner global). Note that the window wrapper and its |
112 // prototype chain do not get fully initialized yet, e.g. the window | 111 // prototype chain do not get fully initialized yet, e.g. the window |
113 // wrapper is not yet associated with the native DOMWindow object. | 112 // wrapper is not yet associated with the native DOMWindow object. |
114 void createContext(); | 113 void createContext(); |
115 | 114 |
116 // Associates the window wrapper and its prototype chain with the native | 115 // Associates the window wrapper and its prototype chain with the native |
117 // DOMWindow object. Also does some more Window-specific initialization. | 116 // DOMWindow object. Also does some more Window-specific initialization. |
118 bool setupWindowPrototypeChain(); | 117 bool setupWindowPrototypeChain(); |
119 | 118 |
120 void checkDocumentWrapper(v8::Local<v8::Object> wrapper, Document*) const; | |
121 | |
122 Member<Frame> m_frame; | 119 Member<Frame> m_frame; |
123 v8::Isolate* m_isolate; | 120 v8::Isolate* m_isolate; |
124 RefPtr<ScriptState> m_scriptState; | 121 RefPtr<ScriptState> m_scriptState; |
125 RefPtr<DOMWrapperWorld> m_world; | 122 RefPtr<DOMWrapperWorld> m_world; |
126 ScopedPersistent<v8::Object> m_globalProxy; | 123 ScopedPersistent<v8::Object> m_globalProxy; |
127 ScopedPersistent<v8::Object> m_document; | 124 ScopedPersistent<v8::Object> m_document; |
128 }; | 125 }; |
129 | 126 |
130 } // namespace blink | 127 } // namespace blink |
131 | 128 |
132 #endif // WindowProxy_h | 129 #endif // WindowProxy_h |
OLD | NEW |