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

Side by Side Diff: content/browser/in_process_webkit/indexed_db_dispatcher_host.h

Issue 8400061: IndexedDB: Recycle cursor objects when calling continue(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New version Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 // The various IndexedDBCallbacks children call these methods to add the 59 // The various IndexedDBCallbacks children call these methods to add the
60 // results into the applicable map. See below for more details. 60 // results into the applicable map. See below for more details.
61 int32 Add(WebKit::WebIDBCursor* idb_cursor); 61 int32 Add(WebKit::WebIDBCursor* idb_cursor);
62 int32 Add(WebKit::WebIDBDatabase* idb_database, const GURL& origin_url); 62 int32 Add(WebKit::WebIDBDatabase* idb_database, const GURL& origin_url);
63 int32 Add(WebKit::WebIDBIndex* idb_index); 63 int32 Add(WebKit::WebIDBIndex* idb_index);
64 int32 Add(WebKit::WebIDBObjectStore* idb_object_store); 64 int32 Add(WebKit::WebIDBObjectStore* idb_object_store);
65 int32 Add(WebKit::WebIDBTransaction* idb_transaction, const GURL& origin_url); 65 int32 Add(WebKit::WebIDBTransaction* idb_transaction, const GURL& origin_url);
66 int32 Add(WebKit::WebDOMStringList* domStringList); 66 int32 Add(WebKit::WebDOMStringList* domStringList);
67 67
68 WebKit::WebIDBCursor* getCursorFromId(int32 cursor_id) {
69 return GetOrTerminateProcess(&cursor_dispatcher_host_->map_, cursor_id);
70 }
71
68 private: 72 private:
69 virtual ~IndexedDBDispatcherHost(); 73 virtual ~IndexedDBDispatcherHost();
70 74
71 // Message processing. Most of the work is delegated to the dispatcher hosts 75 // Message processing. Most of the work is delegated to the dispatcher hosts
72 // below. 76 // below.
73 void OnIDBFactoryGetDatabaseNames( 77 void OnIDBFactoryGetDatabaseNames(
74 const IndexedDBHostMsg_FactoryGetDatabaseNames_Params& p); 78 const IndexedDBHostMsg_FactoryGetDatabaseNames_Params& p);
75 void OnIDBFactoryOpen(const IndexedDBHostMsg_FactoryOpen_Params& p); 79 void OnIDBFactoryOpen(const IndexedDBHostMsg_FactoryOpen_Params& p);
76 80
77 void OnIDBFactoryDeleteDatabase( 81 void OnIDBFactoryDeleteDatabase(
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_; 283 scoped_ptr<CursorDispatcherHost> cursor_dispatcher_host_;
280 scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_; 284 scoped_ptr<TransactionDispatcherHost> transaction_dispatcher_host_;
281 285
282 // Used to dispatch messages to the correct view host. 286 // Used to dispatch messages to the correct view host.
283 int process_id_; 287 int process_id_;
284 288
285 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost); 289 DISALLOW_IMPLICIT_CONSTRUCTORS(IndexedDBDispatcherHost);
286 }; 290 };
287 291
288 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_ 292 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698