OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/media/android/remote/record_cast_action.h" | 5 #include "chrome/browser/media/android/remote/record_cast_action.h" |
6 | 6 |
7 #include <jni.h> | 7 #include <jni.h> |
8 | 8 |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "content/public/browser/user_metrics.h" | 10 #include "content/public/browser/user_metrics.h" |
11 #include "jni/RecordCastAction_jni.h" | 11 #include "jni/RecordCastAction_jni.h" |
12 #include "media/base/container_names.h" | 12 #include "media/base/container_names.h" |
13 | 13 |
14 using base::UserMetricsAction; | 14 using base::UserMetricsAction; |
| 15 using base::android::JavaParamRef; |
15 using content::RecordAction; | 16 using content::RecordAction; |
16 | 17 |
17 namespace { | 18 namespace { |
18 | 19 |
19 // When updating these values, remember to also update | 20 // When updating these values, remember to also update |
20 // tools/histograms/histograms.xml. | 21 // tools/histograms/histograms.xml. |
21 enum CastPlayBackState { | 22 enum CastPlayBackState { |
22 YT_PLAYER_SUCCESS = 0, | 23 YT_PLAYER_SUCCESS = 0, |
23 YT_PLAYER_FAILURE = 1, | 24 YT_PLAYER_FAILURE = 1, |
24 DEFAULT_PLAYER_SUCCESS = 2, | 25 DEFAULT_PLAYER_SUCCESS = 2, |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 UMA_HISTOGRAM_ENUMERATION("Cast.Sender.CastTimeRemainingPercentage", | 103 UMA_HISTOGRAM_ENUMERATION("Cast.Sender.CastTimeRemainingPercentage", |
103 percent_remaining, 101); | 104 percent_remaining, 101); |
104 } | 105 } |
105 | 106 |
106 // Register native methods | 107 // Register native methods |
107 bool RegisterRecordCastAction(JNIEnv* env) { | 108 bool RegisterRecordCastAction(JNIEnv* env) { |
108 return RegisterNativesImpl(env); | 109 return RegisterNativesImpl(env); |
109 } | 110 } |
110 | 111 |
111 } // namespace remote_media | 112 } // namespace remote_media |
OLD | NEW |