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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 static const int kDOMWindowSelectionIndex = kDefaultWrapperInternalField
Count + 8; | 143 static const int kDOMWindowSelectionIndex = kDefaultWrapperInternalField
Count + 8; |
144 static const int kDOMWindowStatusbarIndex = kDefaultWrapperInternalField
Count + 9; | 144 static const int kDOMWindowStatusbarIndex = kDefaultWrapperInternalField
Count + 9; |
145 static const int kDOMWindowToolbarIndex = kDefaultWrapperInternalFieldCo
unt + 10; | 145 static const int kDOMWindowToolbarIndex = kDefaultWrapperInternalFieldCo
unt + 10; |
146 static const int kDOMWindowLocationIndex = kDefaultWrapperInternalFieldC
ount + 11; | 146 static const int kDOMWindowLocationIndex = kDefaultWrapperInternalFieldC
ount + 11; |
147 static const int kDOMWindowDOMSelectionIndex = kDefaultWrapperInternalFi
eldCount + 12; | 147 static const int kDOMWindowDOMSelectionIndex = kDefaultWrapperInternalFi
eldCount + 12; |
148 static const int kDOMWindowInternalFieldCount = kDefaultWrapperInternalF
ieldCount + 13; | 148 static const int kDOMWindowInternalFieldCount = kDefaultWrapperInternalF
ieldCount + 13; |
149 | 149 |
150 static const int kStyleSheetOwnerNodeIndex = kDefaultWrapperInternalFiel
dCount + 0; | 150 static const int kStyleSheetOwnerNodeIndex = kDefaultWrapperInternalFiel
dCount + 0; |
151 static const int kStyleSheetInternalFieldCount = kDefaultWrapperInternal
FieldCount + 1; | 151 static const int kStyleSheetInternalFieldCount = kDefaultWrapperInternal
FieldCount + 1; |
152 | 152 |
| 153 #if ENABLE(WEB_SOCKETS) |
| 154 static const int kWebSocketCacheIndex = kDefaultWrapperInternalFieldCoun
t + 0; |
| 155 static const int kWebSocketInternalFieldCount = kDefaultWrapperInternalF
ieldCount + 1; |
| 156 #endif |
| 157 |
| 158 |
153 #define DECLARE_PROPERTY_ACCESSOR_GETTER(NAME) \ | 159 #define DECLARE_PROPERTY_ACCESSOR_GETTER(NAME) \ |
154 static v8::Handle<v8::Value> v8##NAME##AccessorGetter( \ | 160 static v8::Handle<v8::Value> v8##NAME##AccessorGetter( \ |
155 v8::Local<v8::String> name, const v8::AccessorInfo& info) | 161 v8::Local<v8::String> name, const v8::AccessorInfo& info) |
156 | 162 |
157 #define DECLARE_PROPERTY_ACCESSOR_SETTER(NAME) \ | 163 #define DECLARE_PROPERTY_ACCESSOR_SETTER(NAME) \ |
158 static void v8##NAME##AccessorSetter(v8::Local<v8::String> name, \ | 164 static void v8##NAME##AccessorSetter(v8::Local<v8::String> name, \ |
159 v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 165 v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
160 | 166 |
161 #define DECLARE_PROPERTY_ACCESSOR(NAME) DECLARE_PROPERTY_ACCESSOR_GETTER(NAME);
DECLARE_PROPERTY_ACCESSOR_SETTER(NAME) | 167 #define DECLARE_PROPERTY_ACCESSOR(NAME) DECLARE_PROPERTY_ACCESSOR_GETTER(NAME);
DECLARE_PROPERTY_ACCESSOR_SETTER(NAME) |
162 | 168 |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 DECLARE_CALLBACK(WorkerContextSetInterval); | 502 DECLARE_CALLBACK(WorkerContextSetInterval); |
497 DECLARE_CALLBACK(WorkerContextClearInterval); | 503 DECLARE_CALLBACK(WorkerContextClearInterval); |
498 DECLARE_CALLBACK(WorkerContextAddEventListener); | 504 DECLARE_CALLBACK(WorkerContextAddEventListener); |
499 DECLARE_CALLBACK(WorkerContextRemoveEventListener); | 505 DECLARE_CALLBACK(WorkerContextRemoveEventListener); |
500 #endif | 506 #endif |
501 | 507 |
502 #if ENABLE(SHARED_WORKERS) | 508 #if ENABLE(SHARED_WORKERS) |
503 DECLARE_CALLBACK(SharedWorkerConstructor); | 509 DECLARE_CALLBACK(SharedWorkerConstructor); |
504 #endif | 510 #endif |
505 | 511 |
| 512 #if ENABLE(WEB_SOCKETS) |
| 513 DECLARE_PROPERTY_ACCESSOR(WebSocketOnopen); |
| 514 DECLARE_PROPERTY_ACCESSOR(WebSocketOnmessage); |
| 515 DECLARE_PROPERTY_ACCESSOR(WebSocketOnclose); |
| 516 DECLARE_CALLBACK(WebSocketConstructor); |
| 517 DECLARE_CALLBACK(WebSocketSend); |
| 518 DECLARE_CALLBACK(WebSocketClose); |
| 519 #endif |
| 520 |
506 #undef DECLARE_INDEXED_ACCESS_CHECK | 521 #undef DECLARE_INDEXED_ACCESS_CHECK |
507 #undef DECLARE_NAMED_ACCESS_CHECK | 522 #undef DECLARE_NAMED_ACCESS_CHECK |
508 | 523 |
509 #undef DECLARE_PROPERTY_ACCESSOR_SETTER | 524 #undef DECLARE_PROPERTY_ACCESSOR_SETTER |
510 #undef DECLARE_PROPERTY_ACCESSOR_GETTER | 525 #undef DECLARE_PROPERTY_ACCESSOR_GETTER |
511 #undef DECLARE_PROPERTY_ACCESSOR | 526 #undef DECLARE_PROPERTY_ACCESSOR |
512 | 527 |
513 #undef DECLARE_NAMED_PROPERTY_GETTER | 528 #undef DECLARE_NAMED_PROPERTY_GETTER |
514 #undef DECLARE_NAMED_PROPERTY_SETTER | 529 #undef DECLARE_NAMED_PROPERTY_SETTER |
515 #undef DECLARE_NAMED_PROPERTY_DELETER | 530 #undef DECLARE_NAMED_PROPERTY_DELETER |
(...skipping 18 matching lines...) Expand all Loading... |
534 | 549 |
535 private: | 550 private: |
536 static v8::Handle<v8::Value> WindowSetTimeoutImpl(const v8::Arguments&,
bool singleShot); | 551 static v8::Handle<v8::Value> WindowSetTimeoutImpl(const v8::Arguments&,
bool singleShot); |
537 static void ClearTimeoutImpl(const v8::Arguments&); | 552 static void ClearTimeoutImpl(const v8::Arguments&); |
538 static void WindowSetLocation(DOMWindow*, const String&); | 553 static void WindowSetLocation(DOMWindow*, const String&); |
539 }; | 554 }; |
540 | 555 |
541 } // namespace WebCore | 556 } // namespace WebCore |
542 | 557 |
543 #endif // V8CustomBinding_h | 558 #endif // V8CustomBinding_h |
OLD | NEW |