Add DawnCallback template to convert between base::OnceCallback and
Dawn C callbacks.

DawnCallback<Callback> is a heap-allocated version of
base::OnceCallback or base::RepeatingCallback.
It is allocated on the heap so that it can be reinterpret_cast to/from
DawnCallbackUserdata and passed to Dawn C callbacks.

Bug: 941536
Change-Id: I8912b14c81a2a44d16718aa9f2aa464ff0f77c6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1535573
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#644269}
2 files changed