Add keys(), values() and entries() methods on iterable<> interfaces

Change the IDL code generator to add keys(), values() and entries()
methods to interfaces with an iterable<> definition.

Also add utility (mixin) base-classes for iterable interfaces,
ValueIterable<> and PairIterable<>, that take care of most of the work
of supporting iterable<> IDL definitions on the C++ side, i.e.
implementing keys(), values(), entries() and @@iterator.

Finally, update the two interfaces with iterable<> definitions
(core/testing/Internals.idl and modules/fetch/Headers.idl) to inherit
the new utility base classes. Internals has a "value iterator" and thus
inherits ValueIterable<>, while Headers has a "pair iterator" and
inherits PairIterable<>. Update existing tests for each to test the new
keys(), values() and entries() methods.

BUG=432683

Review URL: https://codereview.chromium.org/848673002

git-svn-id: svn://svn.chromium.org/blink/trunk@188364 bbb929c8-8fbe-4397-9dbb-9b2b20218538
12 files changed
tree: 4137bb2b107fc37104edb5fbe6784575e6ee6a09
  1. third_party/