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 23 matching lines...) Expand all Loading... |
34 { | 34 { |
35 } | 35 } |
36 | 36 |
37 PassRefPtrWillBeRawPtr<StorageEvent> StorageEvent::create() | 37 PassRefPtrWillBeRawPtr<StorageEvent> StorageEvent::create() |
38 { | 38 { |
39 return adoptRefWillBeNoop(new StorageEvent); | 39 return adoptRefWillBeNoop(new StorageEvent); |
40 } | 40 } |
41 | 41 |
42 StorageEvent::StorageEvent() | 42 StorageEvent::StorageEvent() |
43 { | 43 { |
44 ScriptWrappable::init(this); | |
45 } | 44 } |
46 | 45 |
47 StorageEvent::~StorageEvent() | 46 StorageEvent::~StorageEvent() |
48 { | 47 { |
49 } | 48 } |
50 | 49 |
51 PassRefPtrWillBeRawPtr<StorageEvent> StorageEvent::create(const AtomicString& ty
pe, const String& key, const String& oldValue, const String& newValue, const Str
ing& url, Storage* storageArea) | 50 PassRefPtrWillBeRawPtr<StorageEvent> StorageEvent::create(const AtomicString& ty
pe, const String& key, const String& oldValue, const String& newValue, const Str
ing& url, Storage* storageArea) |
52 { | 51 { |
53 return adoptRefWillBeNoop(new StorageEvent(type, key, oldValue, newValue, ur
l, storageArea)); | 52 return adoptRefWillBeNoop(new StorageEvent(type, key, oldValue, newValue, ur
l, storageArea)); |
54 } | 53 } |
55 | 54 |
56 PassRefPtrWillBeRawPtr<StorageEvent> StorageEvent::create(const AtomicString& ty
pe, const StorageEventInit& initializer) | 55 PassRefPtrWillBeRawPtr<StorageEvent> StorageEvent::create(const AtomicString& ty
pe, const StorageEventInit& initializer) |
57 { | 56 { |
58 return adoptRefWillBeNoop(new StorageEvent(type, initializer)); | 57 return adoptRefWillBeNoop(new StorageEvent(type, initializer)); |
59 } | 58 } |
60 | 59 |
61 StorageEvent::StorageEvent(const AtomicString& type, const String& key, const St
ring& oldValue, const String& newValue, const String& url, Storage* storageArea) | 60 StorageEvent::StorageEvent(const AtomicString& type, const String& key, const St
ring& oldValue, const String& newValue, const String& url, Storage* storageArea) |
62 : Event(type, false, false) | 61 : Event(type, false, false) |
63 , m_key(key) | 62 , m_key(key) |
64 , m_oldValue(oldValue) | 63 , m_oldValue(oldValue) |
65 , m_newValue(newValue) | 64 , m_newValue(newValue) |
66 , m_url(url) | 65 , m_url(url) |
67 , m_storageArea(storageArea) | 66 , m_storageArea(storageArea) |
68 { | 67 { |
69 ScriptWrappable::init(this); | |
70 } | 68 } |
71 | 69 |
72 StorageEvent::StorageEvent(const AtomicString& type, const StorageEventInit& ini
tializer) | 70 StorageEvent::StorageEvent(const AtomicString& type, const StorageEventInit& ini
tializer) |
73 : Event(type, initializer) | 71 : Event(type, initializer) |
74 , m_key(initializer.key) | 72 , m_key(initializer.key) |
75 , m_oldValue(initializer.oldValue) | 73 , m_oldValue(initializer.oldValue) |
76 , m_newValue(initializer.newValue) | 74 , m_newValue(initializer.newValue) |
77 , m_url(initializer.url) | 75 , m_url(initializer.url) |
78 , m_storageArea(initializer.storageArea) | 76 , m_storageArea(initializer.storageArea) |
79 { | 77 { |
80 ScriptWrappable::init(this); | |
81 } | 78 } |
82 | 79 |
83 void StorageEvent::initStorageEvent(const AtomicString& type, bool canBubble, bo
ol cancelable, const String& key, const String& oldValue, const String& newValue
, const String& url, Storage* storageArea) | 80 void StorageEvent::initStorageEvent(const AtomicString& type, bool canBubble, bo
ol cancelable, const String& key, const String& oldValue, const String& newValue
, const String& url, Storage* storageArea) |
84 { | 81 { |
85 if (dispatched()) | 82 if (dispatched()) |
86 return; | 83 return; |
87 | 84 |
88 initEvent(type, canBubble, cancelable); | 85 initEvent(type, canBubble, cancelable); |
89 | 86 |
90 m_key = key; | 87 m_key = key; |
91 m_oldValue = oldValue; | 88 m_oldValue = oldValue; |
92 m_newValue = newValue; | 89 m_newValue = newValue; |
93 m_url = url; | 90 m_url = url; |
94 m_storageArea = storageArea; | 91 m_storageArea = storageArea; |
95 } | 92 } |
96 | 93 |
97 const AtomicString& StorageEvent::interfaceName() const | 94 const AtomicString& StorageEvent::interfaceName() const |
98 { | 95 { |
99 return EventNames::StorageEvent; | 96 return EventNames::StorageEvent; |
100 } | 97 } |
101 | 98 |
102 void StorageEvent::trace(Visitor* visitor) | 99 void StorageEvent::trace(Visitor* visitor) |
103 { | 100 { |
104 visitor->trace(m_storageArea); | 101 visitor->trace(m_storageArea); |
105 Event::trace(visitor); | 102 Event::trace(visitor); |
106 } | 103 } |
107 | 104 |
108 } // namespace blink | 105 } // namespace blink |
OLD | NEW |