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

Side by Side Diff: Source/modules/indexeddb/IDBDatabase.h

Issue 23060037: IndexedDB: Return refs from a few const property accessors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/modules/indexeddb/IDBIndex.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 static PassRefPtr<IDBDatabase> create(ScriptExecutionContext*, PassRefPtr<ID BDatabaseBackendInterface>, PassRefPtr<IDBDatabaseCallbacks>); 52 static PassRefPtr<IDBDatabase> create(ScriptExecutionContext*, PassRefPtr<ID BDatabaseBackendInterface>, PassRefPtr<IDBDatabaseCallbacks>);
53 ~IDBDatabase(); 53 ~IDBDatabase();
54 54
55 void setMetadata(const IDBDatabaseMetadata& metadata) { m_metadata = metadat a; } 55 void setMetadata(const IDBDatabaseMetadata& metadata) { m_metadata = metadat a; }
56 void indexCreated(int64_t objectStoreId, const IDBIndexMetadata&); 56 void indexCreated(int64_t objectStoreId, const IDBIndexMetadata&);
57 void indexDeleted(int64_t objectStoreId, int64_t indexId); 57 void indexDeleted(int64_t objectStoreId, int64_t indexId);
58 void transactionCreated(IDBTransaction*); 58 void transactionCreated(IDBTransaction*);
59 void transactionFinished(IDBTransaction*); 59 void transactionFinished(IDBTransaction*);
60 60
61 // Implement the IDL 61 // Implement the IDL
62 const String name() const { return m_metadata.name; } 62 const String& name() const { return m_metadata.name; }
63 PassRefPtr<IDBAny> version() const; 63 PassRefPtr<IDBAny> version() const;
64 PassRefPtr<DOMStringList> objectStoreNames() const; 64 PassRefPtr<DOMStringList> objectStoreNames() const;
65 65
66 PassRefPtr<IDBObjectStore> createObjectStore(const String& name, const Dicti onary&, ExceptionState&); 66 PassRefPtr<IDBObjectStore> createObjectStore(const String& name, const Dicti onary&, ExceptionState&);
67 PassRefPtr<IDBObjectStore> createObjectStore(const String& name, const IDBKe yPath&, bool autoIncrement, ExceptionState&); 67 PassRefPtr<IDBObjectStore> createObjectStore(const String& name, const IDBKe yPath&, bool autoIncrement, ExceptionState&);
68 PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext* context, Pass RefPtr<DOMStringList> scope, const String& mode, ExceptionState& es) { return tr ansaction(context, *scope, mode, es); } 68 PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext* context, Pass RefPtr<DOMStringList> scope, const String& mode, ExceptionState& es) { return tr ansaction(context, *scope, mode, es); }
69 PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext*, const Vector <String>&, const String& mode, ExceptionState&); 69 PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext*, const Vector <String>&, const String& mode, ExceptionState&);
70 PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext*, const String &, const String& mode, ExceptionState&); 70 PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext*, const String &, const String& mode, ExceptionState&);
71 void deleteObjectStore(const String& name, ExceptionState&); 71 void deleteObjectStore(const String& name, ExceptionState&);
72 void close(); 72 void close();
(...skipping 11 matching lines...) Expand all
84 // ActiveDOMObject 84 // ActiveDOMObject
85 virtual bool hasPendingActivity() const OVERRIDE; 85 virtual bool hasPendingActivity() const OVERRIDE;
86 virtual void stop() OVERRIDE; 86 virtual void stop() OVERRIDE;
87 87
88 // EventTarget 88 // EventTarget
89 virtual const AtomicString& interfaceName() const; 89 virtual const AtomicString& interfaceName() const;
90 virtual ScriptExecutionContext* scriptExecutionContext() const; 90 virtual ScriptExecutionContext* scriptExecutionContext() const;
91 91
92 bool isClosePending() const { return m_closePending; } 92 bool isClosePending() const { return m_closePending; }
93 void forceClose(); 93 void forceClose();
94 const IDBDatabaseMetadata metadata() const { return m_metadata; } 94 const IDBDatabaseMetadata& metadata() const { return m_metadata; }
95 void enqueueEvent(PassRefPtr<Event>); 95 void enqueueEvent(PassRefPtr<Event>);
96 96
97 using EventTarget::dispatchEvent; 97 using EventTarget::dispatchEvent;
98 virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE; 98 virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
99 99
100 int64_t findObjectStoreId(const String& name) const; 100 int64_t findObjectStoreId(const String& name) const;
101 bool containsObjectStore(const String& name) const 101 bool containsObjectStore(const String& name) const
102 { 102 {
103 return findObjectStoreId(name) != IDBObjectStoreMetadata::InvalidId; 103 return findObjectStoreId(name) != IDBObjectStoreMetadata::InvalidId;
104 } 104 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // Keep track of the versionchange events waiting to be fired on this 149 // Keep track of the versionchange events waiting to be fired on this
150 // database so that we can cancel them if the database closes. 150 // database so that we can cancel them if the database closes.
151 Vector<RefPtr<Event> > m_enqueuedEvents; 151 Vector<RefPtr<Event> > m_enqueuedEvents;
152 152
153 RefPtr<IDBDatabaseCallbacks> m_databaseCallbacks; 153 RefPtr<IDBDatabaseCallbacks> m_databaseCallbacks;
154 }; 154 };
155 155
156 } // namespace WebCore 156 } // namespace WebCore
157 157
158 #endif // IDBDatabase_h 158 #endif // IDBDatabase_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/indexeddb/IDBIndex.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698