Commit 7ea6509f authored by Paul Meyer's avatar Paul Meyer Committed by Commit Bot

Route navigator.vibrate intervention to Intervention::GenerateReport().

Bug: 564071
Change-Id: I77b644c49df34ed0beb95e94947fcc5a9e842fd0
Reviewed-on: https://chromium-review.googlesource.com/982539Reviewed-by: default avatarNate Chapin <japhet@chromium.org>
Reviewed-by: default avatarMichael van Ouwerkerk <mvanouwerkerk@chromium.org>
Commit-Queue: Paul Meyer <paulmeyer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548093}
parent 9b8952c8
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "core/dom/UserGestureIndicator.h" #include "core/dom/UserGestureIndicator.h"
#include "core/frame/Deprecation.h" #include "core/frame/Deprecation.h"
#include "core/frame/FrameConsole.h" #include "core/frame/FrameConsole.h"
#include "core/frame/Intervention.h"
#include "core/frame/LocalDOMWindow.h" #include "core/frame/LocalDOMWindow.h"
#include "core/frame/LocalFrame.h" #include "core/frame/LocalFrame.h"
#include "core/frame/Navigator.h" #include "core/frame/Navigator.h"
...@@ -81,7 +82,6 @@ bool NavigatorVibration::vibrate(Navigator& navigator, ...@@ -81,7 +82,6 @@ bool NavigatorVibration::vibrate(Navigator& navigator,
if (!frame->HasBeenActivated()) { if (!frame->HasBeenActivated()) {
String message; String message;
MessageLevel level = kErrorMessageLevel;
if (frame->IsCrossOriginSubframe()) { if (frame->IsCrossOriginSubframe()) {
message = message =
"Blocked call to navigator.vibrate inside a cross-origin " "Blocked call to navigator.vibrate inside a cross-origin "
...@@ -94,11 +94,8 @@ bool NavigatorVibration::vibrate(Navigator& navigator, ...@@ -94,11 +94,8 @@ bool NavigatorVibration::vibrate(Navigator& navigator,
"https://www.chromestatus.com/feature/5644273861001216."; "https://www.chromestatus.com/feature/5644273861001216.";
} }
if (level == kErrorMessageLevel) { Intervention::GenerateReport(frame, message);
frame->DomWindow()->GetFrameConsole()->AddMessage( return false;
ConsoleMessage::Create(kInterventionMessageSource, level, message));
return false;
}
} }
return NavigatorVibration::From(navigator).Controller(*frame)->Vibrate( return NavigatorVibration::From(navigator).Controller(*frame)->Vibrate(
......
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