OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIDEO_VIEW_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_CONTENT_VIDEO_VIEW_H_ |
6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIDEO_VIEW_H_ | 6 #define CONTENT_BROWSER_ANDROID_CONTENT_VIDEO_VIEW_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/android/jni_weak_ref.h" | 10 #include "base/android/jni_weak_ref.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 // Method called by |manager_| to inform the Java class about player status | 66 // Method called by |manager_| to inform the Java class about player status |
67 // change. | 67 // change. |
68 void UpdateMediaMetadata(); | 68 void UpdateMediaMetadata(); |
69 void OnMediaPlayerError(int errorType); | 69 void OnMediaPlayerError(int errorType); |
70 void OnVideoSizeChanged(int width, int height); | 70 void OnVideoSizeChanged(int width, int height); |
71 void OnBufferingUpdate(int percent); | 71 void OnBufferingUpdate(int percent); |
72 void OnPlaybackComplete(); | 72 void OnPlaybackComplete(); |
73 void OnExitFullscreen(); | 73 void OnExitFullscreen(); |
74 | 74 |
| 75 // Functions called to record fullscreen playback UMA metrics. |
| 76 void RecordFullscreenPlayback( |
| 77 JNIEnv*, jobject, bool is_portrait_video, bool is_orientation_portrait); |
| 78 void RecordExitFullscreenPlayback( |
| 79 JNIEnv*, jobject, bool is_portrait_video, |
| 80 long playback_duration_in_milliseconds_before_orientation_change, |
| 81 long playback_duration_in_milliseconds_after_orientation_change); |
| 82 |
75 // Return the corresponing ContentVideoView Java object if any. | 83 // Return the corresponing ContentVideoView Java object if any. |
76 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(JNIEnv* env); | 84 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(JNIEnv* env); |
77 | 85 |
78 private: | 86 private: |
79 // Creates the corresponding ContentVideoView Java object. | 87 // Creates the corresponding ContentVideoView Java object. |
80 JavaObjectWeakGlobalRef CreateJavaObject(); | 88 JavaObjectWeakGlobalRef CreateJavaObject(); |
81 | 89 |
82 // Returns the associated NativeView | 90 // Returns the associated NativeView |
83 gfx::NativeView GetNativeView(); | 91 gfx::NativeView GetNativeView(); |
84 | 92 |
(...skipping 16 matching lines...) Expand all Loading... |
101 | 109 |
102 // Weak pointer for posting tasks. | 110 // Weak pointer for posting tasks. |
103 base::WeakPtrFactory<ContentVideoView> weak_factory_; | 111 base::WeakPtrFactory<ContentVideoView> weak_factory_; |
104 | 112 |
105 DISALLOW_COPY_AND_ASSIGN(ContentVideoView); | 113 DISALLOW_COPY_AND_ASSIGN(ContentVideoView); |
106 }; | 114 }; |
107 | 115 |
108 } // namespace content | 116 } // namespace content |
109 | 117 |
110 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIDEO_VIEW_H_ | 118 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIDEO_VIEW_H_ |
OLD | NEW |