| 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 24 matching lines...) Expand all Loading... |
| 35 #include "public/platform/modules/indexeddb/WebIDBTypes.h" | 35 #include "public/platform/modules/indexeddb/WebIDBTypes.h" |
| 36 #include "wtf/PassRefPtr.h" | 36 #include "wtf/PassRefPtr.h" |
| 37 #include "wtf/RefPtr.h" | 37 #include "wtf/RefPtr.h" |
| 38 #include "wtf/text/WTFString.h" | 38 #include "wtf/text/WTFString.h" |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 class IDBVersionChangeEvent final : public Event { | 42 class IDBVersionChangeEvent final : public Event { |
| 43 DEFINE_WRAPPERTYPEINFO(); | 43 DEFINE_WRAPPERTYPEINFO(); |
| 44 public: | 44 public: |
| 45 static PassRefPtrWillBeRawPtr<IDBVersionChangeEvent> create() | 45 static RawPtr<IDBVersionChangeEvent> create() |
| 46 { | 46 { |
| 47 return adoptRefWillBeNoop(new IDBVersionChangeEvent()); | 47 return new IDBVersionChangeEvent(); |
| 48 } | 48 } |
| 49 static PassRefPtrWillBeRawPtr<IDBVersionChangeEvent> create(const AtomicStri
ng& eventType, unsigned long long oldVersion, const Nullable<unsigned long long>
& newVersion, WebIDBDataLoss dataLoss = WebIDBDataLossNone, const String& dataLo
ssMessage = String()) | 49 static RawPtr<IDBVersionChangeEvent> create(const AtomicString& eventType, u
nsigned long long oldVersion, const Nullable<unsigned long long>& newVersion, We
bIDBDataLoss dataLoss = WebIDBDataLossNone, const String& dataLossMessage = Stri
ng()) |
| 50 { | 50 { |
| 51 return adoptRefWillBeNoop(new IDBVersionChangeEvent(eventType, oldVersio
n, newVersion, dataLoss, dataLossMessage)); | 51 return new IDBVersionChangeEvent(eventType, oldVersion, newVersion, data
Loss, dataLossMessage); |
| 52 } | 52 } |
| 53 static PassRefPtrWillBeRawPtr<IDBVersionChangeEvent> create(const AtomicStri
ng& eventType, const IDBVersionChangeEventInit& initializer) | 53 static RawPtr<IDBVersionChangeEvent> create(const AtomicString& eventType, c
onst IDBVersionChangeEventInit& initializer) |
| 54 { | 54 { |
| 55 return adoptRefWillBeNoop(new IDBVersionChangeEvent(eventType, initializ
er)); | 55 return new IDBVersionChangeEvent(eventType, initializer); |
| 56 } | 56 } |
| 57 | 57 |
| 58 unsigned long long oldVersion() const { return m_oldVersion; } | 58 unsigned long long oldVersion() const { return m_oldVersion; } |
| 59 unsigned long long newVersion(bool& isNull) const; | 59 unsigned long long newVersion(bool& isNull) const; |
| 60 | 60 |
| 61 const AtomicString& dataLoss() const; | 61 const AtomicString& dataLoss() const; |
| 62 const String& dataLossMessage() const { return m_dataLossMessage; } | 62 const String& dataLossMessage() const { return m_dataLossMessage; } |
| 63 | 63 |
| 64 const AtomicString& interfaceName() const override; | 64 const AtomicString& interfaceName() const override; |
| 65 | 65 |
| 66 DECLARE_VIRTUAL_TRACE(); | 66 DECLARE_VIRTUAL_TRACE(); |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 IDBVersionChangeEvent(); | 69 IDBVersionChangeEvent(); |
| 70 IDBVersionChangeEvent(const AtomicString& eventType, unsigned long long oldV
ersion, const Nullable<unsigned long long>& newVersion, WebIDBDataLoss, const St
ring& dataLoss); | 70 IDBVersionChangeEvent(const AtomicString& eventType, unsigned long long oldV
ersion, const Nullable<unsigned long long>& newVersion, WebIDBDataLoss, const St
ring& dataLoss); |
| 71 IDBVersionChangeEvent(const AtomicString& eventType, const IDBVersionChangeE
ventInit&); | 71 IDBVersionChangeEvent(const AtomicString& eventType, const IDBVersionChangeE
ventInit&); |
| 72 | 72 |
| 73 unsigned long long m_oldVersion; | 73 unsigned long long m_oldVersion; |
| 74 Nullable<unsigned long long> m_newVersion; | 74 Nullable<unsigned long long> m_newVersion; |
| 75 WebIDBDataLoss m_dataLoss; | 75 WebIDBDataLoss m_dataLoss; |
| 76 String m_dataLossMessage; | 76 String m_dataLossMessage; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace blink | 79 } // namespace blink |
| 80 | 80 |
| 81 #endif // IDBVersionChangeEvent_h | 81 #endif // IDBVersionChangeEvent_h |
| OLD | NEW |