| OLD | NEW |
| 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 18 matching lines...) Expand all Loading... |
| 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 "wtf/PassRefPtr.h" | 31 #include "wtf/PassRefPtr.h" |
| 32 #include "wtf/RefPtr.h" | 32 #include "wtf/RefPtr.h" |
| 33 #include "wtf/text/WTFString.h" | 33 #include "wtf/text/WTFString.h" |
| 34 | 34 |
| 35 namespace WebCore { | 35 namespace WebCore { |
| 36 | 36 |
| 37 class IDBVersionChangeEvent : public Event { | 37 class IDBVersionChangeEvent : public Event { |
| 38 public: | 38 public: |
| 39 static PassRefPtr<IDBVersionChangeEvent> create(PassRefPtr<IDBAny> oldVersio
n = IDBAny::createNull(), PassRefPtr<IDBAny> newVersion = IDBAny::createNull(),
const AtomicString& eventType = AtomicString()); | 39 static PassRefPtr<IDBVersionChangeEvent> create(PassRefPtr<IDBAny> oldVersio
n = IDBAny::createNull(), PassRefPtr<IDBAny> newVersion = IDBAny::createNull(),
const AtomicString& eventType = AtomicString(), bool dataLoss = 0); |
| 40 virtual ~IDBVersionChangeEvent(); | 40 virtual ~IDBVersionChangeEvent(); |
| 41 | 41 |
| 42 virtual PassRefPtr<IDBAny> oldVersion() { return m_oldVersion; } | 42 virtual PassRefPtr<IDBAny> oldVersion() { return m_oldVersion; } |
| 43 virtual PassRefPtr<IDBAny> newVersion() { return m_newVersion; } | 43 virtual PassRefPtr<IDBAny> newVersion() { return m_newVersion; } |
| 44 virtual String dataLoss(); |
| 44 | 45 |
| 45 virtual const AtomicString& interfaceName() const; | 46 virtual const AtomicString& interfaceName() const; |
| 46 | 47 |
| 47 private: | 48 private: |
| 48 IDBVersionChangeEvent(PassRefPtr<IDBAny> oldVersion, PassRefPtr<IDBAny> newV
ersion, const AtomicString& eventType); | 49 IDBVersionChangeEvent(PassRefPtr<IDBAny> oldVersion, PassRefPtr<IDBAny> newV
ersion, const AtomicString& eventType, bool dataLoss); |
| 49 | 50 |
| 50 RefPtr<IDBAny> m_oldVersion; | 51 RefPtr<IDBAny> m_oldVersion; |
| 51 RefPtr<IDBAny> m_newVersion; | 52 RefPtr<IDBAny> m_newVersion; |
| 53 bool m_dataLoss; |
| 52 }; | 54 }; |
| 53 | 55 |
| 54 } // namespace WebCore | 56 } // namespace WebCore |
| 55 | 57 |
| 56 #endif // IDBVersionChangeEvent_h | 58 #endif // IDBVersionChangeEvent_h |
| OLD | NEW |