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

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

Issue 17060008: Add dataLoss property to IDB's upgradeneeded event (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add blink API stub for compatibility with and without chromium changes Created 7 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 10 matching lines...) Expand all
21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef IDBVersionChangeEvent_h 26 #ifndef IDBVersionChangeEvent_h
27 #define IDBVersionChangeEvent_h 27 #define IDBVersionChangeEvent_h
28 28
29 #include "core/dom/Event.h" 29 #include "core/dom/Event.h"
30 #include "modules/indexeddb/IDBAny.h" 30 #include "modules/indexeddb/IDBAny.h"
31 #include "public/platform/WebIDBCallbacks.h"
31 #include "wtf/PassRefPtr.h" 32 #include "wtf/PassRefPtr.h"
32 #include "wtf/RefPtr.h" 33 #include "wtf/RefPtr.h"
33 #include "wtf/text/WTFString.h" 34 #include "wtf/text/WTFString.h"
34 35
35 namespace WebCore { 36 namespace WebCore {
36 37
37 class IDBVersionChangeEvent : public Event { 38 class IDBVersionChangeEvent : public Event {
38 public: 39 public:
39 static PassRefPtr<IDBVersionChangeEvent> create(PassRefPtr<IDBAny> oldVersio n = IDBAny::createNull(), PassRefPtr<IDBAny> newVersion = IDBAny::createNull(), const AtomicString& eventType = AtomicString()); 40 static PassRefPtr<IDBVersionChangeEvent> create(PassRefPtr<IDBAny> oldVersio n = IDBAny::createNull(), PassRefPtr<IDBAny> newVersion = IDBAny::createNull(), const AtomicString& eventType = AtomicString(), WebKit::WebIDBCallbacks::DataLos s = WebKit::WebIDBCallbacks::DataLossNone);
40 virtual ~IDBVersionChangeEvent(); 41 virtual ~IDBVersionChangeEvent();
41 42
42 virtual PassRefPtr<IDBAny> oldVersion() { return m_oldVersion; } 43 virtual PassRefPtr<IDBAny> oldVersion() { return m_oldVersion; }
43 virtual PassRefPtr<IDBAny> newVersion() { return m_newVersion; } 44 virtual PassRefPtr<IDBAny> newVersion() { return m_newVersion; }
45 virtual const AtomicString& dataLoss();
44 46
45 virtual const AtomicString& interfaceName() const; 47 virtual const AtomicString& interfaceName() const;
46 48
47 private: 49 private:
48 IDBVersionChangeEvent(PassRefPtr<IDBAny> oldVersion, PassRefPtr<IDBAny> newV ersion, const AtomicString& eventType); 50 IDBVersionChangeEvent(PassRefPtr<IDBAny> oldVersion, PassRefPtr<IDBAny> newV ersion, const AtomicString& eventType, WebKit::WebIDBCallbacks::DataLoss);
49 51
50 RefPtr<IDBAny> m_oldVersion; 52 RefPtr<IDBAny> m_oldVersion;
51 RefPtr<IDBAny> m_newVersion; 53 RefPtr<IDBAny> m_newVersion;
54 bool m_dataLoss;
52 }; 55 };
53 56
54 } // namespace WebCore 57 } // namespace WebCore
55 58
56 #endif // IDBVersionChangeEvent_h 59 #endif // IDBVersionChangeEvent_h
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/IDBOpenDBRequest.cpp ('k') | Source/modules/indexeddb/IDBVersionChangeEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698