Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Side by Side Diff: content/child/indexed_db/webidbfactory_impl.h

Issue 2370643004: Port messages sent by WebIDBFactoryImpl to Mojo. (Closed)
Patch Set: Allow cpp_only to be set by the invoker. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CONTENT_CHILD_INDEXED_DB_WEBIDBFACTORY_IMPL_H_ 5 #ifndef CONTENT_CHILD_INDEXED_DB_WEBIDBFACTORY_IMPL_H_
6 #define CONTENT_CHILD_INDEXED_DB_WEBIDBFACTORY_IMPL_H_ 6 #define CONTENT_CHILD_INDEXED_DB_WEBIDBFACTORY_IMPL_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "content/common/indexed_db/indexed_db.mojom.h"
9 #include "third_party/WebKit/public/platform/WebVector.h" 10 #include "third_party/WebKit/public/platform/WebVector.h"
10 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBCallbacks.h " 11 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBCallbacks.h "
11 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabaseCal lbacks.h" 12 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabaseCal lbacks.h"
12 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBFactory.h" 13 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBFactory.h"
13 14
14 namespace blink { 15 namespace blink {
15 class WebSecurityOrigin; 16 class WebSecurityOrigin;
16 class WebString; 17 class WebString;
17 } 18 }
18 19
20 namespace IPC {
21 class SyncMessageFilter;
22 }
23
19 namespace content { 24 namespace content {
25 class IndexedDBCallbacksImpl;
26 class IndexedDBDatabaseCallbacksImpl;
20 class ThreadSafeSender; 27 class ThreadSafeSender;
21 28
22 class WebIDBFactoryImpl : public blink::WebIDBFactory { 29 class WebIDBFactoryImpl : public blink::WebIDBFactory {
23 public: 30 public:
24 explicit WebIDBFactoryImpl(ThreadSafeSender* thread_safe_sender); 31 WebIDBFactoryImpl(scoped_refptr<IPC::SyncMessageFilter> sync_message_filter,
32 scoped_refptr<ThreadSafeSender> thread_safe_sender,
33 scoped_refptr<base::SingleThreadTaskRunner> io_runner);
25 ~WebIDBFactoryImpl() override; 34 ~WebIDBFactoryImpl() override;
26 35
27 // See WebIDBFactory.h for documentation on these functions. 36 // See WebIDBFactory.h for documentation on these functions.
28 void getDatabaseNames(blink::WebIDBCallbacks* callbacks, 37 void getDatabaseNames(blink::WebIDBCallbacks* callbacks,
29 const blink::WebSecurityOrigin& origin) override; 38 const blink::WebSecurityOrigin& origin) override;
30 void open(const blink::WebString& name, 39 void open(const blink::WebString& name,
31 long long version, 40 long long version,
32 long long transaction_id, 41 long long transaction_id,
33 blink::WebIDBCallbacks* callbacks, 42 blink::WebIDBCallbacks* callbacks,
34 blink::WebIDBDatabaseCallbacks* databaseCallbacks, 43 blink::WebIDBDatabaseCallbacks* databaseCallbacks,
35 const blink::WebSecurityOrigin& origin) override; 44 const blink::WebSecurityOrigin& origin) override;
36 void deleteDatabase(const blink::WebString& name, 45 void deleteDatabase(const blink::WebString& name,
37 blink::WebIDBCallbacks* callbacks, 46 blink::WebIDBCallbacks* callbacks,
38 const blink::WebSecurityOrigin& origin) override; 47 const blink::WebSecurityOrigin& origin) override;
39 48
40 private: 49 private:
50 class IOThreadHelper;
51
52 IOThreadHelper* helper_;
41 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 53 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
54 scoped_refptr<base::SingleThreadTaskRunner> io_runner_;
42 }; 55 };
43 56
44 } // namespace content 57 } // namespace content
45 58
46 #endif // CONTENT_CHILD_INDEXED_DB_WEBIDBFACTORY_IMPL_H_ 59 #endif // CONTENT_CHILD_INDEXED_DB_WEBIDBFACTORY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698