OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_RENDERER_INDEXED_DB_DISPATCHER_H_ | 5 #ifndef CHROME_RENDERER_INDEXED_DB_DISPATCHER_H_ |
6 #define CHROME_RENDERER_INDEXED_DB_DISPATCHER_H_ | 6 #define CHROME_RENDERER_INDEXED_DB_DISPATCHER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/id_map.h" | 9 #include "base/id_map.h" |
10 #include "base/nullable_string16.h" | 10 #include "base/nullable_string16.h" |
11 #include "ipc/ipc_message.h" | 11 #include "ipc/ipc_channel.h" |
12 #include "third_party/WebKit/WebKit/chromium/public/WebExceptionCode.h" | 12 #include "third_party/WebKit/WebKit/chromium/public/WebExceptionCode.h" |
13 #include "third_party/WebKit/WebKit/chromium/public/WebIDBCallbacks.h" | 13 #include "third_party/WebKit/WebKit/chromium/public/WebIDBCallbacks.h" |
14 #include "third_party/WebKit/WebKit/chromium/public/WebIDBDatabase.h" | 14 #include "third_party/WebKit/WebKit/chromium/public/WebIDBDatabase.h" |
15 #include "third_party/WebKit/WebKit/chromium/public/WebIDBTransactionCallbacks.h
" | 15 #include "third_party/WebKit/WebKit/chromium/public/WebIDBTransactionCallbacks.h
" |
16 | 16 |
17 class IndexedDBKey; | 17 class IndexedDBKey; |
18 class SerializedScriptValue; | 18 class SerializedScriptValue; |
19 | 19 |
20 namespace WebKit { | 20 namespace WebKit { |
21 class WebFrame; | 21 class WebFrame; |
22 class WebIDBKeyRange; | 22 class WebIDBKeyRange; |
23 class WebIDBTransaction; | 23 class WebIDBTransaction; |
24 } | 24 } |
25 | 25 |
26 // Handle the indexed db related communication for this entire renderer. | 26 // Handle the indexed db related communication for this entire renderer. |
27 class IndexedDBDispatcher { | 27 class IndexedDBDispatcher : public IPC::Channel::Listener { |
28 public: | 28 public: |
29 IndexedDBDispatcher(); | 29 IndexedDBDispatcher(); |
30 ~IndexedDBDispatcher(); | 30 ~IndexedDBDispatcher(); |
31 | 31 |
32 // Called to possibly handle the incoming IPC message. Returns true if | 32 // IPC::Channel::Listener implementation. |
33 // handled. | |
34 bool OnMessageReceived(const IPC::Message& msg); | 33 bool OnMessageReceived(const IPC::Message& msg); |
35 | 34 |
36 void RequestIDBFactoryOpen( | 35 void RequestIDBFactoryOpen( |
37 const string16& name, | 36 const string16& name, |
38 WebKit::WebIDBCallbacks* callbacks, | 37 WebKit::WebIDBCallbacks* callbacks, |
39 const string16& origin, | 38 const string16& origin, |
40 WebKit::WebFrame* web_frame, | 39 WebKit::WebFrame* web_frame, |
41 uint64 maximum_size); | 40 uint64 maximum_size); |
42 | 41 |
43 void RequestIDBCursorUpdate( | 42 void RequestIDBCursorUpdate( |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // Careful! WebIDBCallbacks wraps non-threadsafe data types. It must be | 144 // Careful! WebIDBCallbacks wraps non-threadsafe data types. It must be |
146 // destroyed and used on the same thread it was created on. | 145 // destroyed and used on the same thread it was created on. |
147 IDMap<WebKit::WebIDBCallbacks, IDMapOwnPointer> pending_callbacks_; | 146 IDMap<WebKit::WebIDBCallbacks, IDMapOwnPointer> pending_callbacks_; |
148 IDMap<WebKit::WebIDBTransactionCallbacks, IDMapOwnPointer> | 147 IDMap<WebKit::WebIDBTransactionCallbacks, IDMapOwnPointer> |
149 pending_transaction_callbacks_; | 148 pending_transaction_callbacks_; |
150 | 149 |
151 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); | 150 DISALLOW_COPY_AND_ASSIGN(IndexedDBDispatcher); |
152 }; | 151 }; |
153 | 152 |
154 #endif // CHROME_RENDERER_INDEXED_DB_DISPATCHER_H_ | 153 #endif // CHROME_RENDERER_INDEXED_DB_DISPATCHER_H_ |
OLD | NEW |