Integrate Mojo JS validation bindings with the Router

Instad of generating exported validateFooRequest(),
validateFooResponse() methods, a pointer to a validation
functions is added to the generated Stub and Proxy class
prototypes. For example, given an interface Foo, with
client interface FooClient:

  FooStub.prototype.validators = [validateFooRequest];
  FooProxy.prototype.validators = [validateFooResponse];

Note that if interface Foo has no callbacks, then
FooProxy.prototype.validators is an empty array.

The router validates incoming messages using these functions
and validateMessageHeader().

BUG=407181

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

Cr-Commit-Position: refs/heads/master@{#292270}


CrOS-Libchrome-Original-Commit: 08768f75fe85867797a826fc53f555d592cfda5c
5 files changed
tree: 415791d380cbce87cb3ba116950a997c283425f1
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/