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

Unified Diff: chromecast/android/cast_metrics_helper_android.cc

Issue 1134183004: Chromecast: adds CastMetricsHelper API from Java. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
Index: chromecast/android/cast_metrics_helper_android.cc
diff --git a/chromecast/android/cast_metrics_helper_android.cc b/chromecast/android/cast_metrics_helper_android.cc
new file mode 100644
index 0000000000000000000000000000000000000000..62530bd02241feedb7471e9e6967ed63265fe4b8
--- /dev/null
+++ b/chromecast/android/cast_metrics_helper_android.cc
@@ -0,0 +1,25 @@
+// Copyright 2015 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.
+
+#include "chromecast/android/cast_metrics_helper_android.h"
+
+#include "chromecast/base/metrics/cast_metrics_helper.h"
+#include "jni/CastMetricsHelper_jni.h"
+
+namespace chromecast {
+
+// static
+bool CastMetricsHelperAndroid::RegisterJni(JNIEnv* env) {
+ return RegisterNativesImpl(env);
+}
+
+void LogMediaPlay(JNIEnv* env, jclass clazz) {
+ metrics::CastMetricsHelper::GetInstance()->LogMediaPlay();
+}
+
+void LogMediaPause(JNIEnv* env, jclass clazz) {
+ metrics::CastMetricsHelper::GetInstance()->LogMediaPause();
+}
+
+} // namespace chromecast

Powered by Google App Engine
This is Rietveld 408576698