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

Side by Side Diff: WebCore/bindings/v8/custom/V8CustomBinding.h

Issue 155079: WebSocket implementation in WebKit (Closed)
Patch Set: Rewrite to use SocketStreamHandle Created 11 years, 4 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
« no previous file with comments | « WebCore/bindings/v8/V8Index.h ('k') | WebCore/bindings/v8/custom/V8WebSocketCustom.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 /* 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
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
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
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
OLDNEW
« no previous file with comments | « WebCore/bindings/v8/V8Index.h ('k') | WebCore/bindings/v8/custom/V8WebSocketCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698