OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Apple 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 25 matching lines...) Expand all Loading... |
36 struct StorageEventInit : public EventInit { | 36 struct StorageEventInit : public EventInit { |
37 StorageEventInit(); | 37 StorageEventInit(); |
38 | 38 |
39 String key; | 39 String key; |
40 String oldValue; | 40 String oldValue; |
41 String newValue; | 41 String newValue; |
42 String url; | 42 String url; |
43 RefPtr<Storage> storageArea; | 43 RefPtr<Storage> storageArea; |
44 }; | 44 }; |
45 | 45 |
46 class StorageEvent : public Event { | 46 class StorageEvent FINAL : public Event { |
47 public: | 47 public: |
48 static PassRefPtr<StorageEvent> create(); | 48 static PassRefPtr<StorageEvent> create(); |
49 static PassRefPtr<StorageEvent> create(const AtomicString& type, const Strin
g& key, const String& oldValue, const String& newValue, const String& url, Stora
ge* storageArea); | 49 static PassRefPtr<StorageEvent> create(const AtomicString& type, const Strin
g& key, const String& oldValue, const String& newValue, const String& url, Stora
ge* storageArea); |
50 static PassRefPtr<StorageEvent> create(const AtomicString&, const StorageEve
ntInit&); | 50 static PassRefPtr<StorageEvent> create(const AtomicString&, const StorageEve
ntInit&); |
51 virtual ~StorageEvent(); | 51 virtual ~StorageEvent(); |
52 | 52 |
53 const String& key() const { return m_key; } | 53 const String& key() const { return m_key; } |
54 const String& oldValue() const { return m_oldValue; } | 54 const String& oldValue() const { return m_oldValue; } |
55 const String& newValue() const { return m_newValue; } | 55 const String& newValue() const { return m_newValue; } |
56 const String& url() const { return m_url; } | 56 const String& url() const { return m_url; } |
57 Storage* storageArea() const { return m_storageArea.get(); } | 57 Storage* storageArea() const { return m_storageArea.get(); } |
58 Storage* storageArea(bool& isNull) const { isNull = !m_storageArea; return m
_storageArea.get(); } | 58 Storage* storageArea(bool& isNull) const { isNull = !m_storageArea; return m
_storageArea.get(); } |
59 | 59 |
60 void initStorageEvent(const AtomicString& type, bool canBubble, bool cancela
ble, const String& key, const String& oldValue, const String& newValue, const St
ring& url, Storage* storageArea); | 60 void initStorageEvent(const AtomicString& type, bool canBubble, bool cancela
ble, const String& key, const String& oldValue, const String& newValue, const St
ring& url, Storage* storageArea); |
61 | 61 |
62 // Needed once we support init<blank>EventNS | 62 // Needed once we support init<blank>EventNS |
63 // void initStorageEventNS(in DOMString namespaceURI, in DOMString typeArg,
in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMSt
ring oldValueArg, in DOMString newValueArg, in DOMString urlArg, Storage storage
AreaArg); | 63 // void initStorageEventNS(in DOMString namespaceURI, in DOMString typeArg,
in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMSt
ring oldValueArg, in DOMString newValueArg, in DOMString urlArg, Storage storage
AreaArg); |
64 | 64 |
65 virtual const AtomicString& interfaceName() const; | 65 virtual const AtomicString& interfaceName() const OVERRIDE; |
66 | 66 |
67 private: | 67 private: |
68 StorageEvent(); | 68 StorageEvent(); |
69 StorageEvent(const AtomicString& type, const String& key, const String& oldV
alue, const String& newValue, const String& url, Storage* storageArea); | 69 StorageEvent(const AtomicString& type, const String& key, const String& oldV
alue, const String& newValue, const String& url, Storage* storageArea); |
70 StorageEvent(const AtomicString&, const StorageEventInit&); | 70 StorageEvent(const AtomicString&, const StorageEventInit&); |
71 | 71 |
72 String m_key; | 72 String m_key; |
73 String m_oldValue; | 73 String m_oldValue; |
74 String m_newValue; | 74 String m_newValue; |
75 String m_url; | 75 String m_url; |
76 RefPtr<Storage> m_storageArea; | 76 RefPtr<Storage> m_storageArea; |
77 }; | 77 }; |
78 | 78 |
79 } // namespace WebCore | 79 } // namespace WebCore |
80 | 80 |
81 #endif // StorageEvent_h | 81 #endif // StorageEvent_h |
OLD | NEW |