Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Side by Side Diff: third_party/WebKit/Source/modules/storage/Storage.h

Issue 2375873003: Make DOMWindowProperty::m_frame private (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 26 matching lines...) Expand all
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 GarbageCollected<Storage>, public ScriptWrappable, public DOMWindowProperty { 42 class Storage final : public GarbageCollected<Storage>, public ScriptWrappable, public DOMWindowProperty {
43 DEFINE_WRAPPERTYPEINFO(); 43 DEFINE_WRAPPERTYPEINFO();
44 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 unsigned length(ExceptionState& ec) const { return m_storageArea->length(ec, m_frame); } 47 unsigned length(ExceptionState& ec) const { return m_storageArea->length(ec, frame()); }
48 String key(unsigned index, ExceptionState& ec) const { return m_storageArea- >key(index, ec, m_frame); } 48 String key(unsigned index, ExceptionState& ec) const { return m_storageArea- >key(index, ec, frame()); }
49 String getItem(const String& key, ExceptionState& ec) const { return m_stora geArea->getItem(key, ec, m_frame); } 49 String getItem(const String& key, ExceptionState& ec) const { return m_stora geArea->getItem(key, ec, frame()); }
50 void setItem(const String& key, const String& value, ExceptionState& ec) { m _storageArea->setItem(key, value, ec, m_frame); } 50 void setItem(const String& key, const String& value, ExceptionState& ec) { m _storageArea->setItem(key, value, ec, frame()); }
51 void removeItem(const String& key, ExceptionState& ec) { m_storageArea->remo veItem(key, ec, m_frame); } 51 void removeItem(const String& key, ExceptionState& ec) { m_storageArea->remo veItem(key, ec, frame()); }
52 void clear(ExceptionState& ec) { m_storageArea->clear(ec, m_frame); } 52 void clear(ExceptionState& ec) { m_storageArea->clear(ec, frame()); }
53 bool contains(const String& key, ExceptionState& ec) const { return m_storag eArea->contains(key, ec, m_frame); } 53 bool contains(const String& key, ExceptionState& ec) const { return m_storag eArea->contains(key, ec, frame()); }
54 54
55 StorageArea* area() const { return m_storageArea.get(); } 55 StorageArea* area() const { return m_storageArea.get(); }
56 56
57 String anonymousNamedGetter(const AtomicString&, ExceptionState&); 57 String anonymousNamedGetter(const AtomicString&, ExceptionState&);
58 bool anonymousNamedSetter(const AtomicString& name, const AtomicString& valu e, ExceptionState&); 58 bool anonymousNamedSetter(const AtomicString& name, const AtomicString& valu e, ExceptionState&);
59 DeleteResult anonymousNamedDeleter(const AtomicString&, ExceptionState&); 59 DeleteResult anonymousNamedDeleter(const AtomicString&, ExceptionState&);
60 void namedPropertyEnumerator(Vector<String>&, ExceptionState&); 60 void namedPropertyEnumerator(Vector<String>&, ExceptionState&);
61 bool namedPropertyQuery(const AtomicString&, ExceptionState&); 61 bool namedPropertyQuery(const AtomicString&, ExceptionState&);
62 62
63 DECLARE_VIRTUAL_TRACE(); 63 DECLARE_VIRTUAL_TRACE();
64 64
65 private: 65 private:
66 Storage(LocalFrame*, StorageArea*); 66 Storage(LocalFrame*, StorageArea*);
67 67
68 Member<StorageArea> m_storageArea; 68 Member<StorageArea> m_storageArea;
69 }; 69 };
70 70
71 } // namespace blink 71 } // namespace blink
72 72
73 #endif // Storage_h 73 #endif // Storage_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698