| 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_helper.h" | 10 #include "base/android/jni_helper.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // MediaPlayerManagerImpl. | 24 // MediaPlayerManagerImpl. |
| 25 class ContentVideoView { | 25 class ContentVideoView { |
| 26 public: | 26 public: |
| 27 // Construct a ContentVideoView object. The |manager| will handle all the | 27 // Construct a ContentVideoView object. The |manager| will handle all the |
| 28 // playback controls from the Java class. | 28 // playback controls from the Java class. |
| 29 ContentVideoView( | 29 ContentVideoView( |
| 30 const base::android::ScopedJavaLocalRef<jobject>& context, | 30 const base::android::ScopedJavaLocalRef<jobject>& context, |
| 31 const base::android::ScopedJavaLocalRef<jobject>& client, | 31 const base::android::ScopedJavaLocalRef<jobject>& client, |
| 32 BrowserMediaPlayerManager* manager); | 32 BrowserMediaPlayerManager* manager); |
| 33 | 33 |
| 34 ContentVideoView(BrowserMediaPlayerManager* manager); | 34 explicit ContentVideoView(BrowserMediaPlayerManager* manager); |
| 35 | 35 |
| 36 ~ContentVideoView(); | 36 ~ContentVideoView(); |
| 37 | 37 |
| 38 // To open another video on existing ContentVideoView. | 38 // To open another video on existing ContentVideoView. |
| 39 void OpenVideo(); | 39 void OpenVideo(); |
| 40 | 40 |
| 41 static bool RegisterContentVideoView(JNIEnv* env); | 41 static bool RegisterContentVideoView(JNIEnv* env); |
| 42 static void KeepScreenOn(bool screen_on); | 42 static void KeepScreenOn(bool screen_on); |
| 43 | 43 |
| 44 // Return the singleton object or NULL. | 44 // Return the singleton object or NULL. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 SUSPENDED, | 106 SUSPENDED, |
| 107 RESUME | 107 RESUME |
| 108 } fullscreen_state_; | 108 } fullscreen_state_; |
| 109 | 109 |
| 110 DISALLOW_COPY_AND_ASSIGN(ContentVideoView); | 110 DISALLOW_COPY_AND_ASSIGN(ContentVideoView); |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 } // namespace content | 113 } // namespace content |
| 114 | 114 |
| 115 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIDEO_VIEW_H_ | 115 #endif // CONTENT_BROWSER_ANDROID_CONTENT_VIDEO_VIEW_H_ |
| OLD | NEW |