[Chromecast] Add built-in V8 bindings for Cast
Adds several built-in V8 bindings for the Cast Browser. These bindings
are backed by Mojo interfaces hosted in the Cast Service. The logic for
these bindings is unchanged compared to their internal implementations.
Detailed changes:
* Removed several methods from CastContentWindow::Delegate, replaced by
GestureRouter helper class which is used by CastWindowManagerBindings.
* Add FeatureManager class to handle renderer feature configuration.
Merge-With: eureka-internal/661924
Bug: b/149041392
Test: Cast CQ, build/run on display Assistant.
Change-Id: I50960113a4e2483051f85e42c78b9bb5dc494aa8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3206534
Commit-Queue: Sean Topping <[email protected]>
Reviewed-by: Jiawei Li <[email protected]>
Reviewed-by: Junbo Ke <[email protected]>
Cr-Commit-Position: refs/heads/main@{#930780}
diff --git a/chromecast/browser/cast_web_contents.h b/chromecast/browser/cast_web_contents.h
index c79b720..3a0e0a8 100644
--- a/chromecast/browser/cast_web_contents.h
+++ b/chromecast/browser/cast_web_contents.h
@@ -18,6 +18,7 @@
#include "chromecast/browser/mojom/cast_web_contents.mojom.h"
#include "chromecast/browser/web_types.h"
#include "chromecast/common/mojom/feature_manager.mojom.h"
+#include "chromecast/mojo/interface_bundle.h"
#include "content/public/common/media_playback_renderer_type.mojom.h"
#include "mojo/public/cpp/bindings/generic_pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
@@ -255,6 +256,9 @@
// registry or any registered InterfaceProvider.
virtual bool TryBindReceiver(mojo::GenericPendingReceiver& receiver) = 0;
+ // Locally-registered interfaces which are exposed to render frames.
+ virtual InterfaceBundle* local_interfaces() = 0;
+
// Used for owner to pass its |InterfaceProvider| pointers to CastWebContents.
// It is owner's responsibility to make sure each |InterfaceProvider| pointer
// has distinct mojo interface set.