Commit 4600b290 authored by Hongchan Choi's avatar Hongchan Choi Committed by Commit Bot

Expose the internal HeapHashMap for the parameter iteration

For easier iteration of stored AudioParam in the AudioParamMap,
this CL exposes the HeapHashMap (const) via a getter method. This is
a part of the graph event reporting POC CL:
https://chromium-review.googlesource.com/c/chromium/src/+/1696004

Additionally two unused methods are removed because now the customer
can directly access the map with the getter.

Bug: 970898
Change-Id: I8932d353fcbf8258f1364a741d46da2d6314afc0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1716092Reviewed-by: default avatarRaymond Toy <rtoy@chromium.org>
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#680222}
parent 54b73748
......@@ -22,14 +22,14 @@ class AudioParamMap final : public ScriptWrappable,
DEFINE_WRAPPERTYPEINFO();
public:
explicit AudioParamMap(
const HeapHashMap<String, Member<AudioParam>>& parameter_map);
using MapType = HeapHashMap<String, Member<AudioParam>>;
explicit AudioParamMap(const MapType& parameter_map);
// IDL attributes / methods
uint32_t size() const { return parameter_map_.size(); }
AudioParam* At(String name) { return parameter_map_.at(name); }
bool Contains(String name) { return parameter_map_.Contains(name); }
const MapType& GetHashMap() const { return parameter_map_; }
void Trace(blink::Visitor* visitor) override {
visitor->Trace(parameter_map_);
......@@ -45,7 +45,7 @@ class AudioParamMap final : public ScriptWrappable,
AudioParam*&,
ExceptionState&) override;
const HeapHashMap<String, Member<AudioParam>> parameter_map_;
const MapType parameter_map_;
};
} // namespace blink
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment