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

Unified Diff: content/browser/android/content_video_view.cc

Issue 2154883003: Make ContentVideoView progress view visible in WebView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Java continuation lines identation Created 4 years, 4 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: content/browser/android/content_video_view.cc
diff --git a/content/browser/android/content_video_view.cc b/content/browser/android/content_video_view.cc
index e0d1a12e849a5bb86e371b880fb503e5432661fd..4d6c0fb683abe8375106a179c936b1306e9afa3d 100644
--- a/content/browser/android/content_video_view.cc
+++ b/content/browser/android/content_video_view.cc
@@ -46,10 +46,12 @@ ContentVideoView* ContentVideoView::GetInstance() {
}
ContentVideoView::ContentVideoView(Client* client,
- ContentViewCore* content_view_core)
+ ContentViewCore* content_view_core,
+ const gfx::Size& video_natural_size)
: client_(client), weak_factory_(this) {
DCHECK(!g_content_video_view);
- j_content_video_view_ = CreateJavaObject(content_view_core);
+ j_content_video_view_ =
+ CreateJavaObject(content_view_core, video_natural_size);
g_content_video_view = this;
}
@@ -157,7 +159,8 @@ void ContentVideoView::RecordExitFullscreenPlayback(
}
JavaObjectWeakGlobalRef ContentVideoView::CreateJavaObject(
- ContentViewCore* content_view_core) {
+ ContentViewCore* content_view_core,
+ const gfx::Size& video_natural_size) {
JNIEnv* env = AttachCurrentThread();
base::android::ScopedJavaLocalRef<jobject> j_content_view_core =
content_view_core->GetJavaObject();
@@ -165,10 +168,9 @@ JavaObjectWeakGlobalRef ContentVideoView::CreateJavaObject(
return JavaObjectWeakGlobalRef(env, nullptr);
return JavaObjectWeakGlobalRef(
- env,
- Java_ContentVideoView_createContentVideoView(
- env,
- j_content_view_core.obj(),
- reinterpret_cast<intptr_t>(this)).obj());
+ env, Java_ContentVideoView_createContentVideoView(
+ env, j_content_view_core.obj(), reinterpret_cast<intptr_t>(this),
+ video_natural_size.width(), video_natural_size.height())
+ .obj());
}
} // namespace content
« no previous file with comments | « content/browser/android/content_video_view.h ('k') | content/browser/media/android/browser_media_player_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698