Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: webkit/port/bindings/v8/v8_proxy.h

Issue 113823: Added support for constructor calls in the NPAPI (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/port/bindings/v8/V8NPObject.cpp ('k') | webkit/port/bindings/v8/v8_proxy.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_PROXY_H__ 5 #ifndef V8_PROXY_H__
6 #define V8_PROXY_H__ 6 #define V8_PROXY_H__
7 7
8 #include <v8.h> 8 #include <v8.h>
9 #include "v8_index.h" 9 #include "v8_index.h"
10 #include "v8_custom.h" 10 #include "v8_custom.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 // Run an already compiled script. 251 // Run an already compiled script.
252 v8::Local<v8::Value> RunScript(v8::Handle<v8::Script> script, 252 v8::Local<v8::Value> RunScript(v8::Handle<v8::Script> script,
253 bool inline_code); 253 bool inline_code);
254 254
255 // Call the function with the given receiver and arguments. 255 // Call the function with the given receiver and arguments.
256 v8::Local<v8::Value> CallFunction(v8::Handle<v8::Function> function, 256 v8::Local<v8::Value> CallFunction(v8::Handle<v8::Function> function,
257 v8::Handle<v8::Object> receiver, 257 v8::Handle<v8::Object> receiver,
258 int argc, 258 int argc,
259 v8::Handle<v8::Value> argv[]); 259 v8::Handle<v8::Value> argv[]);
260 260
261 // Call the function as constructor with the given arguments.
262 v8::Local<v8::Value> NewInstance(v8::Handle<v8::Function> constructor,
263 int argc,
264 v8::Handle<v8::Value> argv[]);
265
261 // Returns the dom constructor function for the given node type. 266 // Returns the dom constructor function for the given node type.
262 v8::Local<v8::Function> GetConstructor(V8ClassIndex::V8WrapperType type); 267 v8::Local<v8::Function> GetConstructor(V8ClassIndex::V8WrapperType type);
263 268
264 // To create JS Wrapper objects, we create a cache of a 'boiler plate' 269 // To create JS Wrapper objects, we create a cache of a 'boiler plate'
265 // object, and then simply Clone that object each time we need a new one. 270 // object, and then simply Clone that object each time we need a new one.
266 // This is faster than going through the full object creation process. 271 // This is faster than going through the full object creation process.
267 v8::Local<v8::Object> CreateWrapperFromCache(V8ClassIndex::V8WrapperType type) ; 272 v8::Local<v8::Object> CreateWrapperFromCache(V8ClassIndex::V8WrapperType type) ;
268 273
269 // Returns the window object of the currently executing context. 274 // Returns the window object of the currently executing context.
270 static DOMWindow* retrieveWindow(); 275 static DOMWindow* retrieveWindow();
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 V8Proxy::SetDOMWrapper(args.Holder(), tag, obj.get()); 636 V8Proxy::SetDOMWrapper(args.Holder(), tag, obj.get());
632 obj->ref(); 637 obj->ref();
633 V8Proxy::SetJSWrapperForDOMObject( 638 V8Proxy::SetJSWrapperForDOMObject(
634 obj.get(), v8::Persistent<v8::Object>::New(args.Holder())); 639 obj.get(), v8::Persistent<v8::Object>::New(args.Holder()));
635 return args.Holder(); 640 return args.Holder();
636 } 641 }
637 642
638 } // namespace WebCore 643 } // namespace WebCore
639 644
640 #endif // V8_PROXY_H__ 645 #endif // V8_PROXY_H__
OLDNEW
« no previous file with comments | « webkit/port/bindings/v8/V8NPObject.cpp ('k') | webkit/port/bindings/v8/v8_proxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698