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 #include "content/browser/android/content_video_view.h" | 5 #include "content/browser/android/content_video_view.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "content/browser/android/content_view_core_impl.h" | 10 #include "content/browser/android/content_view_core_impl.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 } | 101 } |
102 | 102 |
103 ScopedJavaLocalRef<jobject> ContentVideoView::GetJavaObject(JNIEnv* env) { | 103 ScopedJavaLocalRef<jobject> ContentVideoView::GetJavaObject(JNIEnv* env) { |
104 return j_content_video_view_.get(env); | 104 return j_content_video_view_.get(env); |
105 } | 105 } |
106 | 106 |
107 void ContentVideoView::SetSurface(JNIEnv*, | 107 void ContentVideoView::SetSurface(JNIEnv*, |
108 const JavaParamRef<jobject>&, | 108 const JavaParamRef<jobject>&, |
109 const JavaParamRef<jobject>& surface) { | 109 const JavaParamRef<jobject>& surface) { |
110 client_->SetVideoSurface( | 110 client_->SetVideoSurface( |
111 gfx::ScopedJavaSurface::AcquireExternalSurface(surface)); | 111 gl::ScopedJavaSurface::AcquireExternalSurface(surface)); |
112 } | 112 } |
113 | 113 |
114 void ContentVideoView::DidExitFullscreen(JNIEnv*, | 114 void ContentVideoView::DidExitFullscreen(JNIEnv*, |
115 const JavaParamRef<jobject>&, | 115 const JavaParamRef<jobject>&, |
116 jboolean release_media_player) { | 116 jboolean release_media_player) { |
117 j_content_video_view_.reset(); | 117 j_content_video_view_.reset(); |
118 client_->DidExitFullscreen(release_media_player); | 118 client_->DidExitFullscreen(release_media_player); |
119 } | 119 } |
120 | 120 |
121 void ContentVideoView::RecordFullscreenPlayback(JNIEnv*, | 121 void ContentVideoView::RecordFullscreenPlayback(JNIEnv*, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 return JavaObjectWeakGlobalRef(env, nullptr); | 165 return JavaObjectWeakGlobalRef(env, nullptr); |
166 | 166 |
167 return JavaObjectWeakGlobalRef( | 167 return JavaObjectWeakGlobalRef( |
168 env, | 168 env, |
169 Java_ContentVideoView_createContentVideoView( | 169 Java_ContentVideoView_createContentVideoView( |
170 env, | 170 env, |
171 j_content_view_core.obj(), | 171 j_content_view_core.obj(), |
172 reinterpret_cast<intptr_t>(this)).obj()); | 172 reinterpret_cast<intptr_t>(this)).obj()); |
173 } | 173 } |
174 } // namespace content | 174 } // namespace content |
OLD | NEW |