diff options
Diffstat (limited to 'chrome/utility')
-rw-r--r-- | chrome/utility/utility_thread.cc | 12 | ||||
-rw-r--r-- | chrome/utility/utility_thread.h | 6 |
2 files changed, 17 insertions, 1 deletions
diff --git a/chrome/utility/utility_thread.cc b/chrome/utility/utility_thread.cc index fb5f0ac..6d078e3 100644 --- a/chrome/utility/utility_thread.cc +++ b/chrome/utility/utility_thread.cc @@ -63,6 +63,8 @@ bool UtilityThread::OnControlMessageReceived(const IPC::Message& msg) { OnRenderPDFPagesToMetafile) IPC_MESSAGE_HANDLER(UtilityMsg_IDBKeysFromValuesAndKeyPath, OnIDBKeysFromValuesAndKeyPath) + IPC_MESSAGE_HANDLER(UtilityMsg_InjectIDBKey, + OnInjectIDBKey) IPC_MESSAGE_HANDLER(UtilityMsg_BatchMode_Started, OnBatchModeStarted) IPC_MESSAGE_HANDLER(UtilityMsg_BatchMode_Finished, OnBatchModeFinished) IPC_MESSAGE_HANDLER(UtilityMsg_GetPrinterCapsAndDefaults, @@ -304,6 +306,15 @@ void UtilityThread::OnIDBKeysFromValuesAndKeyPath( ReleaseProcessIfNeeded(); } +void UtilityThread::OnInjectIDBKey(const IndexedDBKey& key, + const SerializedScriptValue& value, + const string16& key_path) { + SerializedScriptValue new_value(webkit_glue::InjectIDBKey(key, value, + key_path)); + Send(new UtilityHostMsg_InjectIDBKey_Finished(new_value)); + ReleaseProcessIfNeeded(); +} + void UtilityThread::OnBatchModeStarted() { batch_mode_ = true; } @@ -330,4 +341,3 @@ void UtilityThread::ReleaseProcessIfNeeded() { if (!batch_mode_) ChildProcess::current()->ReleaseProcess(); } - diff --git a/chrome/utility/utility_thread.h b/chrome/utility/utility_thread.h index ce4cc25..348cc90 100644 --- a/chrome/utility/utility_thread.h +++ b/chrome/utility/utility_thread.h @@ -14,6 +14,7 @@ #include "printing/native_metafile.h" class GURL; +class IndexedDBKey; class SerializedScriptValue; class SkBitmap; @@ -77,6 +78,11 @@ class UtilityThread : public ChildThread { const std::vector<SerializedScriptValue>& serialized_script_values, const string16& idb_key_path); + // IPC for injecting an IndexedDB key into a SerializedScriptValue. + void OnInjectIDBKey(const IndexedDBKey& key, + const SerializedScriptValue& value, + const string16& key_path); + // IPC to notify we'll be running in batch mode instead of quitting after // any of the IPCs above, we'll only quit during OnBatchModeFinished(). void OnBatchModeStarted(); |