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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 #else | 50 #else |
51 #define INC_STATS(name) | 51 #define INC_STATS(name) |
52 #endif | 52 #endif |
53 | 53 |
54 namespace WebCore { | 54 namespace WebCore { |
55 | 55 |
56 class CachedScript; | 56 class CachedScript; |
57 class DOMWindow; | 57 class DOMWindow; |
58 class Frame; | 58 class Frame; |
59 class Node; | 59 class Node; |
60 class Page; | |
61 class ScriptExecutionContext; | 60 class ScriptExecutionContext; |
62 class ScriptSourceCode; | 61 class ScriptSourceCode; |
63 class SecurityOrigin; | 62 class SecurityOrigin; |
64 class V8EventListener; | 63 class V8EventListener; |
65 class V8IsolatedContext; | 64 class V8IsolatedContext; |
66 class WorldContextHandle; | 65 class WorldContextHandle; |
67 | 66 |
68 // The following Batch structs and methods are used for setting multiple | 67 // The following Batch structs and methods are used for setting multiple |
69 // properties on an ObjectTemplate, used from the generated bindings | 68 // properties on an ObjectTemplate, used from the generated bindings |
70 // initialization (ConfigureXXXTemplate). This greatly reduces the binary | 69 // initialization (ConfigureXXXTemplate). This greatly reduces the binary |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 // If cannot evalute the script, it returns an error. | 154 // If cannot evalute the script, it returns an error. |
156 v8::Local<v8::Value> evaluate(const ScriptSourceCode&, Node*); | 155 v8::Local<v8::Value> evaluate(const ScriptSourceCode&, Node*); |
157 | 156 |
158 // Run an already compiled script. | 157 // Run an already compiled script. |
159 v8::Local<v8::Value> runScript(v8::Handle<v8::Script>); | 158 v8::Local<v8::Value> runScript(v8::Handle<v8::Script>); |
160 | 159 |
161 // Call the function with the given receiver and arguments. | 160 // Call the function with the given receiver and arguments. |
162 v8::Local<v8::Value> callFunction(v8::Handle<v8::Function>, v8::Handle<v
8::Object>, int argc, v8::Handle<v8::Value> argv[]); | 161 v8::Local<v8::Value> callFunction(v8::Handle<v8::Function>, v8::Handle<v
8::Object>, int argc, v8::Handle<v8::Value> argv[]); |
163 | 162 |
164 // call the function with the given receiver and arguments and report ti
mes to DevTools. | 163 // call the function with the given receiver and arguments and report ti
mes to DevTools. |
165 static v8::Local<v8::Value> instrumentedCallFunction(Page*, v8::Handle<v
8::Function>, v8::Handle<v8::Object> receiver, int argc, v8::Handle<v8::Value> a
rgs[]); | 164 static v8::Local<v8::Value> instrumentedCallFunction(Frame*, v8::Handle<
v8::Function>, v8::Handle<v8::Object> receiver, int argc, v8::Handle<v8::Value>
args[]); |
166 | 165 |
167 // Call the function as constructor with the given arguments. | 166 // Call the function as constructor with the given arguments. |
168 v8::Local<v8::Value> newInstance(v8::Handle<v8::Function>, int argc, v8:
:Handle<v8::Value> argv[]); | 167 v8::Local<v8::Value> newInstance(v8::Handle<v8::Function>, int argc, v8:
:Handle<v8::Value> argv[]); |
169 | 168 |
170 // Returns the window object associated with a context. | 169 // Returns the window object associated with a context. |
171 static DOMWindow* retrieveWindow(v8::Handle<v8::Context>); | 170 static DOMWindow* retrieveWindow(v8::Handle<v8::Context>); |
172 | 171 |
173 static DOMWindow* retriveWindowForCallingCOntext(); | 172 static DOMWindow* retriveWindowForCallingCOntext(); |
174 | 173 |
175 // Returns V8Proxy object of the currently executing context. | 174 // Returns V8Proxy object of the currently executing context. |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 v8::Persistent<v8::Object> handle = v8::Persistent<v8::Object>::New(hold
er); | 355 v8::Persistent<v8::Object> handle = v8::Persistent<v8::Object>::New(hold
er); |
357 if (independent == MarkIndependent) | 356 if (independent == MarkIndependent) |
358 handle.MarkIndependent(); | 357 handle.MarkIndependent(); |
359 V8DOMWrapper::setJSWrapperForDOMObject(object.get(), handle); | 358 V8DOMWrapper::setJSWrapperForDOMObject(object.get(), handle); |
360 return holder; | 359 return holder; |
361 } | 360 } |
362 | 361 |
363 } | 362 } |
364 | 363 |
365 #endif // V8Proxy_h | 364 #endif // V8Proxy_h |
OLD | NEW |