summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-17 12:56:09 +0000
committerhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-17 12:56:09 +0000
commitd20e0b986707dd49ae7a2cad347f4e50140ec86e (patch)
treeb0cef7b8dcf072f4640ec9d24b9e546c501df52a /webkit
parent7e58a5a1b1a11dd3571127dc952e32fc841a50ad (diff)
downloadchromium_src-d20e0b986707dd49ae7a2cad347f4e50140ec86e.zip
chromium_src-d20e0b986707dd49ae7a2cad347f4e50140ec86e.tar.gz
chromium_src-d20e0b986707dd49ae7a2cad347f4e50140ec86e.tar.bz2
IndexedDB: Allow injection of keys into values via key path.
BUG=70118 TEST=browser_tests Review URL: http://codereview.chromium.org/6529021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75258 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/idb_bindings.cc9
-rw-r--r--webkit/glue/idb_bindings.h5
-rw-r--r--webkit/support/test_webkit_client.cc8
-rw-r--r--webkit/support/test_webkit_client.h4
-rw-r--r--webkit/tools/test_shell/test_shell_webkit_init.cc8
-rw-r--r--webkit/tools/test_shell/test_shell_webkit_init.h6
6 files changed, 40 insertions, 0 deletions
diff --git a/webkit/glue/idb_bindings.cc b/webkit/glue/idb_bindings.cc
index c565f94..633045e 100644
--- a/webkit/glue/idb_bindings.cc
+++ b/webkit/glue/idb_bindings.cc
@@ -42,4 +42,13 @@ bool IDBKeysFromValuesAndKeyPath(
return error;
}
+WebSerializedScriptValue InjectIDBKey(
+ const WebIDBKey& key,
+ const WebSerializedScriptValue& value,
+ const string16& idb_key_path) {
+ v8::Locker lock;
+ return WebIDBKey::injectIDBKeyIntoSerializedValue(
+ key, value, WebIDBKeyPath::create(idb_key_path));
+}
+
} // namespace webkit_glue
diff --git a/webkit/glue/idb_bindings.h b/webkit/glue/idb_bindings.h
index 074595d..7d7c90d 100644
--- a/webkit/glue/idb_bindings.h
+++ b/webkit/glue/idb_bindings.h
@@ -22,4 +22,9 @@ bool IDBKeysFromValuesAndKeyPath(
const string16& idb_key_path,
std::vector<WebKit::WebIDBKey>* values);
+WebKit::WebSerializedScriptValue InjectIDBKey(
+ const WebKit::WebIDBKey& key,
+ const WebKit::WebSerializedScriptValue& value,
+ const string16& idb_key_path);
+
} // namespace webkit_glue
diff --git a/webkit/support/test_webkit_client.cc b/webkit/support/test_webkit_client.cc
index eaa99ba..fd314a4 100644
--- a/webkit/support/test_webkit_client.cc
+++ b/webkit/support/test_webkit_client.cc
@@ -331,6 +331,14 @@ void TestWebKitClient::createIDBKeysFromSerializedValuesAndKeyPath(
keys_out.swap(keys);
}
+WebKit::WebSerializedScriptValue
+TestWebKitClient::injectIDBKeyIntoSerializedValue(const WebKit::WebIDBKey& key,
+ const WebKit::WebSerializedScriptValue& value,
+ const WebKit::WebString& keyPath) {
+ return WebKit::WebIDBKey::injectIDBKeyIntoSerializedValue(
+ key, value, WebKit::WebIDBKeyPath::create(keyPath));
+}
+
#if defined(OS_WIN) || defined(OS_MACOSX)
void TestWebKitClient::SetThemeEngine(WebKit::WebThemeEngine* engine) {
active_theme_engine_ = engine ? engine : WebKitClientImpl::themeEngine();
diff --git a/webkit/support/test_webkit_client.h b/webkit/support/test_webkit_client.h
index dfe7acf..efeecf6 100644
--- a/webkit/support/test_webkit_client.h
+++ b/webkit/support/test_webkit_client.h
@@ -67,6 +67,10 @@ class TestWebKitClient : public webkit_glue::WebKitClientImpl {
const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values,
const WebKit::WebString& keyPath,
WebKit::WebVector<WebKit::WebIDBKey>& keys_out);
+ virtual WebKit::WebSerializedScriptValue injectIDBKeyIntoSerializedValue(
+ const WebKit::WebIDBKey& key,
+ const WebKit::WebSerializedScriptValue& value,
+ const WebKit::WebString& keyPath);
#if defined(OS_WIN) || defined(OS_MACOSX)
void SetThemeEngine(WebKit::WebThemeEngine* engine);
diff --git a/webkit/tools/test_shell/test_shell_webkit_init.cc b/webkit/tools/test_shell/test_shell_webkit_init.cc
index 94dbb58..274ad63 100644
--- a/webkit/tools/test_shell/test_shell_webkit_init.cc
+++ b/webkit/tools/test_shell/test_shell_webkit_init.cc
@@ -278,6 +278,14 @@ void TestShellWebKitInit::createIDBKeysFromSerializedValuesAndKeyPath(
keys_out.swap(keys);
}
+WebKit::WebSerializedScriptValue
+TestShellWebKitInit::injectIDBKeyIntoSerializedValue(
+ const WebKit::WebIDBKey& key, const WebKit::WebSerializedScriptValue& value,
+ const WebKit::WebString& keyPath) {
+ return WebKit::WebIDBKey::injectIDBKeyIntoSerializedValue(
+ key, value, WebKit::WebIDBKeyPath::create(keyPath));
+}
+
WebKit::WebSharedWorkerRepository*
TestShellWebKitInit::sharedWorkerRepository() {
return NULL;
diff --git a/webkit/tools/test_shell/test_shell_webkit_init.h b/webkit/tools/test_shell/test_shell_webkit_init.h
index 8690991..f4c1e79 100644
--- a/webkit/tools/test_shell/test_shell_webkit_init.h
+++ b/webkit/tools/test_shell/test_shell_webkit_init.h
@@ -82,6 +82,12 @@ class TestShellWebKitInit : public webkit_glue::WebKitClientImpl {
const WebKit::WebString& keyPath,
WebKit::WebVector<WebKit::WebIDBKey>& keys_out);
+ virtual WebKit::WebSerializedScriptValue injectIDBKeyIntoSerializedValue(
+ const WebKit::WebIDBKey& key,
+ const WebKit::WebSerializedScriptValue& value,
+ const WebKit::WebString& keyPath);
+
+
#if defined(OS_WIN)
void SetThemeEngine(WebKit::WebThemeEngine* engine) {
active_theme_engine_ = engine ? engine : WebKitClientImpl::themeEngine();