diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-18 01:33:34 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-18 01:33:34 +0000 |
commit | acb94729d3aa35ec833c922ade31340229770d60 (patch) | |
tree | 7c26a239c8b9e09b78f809a308e081329625c8b2 /chrome/renderer/renderer_webidbobjectstore_impl.cc | |
parent | 4874aae4718d407f7f4de1b71f0c02b9a2065474 (diff) | |
download | chromium_src-acb94729d3aa35ec833c922ade31340229770d60.zip chromium_src-acb94729d3aa35ec833c922ade31340229770d60.tar.gz chromium_src-acb94729d3aa35ec833c922ade31340229770d60.tar.bz2 |
Move the renderer_web* files to content.
TBR=avi
Review URL: http://codereview.chromium.org/6713024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78643 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/renderer_webidbobjectstore_impl.cc')
-rw-r--r-- | chrome/renderer/renderer_webidbobjectstore_impl.cc | 171 |
1 files changed, 0 insertions, 171 deletions
diff --git a/chrome/renderer/renderer_webidbobjectstore_impl.cc b/chrome/renderer/renderer_webidbobjectstore_impl.cc deleted file mode 100644 index aa4106c..0000000 --- a/chrome/renderer/renderer_webidbobjectstore_impl.cc +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/renderer/renderer_webidbobjectstore_impl.h" - -#include "chrome/renderer/render_thread.h" -#include "chrome/renderer/renderer_webidbindex_impl.h" -#include "chrome/renderer/renderer_webidbtransaction_impl.h" -#include "content/common/indexed_db_messages.h" -#include "content/common/serialized_script_value.h" -#include "content/renderer/indexed_db_dispatcher.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMStringList.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyRange.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransaction.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptValue.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" - -using WebKit::WebDOMStringList; -using WebKit::WebExceptionCode; -using WebKit::WebFrame; -using WebKit::WebIDBCallbacks; -using WebKit::WebIDBKeyRange; -using WebKit::WebIDBIndex; -using WebKit::WebIDBKey; -using WebKit::WebIDBTransaction; -using WebKit::WebSerializedScriptValue; -using WebKit::WebString; - -RendererWebIDBObjectStoreImpl::RendererWebIDBObjectStoreImpl( - int32 idb_object_store_id) - : idb_object_store_id_(idb_object_store_id) { -} - -RendererWebIDBObjectStoreImpl::~RendererWebIDBObjectStoreImpl() { - // It's not possible for there to be pending callbacks that address this - // object since inside WebKit, they hold a reference to the object wich owns - // this object. But, if that ever changed, then we'd need to invalidate - // any such pointers. - RenderThread::current()->Send( - new IndexedDBHostMsg_ObjectStoreDestroyed(idb_object_store_id_)); -} - -WebString RendererWebIDBObjectStoreImpl::name() const { - string16 result; - RenderThread::current()->Send( - new IndexedDBHostMsg_ObjectStoreName(idb_object_store_id_, &result)); - return result; -} - -WebString RendererWebIDBObjectStoreImpl::keyPath() const { - NullableString16 result; - RenderThread::current()->Send( - new IndexedDBHostMsg_ObjectStoreKeyPath(idb_object_store_id_, &result)); - return result; -} - -WebDOMStringList RendererWebIDBObjectStoreImpl::indexNames() const { - std::vector<string16> result; - RenderThread::current()->Send( - new IndexedDBHostMsg_ObjectStoreIndexNames( - idb_object_store_id_, &result)); - WebDOMStringList web_result; - for (std::vector<string16>::const_iterator it = result.begin(); - it != result.end(); ++it) { - web_result.append(*it); - } - return web_result; -} - -void RendererWebIDBObjectStoreImpl::get( - const WebIDBKey& key, - WebIDBCallbacks* callbacks, - const WebIDBTransaction& transaction, - WebExceptionCode& ec) { - IndexedDBDispatcher* dispatcher = - RenderThread::current()->indexed_db_dispatcher(); - dispatcher->RequestIDBObjectStoreGet( - IndexedDBKey(key), callbacks, idb_object_store_id_, transaction, &ec); -} - -void RendererWebIDBObjectStoreImpl::put( - const WebSerializedScriptValue& value, - const WebIDBKey& key, - PutMode put_mode, - WebIDBCallbacks* callbacks, - const WebIDBTransaction& transaction, - WebExceptionCode& ec) { - IndexedDBDispatcher* dispatcher = - RenderThread::current()->indexed_db_dispatcher(); - dispatcher->RequestIDBObjectStorePut( - SerializedScriptValue(value), IndexedDBKey(key), put_mode, callbacks, - idb_object_store_id_, transaction, &ec); -} - -void RendererWebIDBObjectStoreImpl::deleteFunction( - const WebIDBKey& key, - WebIDBCallbacks* callbacks, - const WebIDBTransaction& transaction, - WebExceptionCode& ec) { - IndexedDBDispatcher* dispatcher = - RenderThread::current()->indexed_db_dispatcher(); - dispatcher->RequestIDBObjectStoreDelete( - IndexedDBKey(key), callbacks, idb_object_store_id_, transaction, &ec); -} - -void RendererWebIDBObjectStoreImpl::clear( - WebIDBCallbacks* callbacks, - const WebIDBTransaction& transaction, - WebExceptionCode& ec) { - IndexedDBDispatcher* dispatcher = - RenderThread::current()->indexed_db_dispatcher(); - dispatcher->RequestIDBObjectStoreClear( - callbacks, idb_object_store_id_, transaction, &ec); -} - -WebIDBIndex* RendererWebIDBObjectStoreImpl::createIndex( - const WebString& name, - const WebString& key_path, - bool unique, - const WebIDBTransaction& transaction, - WebExceptionCode& ec) { - IndexedDBHostMsg_ObjectStoreCreateIndex_Params params; - params.name = name; - params.key_path = key_path; - params.unique = unique; - params.transaction_id = IndexedDBDispatcher::TransactionId(transaction); - params.idb_object_store_id = idb_object_store_id_; - - int32 index_id; - RenderThread::current()->Send( - new IndexedDBHostMsg_ObjectStoreCreateIndex(params, &index_id, &ec)); - if (!index_id) - return NULL; - return new RendererWebIDBIndexImpl(index_id); -} - -WebIDBIndex* RendererWebIDBObjectStoreImpl::index( - const WebString& name, - WebExceptionCode& ec) { - int32 idb_index_id; - RenderThread::current()->Send( - new IndexedDBHostMsg_ObjectStoreIndex(idb_object_store_id_, name, - &idb_index_id, &ec)); - if (!idb_index_id) - return NULL; - return new RendererWebIDBIndexImpl(idb_index_id); -} - -void RendererWebIDBObjectStoreImpl::deleteIndex( - const WebString& name, - const WebIDBTransaction& transaction, - WebExceptionCode& ec) { - RenderThread::current()->Send( - new IndexedDBHostMsg_ObjectStoreDeleteIndex( - idb_object_store_id_, name, - IndexedDBDispatcher::TransactionId(transaction), &ec)); -} - -void RendererWebIDBObjectStoreImpl::openCursor( - const WebIDBKeyRange& idb_key_range, - unsigned short direction, WebIDBCallbacks* callbacks, - const WebIDBTransaction& transaction, - WebExceptionCode& ec) { - IndexedDBDispatcher* dispatcher = - RenderThread::current()->indexed_db_dispatcher(); - dispatcher->RequestIDBObjectStoreOpenCursor( - idb_key_range, direction, callbacks, idb_object_store_id_, - transaction, &ec); -} |