| 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 #ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ |
| 6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 class SerializedScriptValue; | 36 class SerializedScriptValue; |
| 37 } | 37 } |
| 38 | 38 |
| 39 // Handles all IndexedDB related messages from a particular renderer process. | 39 // Handles all IndexedDB related messages from a particular renderer process. |
| 40 class IndexedDBDispatcherHost : public BrowserMessageFilter { | 40 class IndexedDBDispatcherHost : public BrowserMessageFilter { |
| 41 public: | 41 public: |
| 42 // Only call the constructor from the UI thread. | 42 // Only call the constructor from the UI thread. |
| 43 IndexedDBDispatcherHost(int process_id, WebKitContext* webkit_context); | 43 IndexedDBDispatcherHost(int process_id, WebKitContext* webkit_context); |
| 44 | 44 |
| 45 // BrowserMessageFilter implementation. | 45 // BrowserMessageFilter implementation. |
| 46 virtual void OnChannelClosing(); | 46 virtual void OnChannelClosing() OVERRIDE; |
| 47 virtual void OverrideThreadForMessage(const IPC::Message& message, | 47 virtual void OverrideThreadForMessage( |
| 48 content::BrowserThread::ID* thread); | 48 const IPC::Message& message, |
| 49 content::BrowserThread::ID* thread) OVERRIDE; |
| 49 virtual bool OnMessageReceived(const IPC::Message& message, | 50 virtual bool OnMessageReceived(const IPC::Message& message, |
| 50 bool* message_was_ok); | 51 bool* message_was_ok) OVERRIDE; |
| 51 | 52 |
| 52 void TransactionComplete(int32 transaction_id); | 53 void TransactionComplete(int32 transaction_id); |
| 53 | 54 |
| 54 // A shortcut for accessing our context. | 55 // A shortcut for accessing our context. |
| 55 IndexedDBContext* Context() { | 56 IndexedDBContext* Context() { |
| 56 return webkit_context_->indexed_db_context(); | 57 return webkit_context_->indexed_db_context(); |
| 57 } | 58 } |
| 58 | 59 |
| 59 // The various IndexedDBCallbacks children call these methods to add the | 60 // The various IndexedDBCallbacks children call these methods to add the |
| 60 // results into the applicable map. See below for more details. | 61 // results into the applicable map. See below for more details. |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_; | 282 scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_; |
| 282 scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_; | 283 scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_; |
| 283 | 284 |
| 284 // Used to dispatch messages to the correct view host. | 285 // Used to dispatch messages to the correct view host. |
| 285 int process_id_; | 286 int process_id_; |
| 286 | 287 |
| 287 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); | 288 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); |
| 288 }; | 289 }; |
| 289 | 290 |
| 290 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ | 291 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ |
| OLD | NEW |