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/common/indexed_db_messages.h" |
7 #include "content/renderer/render_thread.h" | 8 #include "content/renderer/render_thread.h" |
| 9 #include "content/renderer/render_view.h" |
8 #include "content/renderer/indexed_db_dispatcher.h" | 10 #include "content/renderer/indexed_db_dispatcher.h" |
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMStringList.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMStringList.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" |
11 | 14 |
12 using WebKit::WebDOMStringList; | 15 using WebKit::WebDOMStringList; |
13 using WebKit::WebFrame; | 16 using WebKit::WebFrame; |
14 using WebKit::WebIDBCallbacks; | 17 using WebKit::WebIDBCallbacks; |
15 using WebKit::WebIDBDatabase; | 18 using WebKit::WebIDBDatabase; |
16 using WebKit::WebSecurityOrigin; | 19 using WebKit::WebSecurityOrigin; |
17 using WebKit::WebString; | 20 using WebKit::WebString; |
18 | 21 |
19 RendererWebIDBFactoryImpl::RendererWebIDBFactoryImpl() { | 22 RendererWebIDBFactoryImpl::RendererWebIDBFactoryImpl() { |
20 } | 23 } |
21 | 24 |
22 RendererWebIDBFactoryImpl::~RendererWebIDBFactoryImpl() { | 25 RendererWebIDBFactoryImpl::~RendererWebIDBFactoryImpl() { |
23 } | 26 } |
24 | 27 |
| 28 void RendererWebIDBFactoryImpl::getDatabaseNames( |
| 29 WebIDBCallbacks* callbacks, |
| 30 const WebSecurityOrigin& origin, |
| 31 WebFrame* web_frame, |
| 32 const WebString& data_dir_unused, |
| 33 unsigned long long maximum_size_unused, |
| 34 WebKit::WebIDBFactory::BackingStoreType) { |
| 35 IndexedDBDispatcher* dispatcher = |
| 36 RenderThread::current()->indexed_db_dispatcher(); |
| 37 dispatcher->RequestIDBFactoryGetDatabaseNames( |
| 38 callbacks, origin.databaseIdentifier(), web_frame); |
| 39 } |
| 40 |
25 void RendererWebIDBFactoryImpl::open( | 41 void RendererWebIDBFactoryImpl::open( |
26 const WebString& name, | 42 const WebString& name, |
27 WebIDBCallbacks* callbacks, | 43 WebIDBCallbacks* callbacks, |
28 const WebSecurityOrigin& origin, | 44 const WebSecurityOrigin& origin, |
29 WebFrame* web_frame, | 45 WebFrame* web_frame, |
30 const WebString& data_dir, | 46 const WebString& data_dir, |
31 unsigned long long maximum_size_unused, | 47 unsigned long long maximum_size_unused, |
32 WebKit::WebIDBFactory::BackingStoreType) { | 48 WebKit::WebIDBFactory::BackingStoreType) { |
33 // Don't send the data_dir. We know what we want on the Browser side of | 49 // Don't send the data_dir. We know what we want on the Browser side of |
34 // things. | 50 // things. |
(...skipping 20 matching lines...) Expand all Loading... |
55 WebFrame* web_frame, | 71 WebFrame* web_frame, |
56 const WebString& data_dir, | 72 const WebString& data_dir, |
57 WebKit::WebIDBFactory::BackingStoreType) { | 73 WebKit::WebIDBFactory::BackingStoreType) { |
58 // Don't send the data_dir. We know what we want on the Browser side of | 74 // Don't send the data_dir. We know what we want on the Browser side of |
59 // things. | 75 // things. |
60 IndexedDBDispatcher* dispatcher = | 76 IndexedDBDispatcher* dispatcher = |
61 RenderThread::current()->indexed_db_dispatcher(); | 77 RenderThread::current()->indexed_db_dispatcher(); |
62 dispatcher->RequestIDBFactoryDeleteDatabase( | 78 dispatcher->RequestIDBFactoryDeleteDatabase( |
63 name, callbacks, origin.databaseIdentifier(), web_frame); | 79 name, callbacks, origin.databaseIdentifier(), web_frame); |
64 } | 80 } |
OLD | NEW |