[chromecast] Add local observer API for when inner CastWebContents is
created.

All the CastWebContents created during Cast session must use the same
URL request rewrite rules. In order to apply those rules to inner
contents inside the browser process, a local notification is added to
CastWebContents::Observer.

Bug: b:199790933
Test: none (tested in the chained CL)
Change-Id: I938eda7a4fdf42f8cac8c90f899697d451b26e6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3309536
Reviewed-by: Sean Topping <[email protected]>
Reviewed-by: Sean Topping <[email protected]>
Commit-Queue: Vigen Issahhanjan <[email protected]>
Cr-Commit-Position: refs/heads/main@{#946751}
diff --git a/chromecast/browser/cast_web_contents.h b/chromecast/browser/cast_web_contents.h
index ae5da8f..b22aa6a 100644
--- a/chromecast/browser/cast_web_contents.h
+++ b/chromecast/browser/cast_web_contents.h
@@ -126,6 +126,12 @@
     virtual void MainFrameReadyToCommitNavigation(
         content::NavigationHandle* navigation_handle) {}
 
+    // Notify that an inner WebContents was created. |inner_contents| is created
+    // in a default-initialized state with no delegate, and can be safely
+    // initialized by the delegate.
+    virtual void InnerContentsCreated(CastWebContents* inner_contents,
+                                      CastWebContents* outer_contents) {}
+
     // Sets |cast_web_contents_| to |nullptr| but does not remove the Observer
     // from the ObserverList. Called for each Observer during CastWebContents
     // destruction; we don't use Observe(nullptr) since it would mutate the