diff options
author | dglazkov@google.com <dglazkov@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-22 02:50:05 +0000 |
---|---|---|
committer | dglazkov@google.com <dglazkov@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-22 02:50:05 +0000 |
commit | ccd0b2138f8a024e439bdcc31f1a1a8a42915a34 (patch) | |
tree | 9f239c6d2fae45aaa82a3d278f350b6e41f9889d /webkit | |
parent | f91eb27b04e8807ec75e2310862a3679b631f12d (diff) | |
download | chromium_src-ccd0b2138f8a024e439bdcc31f1a1a8a42915a34.zip chromium_src-ccd0b2138f8a024e439bdcc31f1a1a8a42915a34.tar.gz chromium_src-ccd0b2138f8a024e439bdcc31f1a1a8a42915a34.tar.bz2 |
Hook up V8 Database Bindings.
R=darin
Review URL: http://codereview.chromium.org/50071
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12264 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/build/V8Bindings/SConscript | 13 | ||||
-rw-r--r-- | webkit/build/V8Bindings/V8Bindings.vcproj | 92 | ||||
-rw-r--r-- | webkit/build/port/SConscript | 6 | ||||
-rw-r--r-- | webkit/port/DerivedSources.make | 4 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_custom.h | 6 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_index.cpp | 5 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_index.h | 11 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_proxy.cpp | 6 | ||||
-rw-r--r-- | webkit/webkit.gyp | 10 |
9 files changed, 142 insertions, 11 deletions
diff --git a/webkit/build/V8Bindings/SConscript b/webkit/build/V8Bindings/SConscript index 4752377..7cb108a 100644 --- a/webkit/build/V8Bindings/SConscript +++ b/webkit/build/V8Bindings/SConscript @@ -76,6 +76,7 @@ inputs = [ '$DERIVED_DIR/V8CSSVariablesDeclaration.cpp', '$DERIVED_DIR/V8CSSVariablesRule.cpp', '$DERIVED_DIR/V8Document.cpp', + '$DERIVED_DIR/V8Database.cpp', '$DERIVED_DIR/V8DocumentFragment.cpp', '$DERIVED_DIR/V8DocumentType.cpp', '$DERIVED_DIR/V8DOMCoreException.cpp', @@ -183,6 +184,10 @@ inputs = [ '$DERIVED_DIR/V8Range.cpp', '$DERIVED_DIR/V8RangeException.cpp', '$DERIVED_DIR/V8Rect.cpp', + '$DERIVED_DIR/V8SQLError.cpp', + '$DERIVED_DIR/V8SQLResultSet.cpp', + '$DERIVED_DIR/V8SQLResultSetRowList.cpp', + '$DERIVED_DIR/V8SQLTransaction.cpp', '$DERIVED_DIR/V8RGBColor.cpp', '$DERIVED_DIR/V8Screen.cpp', '$DERIVED_DIR/V8StyleSheet.cpp', @@ -361,6 +366,12 @@ inputs = [ '$WEBCORE_DIR/bindings/v8/custom/V8ClipboardCustom.cpp', '$WEBCORE_DIR/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp', '$WEBCORE_DIR/bindings/v8/custom/V8CustomEventListener.cpp', + '$WEBCORE_DIR/bindings/v8/custom/V8CustomSQLStatementCallback.cpp', + '$WEBCORE_DIR/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp', + '$WEBCORE_DIR/bindings/v8/custom/V8CustomSQLTransactionCallback.cpp', + '$WEBCORE_DIR/bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp', + '$WEBCORE_DIR/bindings/v8/custom/V8CustomVoidCallback.cpp', + '$WEBCORE_DIR/bindings/v8/custom/V8DatabaseCustom.cpp', '$WEBCORE_DIR/bindings/v8/custom/V8DocumentCustom.cpp', '$WEBCORE_DIR/bindings/v8/custom/V8DOMParserConstructor.cpp', '$WEBCORE_DIR/bindings/v8/custom/V8DOMStringListCustom.cpp', @@ -385,6 +396,8 @@ inputs = [ '$WEBCORE_DIR/bindings/v8/custom/V8NodeFilterCustom.cpp', '$WEBCORE_DIR/bindings/v8/custom/V8NodeIteratorCustom.cpp', '$WEBCORE_DIR/bindings/v8/custom/V8NodeListCustom.cpp', + '$WEBCORE_DIR/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp', + '$WEBCORE_DIR/bindings/v8/custom/V8SQLTransactionCustom.cpp', '$WEBCORE_DIR/bindings/v8/custom/V8StyleSheetListCustom.cpp', '$WEBCORE_DIR/bindings/v8/custom/V8SVGElementInstanceCustom.cpp', '$WEBCORE_DIR/bindings/v8/custom/V8SVGLengthCustom.cpp', diff --git a/webkit/build/V8Bindings/V8Bindings.vcproj b/webkit/build/V8Bindings/V8Bindings.vcproj index cc6ee6b..887e71d 100644 --- a/webkit/build/V8Bindings/V8Bindings.vcproj +++ b/webkit/build/V8Bindings/V8Bindings.vcproj @@ -152,6 +152,50 @@ > </File> <File + RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\v8\custom\V8CustomSQLStatementCallback.cpp" + > + </File> + <File + RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\v8\custom\V8CustomSQLStatementCallback.h" + > + </File> + <File + RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\v8\custom\V8CustomSQLStatementErrorCallback.cpp" + > + </File> + <File + RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\v8\custom\V8CustomSQLStatementErrorCallback.h" + > + </File> + <File + RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\v8\custom\V8CustomSQLTransactionCallback.cpp" + > + </File> + <File + RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\v8\custom\V8CustomSQLTransactionCallback.h" + > + </File> + <File + RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\v8\custom\V8CustomSQLTransactionErrorCallback.cpp" + > + </File> + <File + RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\v8\custom\V8CustomSQLTransactionErrorCallback.h" + > + </File> + <File + RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\v8\custom\V8CustomVoidCallback.cpp" + > + </File> + <File + RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\v8\custom\V8CustomVoidCallback.h" + > + </File> + <File + RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\v8\custom\V8DatabaseCustom.cpp" + > + </File> + <File RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\v8\custom\V8DocumentCustom.cpp" > </File> @@ -256,6 +300,14 @@ > </File> <File + RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\v8\custom\V8SQLResultSetRowListCustom.cpp" + > + </File> + <File + RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\v8\custom\V8SQLTransactionCustom.cpp" + > + </File> + <File RelativePath="..\..\..\third_party\WebKit\WebCore\bindings\v8\custom\V8StyleSheetListCustom.cpp" > </File> @@ -576,6 +628,14 @@ > </File> <File + RelativePath="$(IntDir)\DerivedSources\V8Database.cpp" + > + </File> + <File + RelativePath="$(IntDir)\DerivedSources\V8Database.h" + > + </File> + <File RelativePath="$(IntDir)\DerivedSources\V8Document.cpp" > </File> @@ -1448,6 +1508,38 @@ > </File> <File + RelativePath="$(IntDir)\DerivedSources\V8SQLError.cpp" + > + </File> + <File + RelativePath="$(IntDir)\DerivedSources\V8SQLError.h" + > + </File> + <File + RelativePath="$(IntDir)\DerivedSources\V8SQLResultSet.cpp" + > + </File> + <File + RelativePath="$(IntDir)\DerivedSources\V8SQLResultSet.h" + > + </File> + <File + RelativePath="$(IntDir)\DerivedSources\V8SQLResultSetRowList.cpp" + > + </File> + <File + RelativePath="$(IntDir)\DerivedSources\V8SQLResultSetRowList.h" + > + </File> + <File + RelativePath="$(IntDir)\DerivedSources\V8SQLTransaction.cpp" + > + </File> + <File + RelativePath="$(IntDir)\DerivedSources\V8SQLTransaction.h" + > + </File> + <File RelativePath="$(IntDir)\DerivedSources\V8RGBColor.cpp" > </File> diff --git a/webkit/build/port/SConscript b/webkit/build/port/SConscript index 4854789..2b9ac9b 100644 --- a/webkit/build/port/SConscript +++ b/webkit/build/port/SConscript @@ -321,6 +321,12 @@ idl_files = [ 'plugins/PluginArray.idl', 'plugins/Plugin.idl', + 'storage/Database.idl', + 'storage/SQLError.idl', + 'storage/SQLResultSet.idl', + 'storage/SQLResultSetRowList.idl', + 'storage/SQLTransaction.idl', + 'svg/ElementTimeControl.idl', 'svg/SVGAElement.idl', 'svg/SVGAltGlyphElement.idl', diff --git a/webkit/port/DerivedSources.make b/webkit/port/DerivedSources.make index 36da578..076d228 100644 --- a/webkit/port/DerivedSources.make +++ b/webkit/port/DerivedSources.make @@ -751,6 +751,10 @@ all : \ V8Range.h \ V8RangeException.h \ V8Rect.h \ + V8SQLError.h \ + V8SQLResultSet.h \ + V8SQLResultSetRowList.h \ + V8SQLTransaction.h \ V8SVGAElement.h \ V8SVGAltGlyphElement.h \ V8SVGAngle.h \ diff --git a/webkit/port/bindings/v8/v8_custom.h b/webkit/port/bindings/v8/v8_custom.h index 5c490d7..4c4129d 100644 --- a/webkit/port/bindings/v8/v8_custom.h +++ b/webkit/port/bindings/v8/v8_custom.h @@ -466,6 +466,12 @@ DECLARE_CALLBACK(MessagePortStartConversation) DECLARE_CALLBACK(MessagePortAddEventListener) DECLARE_CALLBACK(MessagePortRemoveEventListener) +// Database +DECLARE_CALLBACK(DatabaseChangeVersion) +DECLARE_CALLBACK(DatabaseTransaction) +DECLARE_CALLBACK(SQLTransactionExecuteSql) +DECLARE_CALLBACK(SQLResultSetRowListItem) + // SVG custom properties and callbacks #if ENABLE(SVG) DECLARE_PROPERTY_ACCESSOR_GETTER(SVGLengthValue) diff --git a/webkit/port/bindings/v8/v8_index.cpp b/webkit/port/bindings/v8/v8_index.cpp index c3838ef..60757b6 100644 --- a/webkit/port/bindings/v8/v8_index.cpp +++ b/webkit/port/bindings/v8/v8_index.cpp @@ -62,6 +62,7 @@ #include "V8CSSStyleSheet.h" #include "V8CSSVariablesDeclaration.h" #include "V8CSSVariablesRule.h" +#include "V8Database.h" #include "V8Document.h" #include "V8DocumentFragment.h" #include "V8DocumentType.h" @@ -179,6 +180,10 @@ #include "V8Range.h" #include "V8RangeException.h" #include "V8Rect.h" +#include "V8SQLError.h" +#include "V8SQLResultSet.h" +#include "V8SQLResultSetRowList.h" +#include "V8SQLTransaction.h" #include "V8NodeIterator.h" #include "V8TextMetrics.h" #include "V8TreeWalker.h" diff --git a/webkit/port/bindings/v8/v8_index.h b/webkit/port/bindings/v8/v8_index.h index f149629..f567e5d 100644 --- a/webkit/port/bindings/v8/v8_index.h +++ b/webkit/port/bindings/v8/v8_index.h @@ -338,10 +338,17 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)(); VIDEO_NONNODE_TYPES(V) \ WORKER_NONNODE_WRAPPER_TYPES(V) +#define DOM_OBJECT_DATABASE_TYPES(V) \ + V(DATABASE, Database) \ + V(SQLERROR, SQLError) \ + V(SQLRESULTSET, SQLResultSet) \ + V(SQLRESULTSETROWLIST, SQLResultSetRowList) \ + V(SQLTRANSACTION, SQLTransaction) + #define DOM_OBJECT_TYPES(V) \ DOM_OBJECT_TYPES_1(V) \ - DOM_OBJECT_TYPES_2(V) - + DOM_OBJECT_TYPES_2(V) \ + DOM_OBJECT_DATABASE_TYPES(V) #if ENABLE(SVG) // SVG_OBJECT_TYPES are svg non-node, non-pod types. diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp index 486aee2..1b10096 100644 --- a/webkit/port/bindings/v8/v8_proxy.cpp +++ b/webkit/port/bindings/v8/v8_proxy.cpp @@ -70,6 +70,7 @@ #include "CSSStyleSheet.h" #include "CSSVariablesDeclaration.h" #include "CSSVariablesRule.h" +#include "Database.h" #include "DocumentType.h" #include "DocumentFragment.h" #include "DOMCoreException.h" @@ -129,6 +130,9 @@ #include "ScriptExecutionContext.h" #include "SecurityOrigin.h" #include "Settings.h" +#include "SQLTransaction.h" +#include "SQLResultSet.h" +#include "SQLResultSetRowList.h" #include "StyleSheet.h" #include "StyleSheetList.h" #include "SVGColor.h" @@ -1553,7 +1557,7 @@ v8::Local<v8::Function> V8Proxy::GetConstructor(V8ClassIndex::V8WrapperType t){ v8::Local<v8::Object> V8Proxy::CreateWrapperFromCache(V8ClassIndex::V8WrapperType type) { int class_index = V8ClassIndex::ToInt(type); - v8::Local<v8::Value> cached_object = + v8::Local<v8::Value> cached_object = m_wrapper_boilerplates->Get(v8::Integer::New(class_index)); if (cached_object->IsObject()) { v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(cached_object); diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp index c91e6fd..3a70454 100644 --- a/webkit/webkit.gyp +++ b/webkit/webkit.gyp @@ -979,10 +979,10 @@ '../third_party/WebKit/WebCore/bindings/v8/custom/V8CustomSQLTransactionErrorCallback.h', '../third_party/WebKit/WebCore/bindings/v8/custom/V8CustomVoidCallback.cpp', '../third_party/WebKit/WebCore/bindings/v8/custom/V8CustomVoidCallback.h', + '../third_party/WebKit/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp', '../third_party/WebKit/WebCore/bindings/v8/custom/V8DOMParserConstructor.cpp', '../third_party/WebKit/WebCore/bindings/v8/custom/V8DOMStringListCustom.cpp', '../third_party/WebKit/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp', - '../third_party/WebKit/WebCore/bindings/v8/custom/V8DatabaseCustom.cpp', '../third_party/WebKit/WebCore/bindings/v8/custom/V8DocumentCustom.cpp', '../third_party/WebKit/WebCore/bindings/v8/custom/V8EventCustom.cpp', '../third_party/WebKit/WebCore/bindings/v8/custom/V8HTMLCollectionCustom.cpp', @@ -3758,14 +3758,11 @@ 'sources/': [ # Don't build bindings for storage/database. - ['exclude', '/third_party/WebKit/WebCore/storage/[^/]*\\.idl$'], + ['exclude', '/third_party/WebKit/WebCore/storage/Storage[^/]*\\.idl$'], # SVG_FILTERS only. ['exclude', '/third_party/WebKit/WebCore/svg/SVG(FE|Filter)[^/]*\\.idl$'], - # Don't build custom bindings for storage. - ['exclude', '/third_party/WebKit/WebCore/bindings/v8/custom/V8((Custom)?SQL|Database)[^/]*\\.cpp$'], - # Fortunately, many things can be excluded by using broad patterns. # Exclude things that don't apply to the Chromium platform on the basis @@ -3833,9 +3830,6 @@ # Someone (me?) should figure it out and add appropriate comments. '../third_party/WebKit/WebCore/css/CSSUnknownRule.idl', - # Don't build custom bindings for VoidCallback. - '../third_party/WebKit/WebCore/bindings/v8/custom/V8CustomVoidCallback.cpp', - # A few things can't be excluded by patterns. List them individually. # Use history/BackForwardListChromium.cpp instead. |