[wire] Add spanified interfaces for command handling.

Bug: 528027992
Change-Id: Ieba8350272c152b7c3a858529f15681e2dbd7615
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/320695
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/include/dawn/wire/Wire.h b/include/dawn/wire/Wire.h
index 872588b..758b0a8 100644
--- a/include/dawn/wire/Wire.h
+++ b/include/dawn/wire/Wire.h
@@ -32,6 +32,7 @@
 
 #include <cstdint>
 #include <limits>
+#include <span>
 
 #include "dawn/wire/dawn_wire_export.h"
 
@@ -61,7 +62,15 @@
     CommandHandler(const CommandHandler& rhs) = delete;
     CommandHandler& operator=(const CommandHandler& rhs) = delete;
 
-    virtual const volatile char* HandleCommands(const volatile char* commands, size_t size) = 0;
+    virtual const volatile char* HandleCommands(const volatile char* commands, size_t size) {
+        // TODO(https://crbug.com/528027992): Remove in favor of the version below once Chromium
+        // implements it.
+        return nullptr;
+    }
+    virtual bool HandleCommands(std::span<const volatile std::byte> commands) {
+        // TODO(https://crbug.com/528027992): Make pure virtual once Chromium implements it.
+        return {};
+    }
 };
 
 // Handle struct that are used to uniquely represent an object of a particular type in the wire.