ContentCapture: Add OnscreenContentProvider

This patch is 3rd patch of the refactoring, it has below changes
- ContentCaptureConsumer became a interface, it stops to handle the
  WebContents change.
- Rename ContentCaptureConsumerImpl to PlatformContentCaptureConsumer.
- Rename ContentCaptureReceiverManager to OnscreenContentProvider.
- OnscreenContentProvider adds PlatformContentCaptureConsumer and
  ExperimentContentCaptureConsumer as needed, so each embedder's
  interaction to ContentCapture becomes simple.
- The onscreen content streaming won't start if there is no
  consumer.
- OnscreenContentProvider handles the WebContents change, it creates
  native ContentCaptureReceiverManagerAndroid as needed and switches
  to current WebContents by removing/adding itself as consumer.
- ContentCaptureReceiverManagerAndroid as a native consumer is owned
  by OnscreenContentProvider, it forwards the contentcapture events
  to OnscreenContentProvider and does the actual consumer switch.
  It will be renamed to OnscreenContentProviderAndroid in next patch.

No new test, all cases shall already be covered by existing tests.

Bug: 1191672, 1119663
Change-Id: I83533884f1bd4527c71a2dd612a709429c729ee5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2794728
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Reviewed-by: Michael Bai <michaelbai@chromium.org>
Commit-Queue: Michael Bai <michaelbai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#868120}
GitOrigin-RevId: 89355e68e63313d9866c363a385031077c8b3e7c
1 file changed
tree: e96e65ab4fbe70f162a5ae0c15bb7e11e8ac0c67
  1. java/
  2. BUILD.gn
  3. README.md
README.md

//android_webview/glue/

This folder contains a shim layer between the public frameworks APIs (android.webkit.*) and WebView's implementation, and allows them to (mostly) not directly depend on each other.

Folder Dependencies

//android_webview/java/ must not depend on this directory.

See Also