| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/renderer_webidbfactory_impl.h" | 5 #include "content/renderer/renderer_webidbfactory_impl.h" |
| 6 | 6 |
| 7 #include "content/renderer/render_thread.h" | 7 #include "content/renderer/render_thread.h" |
| 8 #include "content/renderer/indexed_db_dispatcher.h" | 8 #include "content/renderer/indexed_db_dispatcher.h" |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMStringList.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMStringList.h" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 RendererWebIDBFactoryImpl::~RendererWebIDBFactoryImpl() { | 22 RendererWebIDBFactoryImpl::~RendererWebIDBFactoryImpl() { |
| 23 } | 23 } |
| 24 | 24 |
| 25 void RendererWebIDBFactoryImpl::open( | 25 void RendererWebIDBFactoryImpl::open( |
| 26 const WebString& name, | 26 const WebString& name, |
| 27 WebIDBCallbacks* callbacks, | 27 WebIDBCallbacks* callbacks, |
| 28 const WebSecurityOrigin& origin, | 28 const WebSecurityOrigin& origin, |
| 29 WebFrame* web_frame, | 29 WebFrame* web_frame, |
| 30 const WebString& data_dir, | 30 const WebString& data_dir, |
| 31 unsigned long long maximum_size, | 31 unsigned long long maximum_size_unused, |
| 32 WebKit::WebIDBFactory::BackingStoreType) { | 32 WebKit::WebIDBFactory::BackingStoreType) { |
| 33 // Don't send the data_dir. We know what we want on the Browser side of | 33 // Don't send the data_dir. We know what we want on the Browser side of |
| 34 // things. | 34 // things. |
| 35 IndexedDBDispatcher* dispatcher = | 35 IndexedDBDispatcher* dispatcher = |
| 36 RenderThread::current()->indexed_db_dispatcher(); | 36 RenderThread::current()->indexed_db_dispatcher(); |
| 37 dispatcher->RequestIDBFactoryOpen( | 37 dispatcher->RequestIDBFactoryOpen( |
| 38 name, callbacks, origin.databaseIdentifier(), web_frame, maximum_size); | 38 name, callbacks, origin.databaseIdentifier(), web_frame); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void RendererWebIDBFactoryImpl::deleteDatabase( | 41 void RendererWebIDBFactoryImpl::deleteDatabase( |
| 42 const WebString& name, | 42 const WebString& name, |
| 43 WebIDBCallbacks* callbacks, | 43 WebIDBCallbacks* callbacks, |
| 44 const WebSecurityOrigin& origin, | 44 const WebSecurityOrigin& origin, |
| 45 WebFrame* web_frame, | 45 WebFrame* web_frame, |
| 46 const WebString& data_dir) { | 46 const WebString& data_dir) { |
| 47 deleteDatabase(name, callbacks, origin, web_frame, data_dir, | 47 deleteDatabase(name, callbacks, origin, web_frame, data_dir, |
| 48 WebKit::WebIDBFactory::DefaultBackingStore); | 48 WebKit::WebIDBFactory::DefaultBackingStore); |
| 49 } | 49 } |
| 50 | 50 |
| 51 void RendererWebIDBFactoryImpl::deleteDatabase( | 51 void RendererWebIDBFactoryImpl::deleteDatabase( |
| 52 const WebString& name, | 52 const WebString& name, |
| 53 WebIDBCallbacks* callbacks, | 53 WebIDBCallbacks* callbacks, |
| 54 const WebSecurityOrigin& origin, | 54 const WebSecurityOrigin& origin, |
| 55 WebFrame* web_frame, | 55 WebFrame* web_frame, |
| 56 const WebString& data_dir, | 56 const WebString& data_dir, |
| 57 WebKit::WebIDBFactory::BackingStoreType) { | 57 WebKit::WebIDBFactory::BackingStoreType) { |
| 58 // Don't send the data_dir. We know what we want on the Browser side of | 58 // Don't send the data_dir. We know what we want on the Browser side of |
| 59 // things. | 59 // things. |
| 60 IndexedDBDispatcher* dispatcher = | 60 IndexedDBDispatcher* dispatcher = |
| 61 RenderThread::current()->indexed_db_dispatcher(); | 61 RenderThread::current()->indexed_db_dispatcher(); |
| 62 dispatcher->RequestIDBFactoryDeleteDatabase( | 62 dispatcher->RequestIDBFactoryDeleteDatabase( |
| 63 name, callbacks, origin.databaseIdentifier(), web_frame); | 63 name, callbacks, origin.databaseIdentifier(), web_frame); |
| 64 } | 64 } |
| OLD | NEW |