Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(796)

Unified Diff: third_party/WebKit/Source/modules/vibration/NavigatorVibration.h

Issue 2082463002: Measure the usage of navigator.vibrate in for user gesture & subframe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add back NavigatorVibrateSubFrame UserCounter since we decide to go ahead to remove vibrate from if… Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/vibration/NavigatorVibration.h
diff --git a/third_party/WebKit/Source/modules/vibration/NavigatorVibration.h b/third_party/WebKit/Source/modules/vibration/NavigatorVibration.h
index 22a5898677dce4aa7972c337e01693d7236d120b..ec978cff0a9bbb0bf7364f16500213a9aecf506c 100644
--- a/third_party/WebKit/Source/modules/vibration/NavigatorVibration.h
+++ b/third_party/WebKit/Source/modules/vibration/NavigatorVibration.h
@@ -33,6 +33,16 @@ namespace blink {
class Navigator;
class VibrationController;
+enum NavigatorVibrationType {
+ MainFrameNoUserGesture = 0,
+ MainFrameWithUserGesture = 1,
+ SameOriginSubFrameNoUserGesture = 2,
+ SameOriginSubFrameWithUserGesture = 3,
+ CrossOriginSubFrameNoUserGesture = 4,
+ CrossOriginSubFrameWithUserGesture = 5,
+ EnumMax = 6
+};
+
class MODULES_EXPORT NavigatorVibration final
: public GarbageCollectedFinalized<NavigatorVibration>
, public Supplement<Navigator>
@@ -61,6 +71,8 @@ private:
// Inherited from DOMWindowProperty.
void willDetachGlobalObjectFromFrame() override;
+ static void collectHistogramMetrics(const LocalFrame&);
+
Member<VibrationController> m_controller;
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698