| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 if (initializer.hasOldValue()) | 73 if (initializer.hasOldValue()) |
| 74 m_oldValue = initializer.oldValue(); | 74 m_oldValue = initializer.oldValue(); |
| 75 if (initializer.hasNewValue()) | 75 if (initializer.hasNewValue()) |
| 76 m_newValue = initializer.newValue(); | 76 m_newValue = initializer.newValue(); |
| 77 if (initializer.hasURL()) | 77 if (initializer.hasURL()) |
| 78 m_url = initializer.url(); | 78 m_url = initializer.url(); |
| 79 if (initializer.hasStorageArea()) | 79 if (initializer.hasStorageArea()) |
| 80 m_storageArea = initializer.storageArea(); | 80 m_storageArea = initializer.storageArea(); |
| 81 } | 81 } |
| 82 | 82 |
| 83 Storage* StorageEvent::storageArea() const | |
| 84 { | |
| 85 return m_storageArea.get(); | |
| 86 } | |
| 87 | |
| 88 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) | 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) |
| 89 { | 84 { |
| 90 if (dispatched()) | 85 if (dispatched()) |
| 91 return; | 86 return; |
| 92 | 87 |
| 93 initEvent(type, canBubble, cancelable); | 88 initEvent(type, canBubble, cancelable); |
| 94 | 89 |
| 95 m_key = key; | 90 m_key = key; |
| 96 m_oldValue = oldValue; | 91 m_oldValue = oldValue; |
| 97 m_newValue = newValue; | 92 m_newValue = newValue; |
| 98 m_url = url; | 93 m_url = url; |
| 99 m_storageArea = storageArea; | 94 m_storageArea = storageArea; |
| 100 } | 95 } |
| 101 | 96 |
| 102 const AtomicString& StorageEvent::interfaceName() const | 97 const AtomicString& StorageEvent::interfaceName() const |
| 103 { | 98 { |
| 104 return EventNames::StorageEvent; | 99 return EventNames::StorageEvent; |
| 105 } | 100 } |
| 106 | 101 |
| 107 DEFINE_TRACE(StorageEvent) | 102 DEFINE_TRACE(StorageEvent) |
| 108 { | 103 { |
| 109 visitor->trace(m_storageArea); | 104 visitor->trace(m_storageArea); |
| 110 Event::trace(visitor); | 105 Event::trace(visitor); |
| 111 } | 106 } |
| 112 | 107 |
| 113 } // namespace blink | 108 } // namespace blink |
| OLD | NEW |