Prerender: Equip BrowserInterfaceBroker with MojoBinderPolicyApplier
Some new features, such as prerendering, need to defer some binding interface requests or stop the renderer when an unexpected mojo pipe is requested to set up. This CL introduces MojoBinderPolicyApplier that manages binding requests and integrates it with BrowserInterfaceBroker. Regarding the MojoBinderPolicyApplier, it should be initialized with a predefined policy map. It decide the actions the applier takes when handling incoming requests. Based on the predefined policies and the current state, a MojoBinderPolicyApplier instance may take the following actions: 1. Bind the given interface immediately. (kGrant or `ResolveDeferredBinders` has been invoked) 2. Delay binding the interface until `ResolveDeferredBinders` is called. (kDefer) 3. Call the cancelling closure. (kCancel) 4. Stop the renderer and collect some metrics for analysis. (kUnexpected) Bug: 1132752 Change-Id: Ifdc2f0b27d2f4613274fe5c6e44ddb056a199509 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2513960 Commit-Queue: Lingqi Chi <lingqi@chromium.org> Reviewed-by:Matt Falkenhagen <falken@chromium.org> Reviewed-by:
Daniel Cheng <dcheng@chromium.org> Reviewed-by:
Takashi Toyoshima <toyoshim@chromium.org> Reviewed-by:
Kinuko Yasuda <kinuko@chromium.org> Cr-Commit-Position: refs/heads/master@{#828609}
Showing
Please register or sign in to comment