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 20 matching lines...) Expand all Loading... |
31 #include "modules/indexeddb/IDBRequest.h" | 31 #include "modules/indexeddb/IDBRequest.h" |
32 #include "public/platform/WebIDBTypes.h" | 32 #include "public/platform/WebIDBTypes.h" |
33 #include "wtf/PassRefPtr.h" | 33 #include "wtf/PassRefPtr.h" |
34 #include "wtf/RefPtr.h" | 34 #include "wtf/RefPtr.h" |
35 #include "wtf/text/WTFString.h" | 35 #include "wtf/text/WTFString.h" |
36 | 36 |
37 namespace WebCore { | 37 namespace WebCore { |
38 | 38 |
39 class IDBVersionChangeEvent FINAL : public Event { | 39 class IDBVersionChangeEvent FINAL : public Event { |
40 public: | 40 public: |
41 static PassRefPtr<IDBVersionChangeEvent> create(PassRefPtr<IDBAny> oldVersio
n = IDBAny::createNull(), PassRefPtr<IDBAny> newVersion = IDBAny::createNull(),
const AtomicString& eventType = AtomicString(), blink::WebIDBDataLoss = blink::W
ebIDBDataLossNone, const String& dataLossMessage = String()); | 41 static PassRefPtrWillBeRawPtr<IDBVersionChangeEvent> create(PassRefPtr<IDBAn
y> oldVersion = IDBAny::createNull(), PassRefPtr<IDBAny> newVersion = IDBAny::cr
eateNull(), const AtomicString& eventType = AtomicString(), blink::WebIDBDataLos
s = blink::WebIDBDataLossNone, const String& dataLossMessage = String()); |
42 virtual ~IDBVersionChangeEvent(); | 42 virtual ~IDBVersionChangeEvent(); |
43 | 43 |
44 ScriptValue oldVersion(ExecutionContext*) const; | 44 ScriptValue oldVersion(ExecutionContext*) const; |
45 ScriptValue newVersion(ExecutionContext*) const; | 45 ScriptValue newVersion(ExecutionContext*) const; |
46 const AtomicString& dataLoss() const; | 46 const AtomicString& dataLoss() const; |
47 const String& dataLossMessage() const { return m_dataLossMessage; } | 47 const String& dataLossMessage() const { return m_dataLossMessage; } |
48 | 48 |
49 virtual const AtomicString& interfaceName() const OVERRIDE; | 49 virtual const AtomicString& interfaceName() const OVERRIDE; |
50 | 50 |
51 virtual void trace(Visitor*) OVERRIDE; | 51 virtual void trace(Visitor*) OVERRIDE; |
52 | 52 |
53 private: | 53 private: |
54 IDBVersionChangeEvent(PassRefPtr<IDBAny> oldVersion, PassRefPtr<IDBAny> newV
ersion, const AtomicString& eventType, blink::WebIDBDataLoss, const String& data
Loss); | 54 IDBVersionChangeEvent(PassRefPtr<IDBAny> oldVersion, PassRefPtr<IDBAny> newV
ersion, const AtomicString& eventType, blink::WebIDBDataLoss, const String& data
Loss); |
55 | 55 |
56 RefPtr<IDBAny> m_oldVersion; | 56 RefPtr<IDBAny> m_oldVersion; |
57 RefPtr<IDBAny> m_newVersion; | 57 RefPtr<IDBAny> m_newVersion; |
58 bool m_dataLoss; | 58 bool m_dataLoss; |
59 String m_dataLossMessage; | 59 String m_dataLossMessage; |
60 }; | 60 }; |
61 | 61 |
62 } // namespace WebCore | 62 } // namespace WebCore |
63 | 63 |
64 #endif // IDBVersionChangeEvent_h | 64 #endif // IDBVersionChangeEvent_h |
OLD | NEW |