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

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

Issue 18180: Fix for bug 6100:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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
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_CUSTOM_H__ 5 #ifndef V8_CUSTOM_H__
6 #define V8_CUSTOM_H__ 6 #define V8_CUSTOM_H__
7 7
8 #include <v8.h> 8 #include <v8.h>
9 #include "v8_index.h" 9 #include "v8_index.h"
10 10
11 struct NPObject; 11 struct NPObject;
12 12
13 #define CALLBACK_FUNC_DECL(NAME) \ 13 #define CALLBACK_FUNC_DECL(NAME) \
14 v8::Handle<v8::Value> V8Custom::v8##NAME##Callback(const v8::Arguments& args) 14 v8::Handle<v8::Value> V8Custom::v8##NAME##Callback(const v8::Arguments& args)
15 15
16 #define ACCESSOR_GETTER(NAME) \ 16 #define ACCESSOR_GETTER(NAME) \
17 v8::Handle<v8::Value> V8Custom::v8##NAME##AccessorGetter(\ 17 v8::Handle<v8::Value> V8Custom::v8##NAME##AccessorGetter(\
18 v8::Local<v8::String> name, const v8::AccessorInfo& info) 18 v8::Local<v8::String> name, const v8::AccessorInfo& info)
19 19
20 #define ACCESSOR_SETTER(NAME) \ 20 #define ACCESSOR_SETTER(NAME) \
21 void V8Custom::v8##NAME##AccessorSetter(v8::Local<v8::String> name, \ 21 void V8Custom::v8##NAME##AccessorSetter(v8::Local<v8::String> name, \
22 v8::Local<v8::Value> value, \ 22 v8::Local<v8::Value> value, \
23 const v8::AccessorInfo& info) 23 const v8::AccessorInfo& info)
24 24
25 #define INDEXED_PROPERTY_GETTER(NAME) \
26 v8::Handle<v8::Value> V8Custom::v8##NAME##IndexedPropertyGetter(\
27 uint32_t index, const v8::AccessorInfo& info)
28
29 #define INDEXED_PROPERTY_SETTER(NAME) \
30 v8::Handle<v8::Value> V8Custom::v8##NAME##IndexedPropertySetter(\
31 uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
32
33 #define INDEXED_PROPERTY_DELETER(NAME) \
34 v8::Handle<v8::Boolean> V8Custom::v8##NAME##IndexedPropertyDeleter(\
35 uint32_t index, const v8::AccessorInfo& info)
36
25 namespace WebCore { 37 namespace WebCore {
26 38
27 class Frame; 39 class Frame;
28 class V8Proxy; 40 class V8Proxy;
29 class String; 41 class String;
30 class HTMLCollection; 42 class HTMLCollection;
31 43
32 class V8Custom { 44 class V8Custom {
33 public: 45 public:
34 46
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 DECLARE_CALLBACK(HTMLPlugInElement) 377 DECLARE_CALLBACK(HTMLPlugInElement)
366 378
367 DECLARE_NAMED_PROPERTY_GETTER(StyleSheetList) 379 DECLARE_NAMED_PROPERTY_GETTER(StyleSheetList)
368 DECLARE_INDEXED_PROPERTY_GETTER(NamedNodeMap) 380 DECLARE_INDEXED_PROPERTY_GETTER(NamedNodeMap)
369 DECLARE_INDEXED_PROPERTY_GETTER(HTMLFormElement) 381 DECLARE_INDEXED_PROPERTY_GETTER(HTMLFormElement)
370 DECLARE_INDEXED_PROPERTY_GETTER(HTMLOptionsCollection) 382 DECLARE_INDEXED_PROPERTY_GETTER(HTMLOptionsCollection)
371 DECLARE_INDEXED_PROPERTY_SETTER(HTMLOptionsCollection) 383 DECLARE_INDEXED_PROPERTY_SETTER(HTMLOptionsCollection)
372 DECLARE_INDEXED_PROPERTY_SETTER(HTMLSelectElementCollection) 384 DECLARE_INDEXED_PROPERTY_SETTER(HTMLSelectElementCollection)
373 DECLARE_NAMED_PROPERTY_GETTER(HTMLCollection) 385 DECLARE_NAMED_PROPERTY_GETTER(HTMLCollection)
374 386
387 // Canvas and supporting classes
388 DECLARE_INDEXED_PROPERTY_GETTER(CanvasPixelArray)
389 DECLARE_INDEXED_PROPERTY_SETTER(CanvasPixelArray)
390
375 // MessagePort 391 // MessagePort
376 DECLARE_PROPERTY_ACCESSOR(MessagePortOnmessage) 392 DECLARE_PROPERTY_ACCESSOR(MessagePortOnmessage)
377 DECLARE_PROPERTY_ACCESSOR(MessagePortOnclose) 393 DECLARE_PROPERTY_ACCESSOR(MessagePortOnclose)
378 DECLARE_CALLBACK(MessagePortStartConversation) 394 DECLARE_CALLBACK(MessagePortStartConversation)
379 DECLARE_CALLBACK(MessagePortAddEventListener) 395 DECLARE_CALLBACK(MessagePortAddEventListener)
380 DECLARE_CALLBACK(MessagePortRemoveEventListener) 396 DECLARE_CALLBACK(MessagePortRemoveEventListener)
381 397
382 // SVG custom properties and callbacks 398 // SVG custom properties and callbacks
383 #if ENABLE(SVG) 399 #if ENABLE(SVG)
384 DECLARE_PROPERTY_ACCESSOR_GETTER(SVGLengthValue) 400 DECLARE_PROPERTY_ACCESSOR_GETTER(SVGLengthValue)
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 437
422 private: 438 private:
423 static v8::Handle<v8::Value> WindowSetTimeoutImpl(const v8::Arguments& args, 439 static v8::Handle<v8::Value> WindowSetTimeoutImpl(const v8::Arguments& args,
424 bool single_shot); 440 bool single_shot);
425 }; 441 };
426 442
427 } // namespace WebCore 443 } // namespace WebCore
428 444
429 #endif // V8_CUSTOM_H__ 445 #endif // V8_CUSTOM_H__
430 446
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698