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

Unified Diff: Source/modules/encryptedmedia/MediaKeyStatusMap.h

Issue 920713002: Add Maplike<> utility mixin class for implementing maplike interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-iterable-etc-typedefs
Patch Set: drop some includes Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Maplike.h ('k') | Source/modules/encryptedmedia/MediaKeyStatusMap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/encryptedmedia/MediaKeyStatusMap.h
diff --git a/Source/modules/encryptedmedia/MediaKeyStatusMap.h b/Source/modules/encryptedmedia/MediaKeyStatusMap.h
index 9cdde0152604096b9244e19fff012fb46233c6ab..823f49e8f63831dd815911deaa8d7751ae6de9a5 100644
--- a/Source/modules/encryptedmedia/MediaKeyStatusMap.h
+++ b/Source/modules/encryptedmedia/MediaKeyStatusMap.h
@@ -6,8 +6,9 @@
#define MediaKeyStatusMap_h
#include "bindings/core/v8/ScriptWrappable.h"
+#include "bindings/core/v8/UnionTypesCore.h"
#include "core/dom/DOMArrayPiece.h"
-#include "core/dom/Iterable.h"
+#include "core/dom/Maplike.h"
#include "platform/heap/Heap.h"
namespace blink {
@@ -21,7 +22,7 @@ class WebData;
// status known to a particular session. Since it can be updated any time there
// is a keychange event, iteration order and completeness is not guaranteed
// if the event loop runs.
-class MediaKeyStatusMap final : public GarbageCollected<MediaKeyStatusMap>, public ScriptWrappable, public PairIterable<DOMArrayBuffer*, String> {
+class MediaKeyStatusMap final : public GarbageCollected<MediaKeyStatusMap>, public ScriptWrappable, public Maplike<ArrayBufferOrArrayBufferView, String> {
DEFINE_WRAPPERTYPEINFO();
private:
// MapEntry holds the keyId (DOMArrayBuffer) and status (MediaKeyStatus as
@@ -41,13 +42,12 @@ public:
// IDL attributes / methods
size_t size() const { return m_entries.size(); }
- String get(const DOMArrayPiece& key);
- bool has(const DOMArrayPiece& key) const;
virtual void trace(Visitor*);
private:
IterationSource* startIteration(ScriptState*, ExceptionState&) override;
+ bool getMapEntry(ScriptState*, const ArrayBufferOrArrayBufferView&, String&, ExceptionState&) override;
size_t indexOf(const DOMArrayPiece& key) const;
« no previous file with comments | « Source/core/dom/Maplike.h ('k') | Source/modules/encryptedmedia/MediaKeyStatusMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698