Index: chrome/android/java/src/org/chromium/chrome/browser/UmaBridge.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/UmaBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/UmaBridge.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0e80f48728d866cb3a337a080992785f72927206 |
--- /dev/null |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/UmaBridge.java |
@@ -0,0 +1,34 @@ |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+package org.chromium.chrome.browser; |
+ |
+/** |
+ * Static methods to record user actions. |
+ * |
+ * We have a different native method for each action as we want to use c++ code to |
+ * extract user command keys from code and show them in the dashboard. |
+ * See: chromium/src/content/browser/user_metrics.h for more details. |
+ */ |
+public class UmaBridge { |
+ |
+ /** |
+ * Record that the user opened the menu. |
+ */ |
+ public static void menuShow() { |
+ nativeRecordMenuShow(); |
+ } |
+ |
+ /** |
+ * Record that the user opened the menu through software menu button. |
+ * @param isByHwButton |
+ * @param isDragging |
+ */ |
+ public static void usingMenu(boolean isByHwButton, boolean isDragging) { |
+ nativeRecordUsingMenu(isByHwButton, isDragging); |
+ } |
+ |
+ private static native void nativeRecordMenuShow(); |
+ private static native void nativeRecordUsingMenu(boolean isByHwButton, boolean isDragging); |
+} |