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/RefCounted.h" | 35 #include "wtf/RefCounted.h" |
36 #include "wtf/RefPtr.h" | 36 #include "wtf/RefPtr.h" |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
40 class ExceptionState; | 40 class ExceptionState; |
41 class LocalFrame; | 41 class LocalFrame; |
42 | 42 |
43 class Storage FINAL : public RefCountedWillBeGarbageCollectedFinalized<Storage>,
public ScriptWrappable, public DOMWindowProperty { | 43 class Storage FINAL : public RefCountedWillBeGarbageCollectedFinalized<Storage>,
public ScriptWrappable, public DOMWindowProperty { |
| 44 DEFINE_WRAPPERTYPEINFO(); |
44 public: | 45 public: |
45 static PassRefPtrWillBeRawPtr<Storage> create(LocalFrame*, PassOwnPtrWillBeR
awPtr<StorageArea>); | 46 static PassRefPtrWillBeRawPtr<Storage> create(LocalFrame*, PassOwnPtrWillBeR
awPtr<StorageArea>); |
46 virtual ~Storage(); | 47 virtual ~Storage(); |
47 | 48 |
48 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); } |
49 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); } |
50 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); } |
51 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); } |
52 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); } |
53 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... |
68 | 69 |
69 private: | 70 private: |
70 Storage(LocalFrame*, PassOwnPtrWillBeRawPtr<StorageArea>); | 71 Storage(LocalFrame*, PassOwnPtrWillBeRawPtr<StorageArea>); |
71 | 72 |
72 OwnPtrWillBeMember<StorageArea> m_storageArea; | 73 OwnPtrWillBeMember<StorageArea> m_storageArea; |
73 }; | 74 }; |
74 | 75 |
75 } // namespace blink | 76 } // namespace blink |
76 | 77 |
77 #endif // Storage_h | 78 #endif // Storage_h |
OLD | NEW |