Commit e8587eb4 authored by Yuki Yamada's avatar Yuki Yamada Committed by Commit Bot

Add kForceWithoutContextObserver parameter to vibration_manager_

This is to ensure vibration/vibration-iframe.html passes with another
CL: https://crrev.com/c/2352292
The test should hook disconnect handler in js and make it sure that
vibration stops, but it is not supported yet.

Bug: 1115894, 1100257
Change-Id: Ia4934d4a4537f04bc8f43550c83c8f003c4b7683
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2355638
Commit-Queue: Yuki Yamada <yukiy@chromium.org>
Reviewed-by: default avatarMinoru Chikamune <chikamune@chromium.org>
Reviewed-by: default avatarKeishi Hattori <keishi@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798573}
parent 8a9c0f1f
......@@ -181,6 +181,11 @@ void VibrationController::DidCancel() {
void VibrationController::ContextDestroyed() {
Cancel();
// If the document context was destroyed, never call the mojo service again.
// TODO(crbug.com/1116948): Remove this line once vibration_manager_ switches
// to kForceWithContextObserver.
vibration_manager_.reset();
}
void VibrationController::PageVisibilityChanged() {
......
......@@ -74,7 +74,14 @@ class MODULES_EXPORT VibrationController final
// Remote to VibrationManager mojo interface. This is reset in
// |contextDestroyed| and must not be called or recreated after it is reset.
HeapMojoRemote<device::mojom::blink::VibrationManager> vibration_manager_;
//
// TODO(crbug.com/1116948): Remove kForceWithoutContextObserver parameter
// after hooking disconnect handler in js is implemented in
// MojoInterfaceInterceptor.
// See: third_party/blink/web_tests/vibration/vibration-iframe.html
HeapMojoRemote<device::mojom::blink::VibrationManager,
HeapMojoWrapperMode::kForceWithoutContextObserver>
vibration_manager_;
// Timer for calling |doVibrate| after a delay. It is safe to call
// |startOneshot| when the timer is already running: it may affect the time
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment