| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2009 Google 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // The HTML5 DOM Storage API | 58 // The HTML5 DOM Storage API |
| 59 unsigned length(ExceptionState&, LocalFrame* sourceFrame); | 59 unsigned length(ExceptionState&, LocalFrame* sourceFrame); |
| 60 String key(unsigned index, ExceptionState&, LocalFrame* sourceFrame); | 60 String key(unsigned index, ExceptionState&, LocalFrame* sourceFrame); |
| 61 String getItem(const String& key, ExceptionState&, LocalFrame* sourceFrame); | 61 String getItem(const String& key, ExceptionState&, LocalFrame* sourceFrame); |
| 62 void setItem(const String& key, const String& value, ExceptionState&, LocalF
rame* sourceFrame); | 62 void setItem(const String& key, const String& value, ExceptionState&, LocalF
rame* sourceFrame); |
| 63 void removeItem(const String& key, ExceptionState&, LocalFrame* sourceFrame)
; | 63 void removeItem(const String& key, ExceptionState&, LocalFrame* sourceFrame)
; |
| 64 void clear(ExceptionState&, LocalFrame* sourceFrame); | 64 void clear(ExceptionState&, LocalFrame* sourceFrame); |
| 65 bool contains(const String& key, ExceptionState&, LocalFrame* sourceFrame); | 65 bool contains(const String& key, ExceptionState&, LocalFrame* sourceFrame); |
| 66 | 66 |
| 67 bool canAccessStorage(LocalFrame*); | 67 bool canAccessStorage(LocalFrame*); |
| 68 size_t memoryBytesUsedByCache(); | |
| 69 | 68 |
| 70 static void dispatchLocalStorageEvent(const String& key, const String& oldVa
lue, const String& newValue, | 69 static void dispatchLocalStorageEvent(const String& key, const String& oldVa
lue, const String& newValue, |
| 71 SecurityOrigin*, const KURL& pageURL, WebStorageArea* sourceAreaInstance
); | 70 SecurityOrigin*, const KURL& pageURL, WebStorageArea* sourceAreaInstance
); |
| 72 static void dispatchSessionStorageEvent(const String& key, const String& old
Value, const String& newValue, | 71 static void dispatchSessionStorageEvent(const String& key, const String& old
Value, const String& newValue, |
| 73 SecurityOrigin*, const KURL& pageURL, const WebStorageNamespace&, WebSto
rageArea* sourceAreaInstance); | 72 SecurityOrigin*, const KURL& pageURL, const WebStorageNamespace&, WebSto
rageArea* sourceAreaInstance); |
| 74 | 73 |
| 75 DECLARE_TRACE(); | 74 DECLARE_TRACE(); |
| 76 | 75 |
| 77 private: | 76 private: |
| 78 StorageArea(PassOwnPtr<WebStorageArea>, StorageType); | 77 StorageArea(PassOwnPtr<WebStorageArea>, StorageType); |
| 79 | 78 |
| 80 static bool isEventSource(Storage*, WebStorageArea* sourceAreaInstance); | 79 static bool isEventSource(Storage*, WebStorageArea* sourceAreaInstance); |
| 81 | 80 |
| 82 OwnPtr<WebStorageArea> m_storageArea; | 81 OwnPtr<WebStorageArea> m_storageArea; |
| 83 StorageType m_storageType; | 82 StorageType m_storageType; |
| 84 bool m_canAccessStorageCachedResult; | 83 bool m_canAccessStorageCachedResult; |
| 85 }; | 84 }; |
| 86 | 85 |
| 87 } // namespace blink | 86 } // namespace blink |
| 88 | 87 |
| 89 #endif // StorageArea_h | 88 #endif // StorageArea_h |
| OLD | NEW |