| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 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 #include "wtf/Forward.h" | 34 #include "wtf/Forward.h" |
| 35 #include "wtf/RefPtr.h" | 35 #include "wtf/RefPtr.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 class ExceptionState; | 39 class ExceptionState; |
| 40 class LocalFrame; | 40 class LocalFrame; |
| 41 | 41 |
| 42 class Storage final : public GarbageCollectedFinalized<Storage>, public ScriptWr
appable, public DOMWindowProperty { | 42 class Storage final : public GarbageCollectedFinalized<Storage>, public ScriptWr
appable, public DOMWindowProperty { |
| 43 DEFINE_WRAPPERTYPEINFO(); | 43 DEFINE_WRAPPERTYPEINFO(); |
| 44 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Storage); | 44 USING_GARBAGE_COLLECTED_MIXIN(Storage); |
| 45 public: | 45 public: |
| 46 static Storage* create(LocalFrame*, StorageArea*); | 46 static Storage* create(LocalFrame*, StorageArea*); |
| 47 virtual ~Storage(); | 47 virtual ~Storage(); |
| 48 | 48 |
| 49 unsigned length(ExceptionState& ec) const { return m_storageArea->length(ec,
m_frame); } | 49 unsigned length(ExceptionState& ec) const { return m_storageArea->length(ec,
m_frame); } |
| 50 String key(unsigned index, ExceptionState& ec) const { return m_storageArea-
>key(index, ec, m_frame); } | 50 String key(unsigned index, ExceptionState& ec) const { return m_storageArea-
>key(index, ec, m_frame); } |
| 51 String getItem(const String& key, ExceptionState& ec) const { return m_stora
geArea->getItem(key, ec, m_frame); } | 51 String getItem(const String& key, ExceptionState& ec) const { return m_stora
geArea->getItem(key, ec, m_frame); } |
| 52 void setItem(const String& key, const String& value, ExceptionState& ec) { m
_storageArea->setItem(key, value, ec, m_frame); } | 52 void setItem(const String& key, const String& value, ExceptionState& ec) { m
_storageArea->setItem(key, value, ec, m_frame); } |
| 53 void removeItem(const String& key, ExceptionState& ec) { m_storageArea->remo
veItem(key, ec, m_frame); } | 53 void removeItem(const String& key, ExceptionState& ec) { m_storageArea->remo
veItem(key, ec, m_frame); } |
| 54 void clear(ExceptionState& ec) { m_storageArea->clear(ec, m_frame); } | 54 void clear(ExceptionState& ec) { m_storageArea->clear(ec, m_frame); } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 Storage(LocalFrame*, StorageArea*); | 71 Storage(LocalFrame*, StorageArea*); |
| 72 | 72 |
| 73 Member<StorageArea> m_storageArea; | 73 Member<StorageArea> m_storageArea; |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 } // namespace blink | 76 } // namespace blink |
| 77 | 77 |
| 78 #endif // Storage_h | 78 #endif // Storage_h |
| OLD | NEW |