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

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

Issue 17246: Add V8 bindings for Worker (Part I). (Closed) Base URL: http://src.chromium.org/svn/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
« no previous file with comments | « webkit/port/bindings/v8/v8_index.cpp ('k') | no next file » | 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) 2008, Google Inc. 1 // Copyright (c) 2008, Google Inc.
2 // All rights reserved. 2 // 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 #include "SVGRenderingIntent.h" 185 #include "SVGRenderingIntent.h"
186 #include "SVGStringList.h" 186 #include "SVGStringList.h"
187 #include "SVGTransform.h" 187 #include "SVGTransform.h"
188 #include "SVGTransformList.h" 188 #include "SVGTransformList.h"
189 #include "SVGUnitTypes.h" 189 #include "SVGUnitTypes.h"
190 #include "SVGURIReference.h" 190 #include "SVGURIReference.h"
191 #include "SVGZoomEvent.h" 191 #include "SVGZoomEvent.h"
192 #include "V8SVGPODTypeWrapper.h" 192 #include "V8SVGPODTypeWrapper.h"
193 #endif // SVG 193 #endif // SVG
194 194
195 #if ENABLE(WORKERS)
196 #include "Worker.h"
197 #include "WorkerLocation.h"
198 #endif // WORKERS
199
195 #if ENABLE(XPATH) 200 #if ENABLE(XPATH)
196 #include "XPathEvaluator.h" 201 #include "XPathEvaluator.h"
197 #endif 202 #endif
198 203
199 namespace WebCore { 204 namespace WebCore {
200 205
201 206
202 // DOM binding algorithm: 207 // DOM binding algorithm:
203 // 208 //
204 // There are two kinds of DOM objects: 209 // There are two kinds of DOM objects:
(...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after
1765 1770
1766 case V8ClassIndex::MESSAGEPORT: { 1771 case V8ClassIndex::MESSAGEPORT: {
1767 // Reserve one more internal field for keeping event listeners. 1772 // Reserve one more internal field for keeping event listeners.
1768 v8::Local<v8::ObjectTemplate> instance_template = 1773 v8::Local<v8::ObjectTemplate> instance_template =
1769 desc->InstanceTemplate(); 1774 desc->InstanceTemplate();
1770 instance_template->SetInternalFieldCount( 1775 instance_template->SetInternalFieldCount(
1771 V8Custom::kMessagePortInternalFieldCount); 1776 V8Custom::kMessagePortInternalFieldCount);
1772 break; 1777 break;
1773 } 1778 }
1774 1779
1780 #if ENABLE(WORKERS)
1781 case V8ClassIndex::WORKER: {
1782 // Reserve one more internal field for keeping event listeners.
1783 v8::Local<v8::ObjectTemplate> instance_template =
1784 desc->InstanceTemplate();
1785 instance_template->SetInternalFieldCount(
1786 V8Custom::kWorkerInternalFieldCount);
1787 desc->SetCallHandler(USE_CALLBACK(WorkerConstructor));
1788 break;
1789 }
1790 #endif // WORKERS
1791
1775 // The following objects are created from JavaScript. 1792 // The following objects are created from JavaScript.
1776 case V8ClassIndex::DOMPARSER: 1793 case V8ClassIndex::DOMPARSER:
1777 desc->SetCallHandler(USE_CALLBACK(DOMParserConstructor)); 1794 desc->SetCallHandler(USE_CALLBACK(DOMParserConstructor));
1778 break; 1795 break;
1779 case V8ClassIndex::WEBKITCSSMATRIX: 1796 case V8ClassIndex::WEBKITCSSMATRIX:
1780 desc->SetCallHandler(USE_CALLBACK(WebKitCSSMatrixConstructor)); 1797 desc->SetCallHandler(USE_CALLBACK(WebKitCSSMatrixConstructor));
1781 break; 1798 break;
1782 case V8ClassIndex::XMLSERIALIZER: 1799 case V8ClassIndex::XMLSERIALIZER:
1783 desc->SetCallHandler(USE_CALLBACK(XMLSerializerConstructor)); 1800 desc->SetCallHandler(USE_CALLBACK(XMLSerializerConstructor));
1784 break; 1801 break;
(...skipping 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after
3465 v8::Handle<v8::Function> frame_source_name; 3482 v8::Handle<v8::Function> frame_source_name;
3466 frame_source_name = v8::Local<v8::Function>::Cast( 3483 frame_source_name = v8::Local<v8::Function>::Cast(
3467 utility_context->Global()->Get(v8::String::New("frame_source_name"))); 3484 utility_context->Global()->Get(v8::String::New("frame_source_name")));
3468 if (frame_source_name.IsEmpty()) { 3485 if (frame_source_name.IsEmpty()) {
3469 return String(); 3486 return String();
3470 } 3487 }
3471 return ToWebCoreString(v8::Debug::Call(frame_source_name)); 3488 return ToWebCoreString(v8::Debug::Call(frame_source_name));
3472 } 3489 }
3473 3490
3474 } // namespace WebCore 3491 } // namespace WebCore
OLDNEW
« no previous file with comments | « webkit/port/bindings/v8/v8_index.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698