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

Side by Side Diff: content/browser/android/content_view_render_view.cc

Issue 25040002: Enables fullscreen subtitle and media control from Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@build_hack
Patch Set: Created 7 years, 2 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 unified diff | Download patch
OLDNEW
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_view_render_view.h" 5 #include "content/browser/android/content_view_render_view.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 jboolean ContentViewRenderView::Composite(JNIEnv* env, jobject obj) { 77 jboolean ContentViewRenderView::Composite(JNIEnv* env, jobject obj) {
78 if (!compositor_) 78 if (!compositor_)
79 return false; 79 return false;
80 80
81 buffers_swapped_during_composite_ = false; 81 buffers_swapped_during_composite_ = false;
82 compositor_->Composite(); 82 compositor_->Composite();
83 return buffers_swapped_during_composite_; 83 return buffers_swapped_during_composite_;
84 } 84 }
85 85
86 void ContentViewRenderView::SetOverlayVideoMode(
87 JNIEnv* env, jobject obj, bool enabled) {
88 compositor_->SetHasTransparentBackground(enabled);
89 Java_ContentViewRenderView_requestRender(env, obj);
90 }
91
92
qinmin 2013/09/27 19:39:23 nit: extra blank line
trchen 2013/09/27 22:38:41 Done.
86 void ContentViewRenderView::ScheduleComposite() { 93 void ContentViewRenderView::ScheduleComposite() {
87 JNIEnv* env = base::android::AttachCurrentThread(); 94 JNIEnv* env = base::android::AttachCurrentThread();
88 Java_ContentViewRenderView_requestRender(env, java_obj_.obj()); 95 Java_ContentViewRenderView_requestRender(env, java_obj_.obj());
89 } 96 }
90 97
91 void ContentViewRenderView::OnSwapBuffersPosted() { 98 void ContentViewRenderView::OnSwapBuffersPosted() {
92 buffers_swapped_during_composite_ = true; 99 buffers_swapped_during_composite_ = true;
93 } 100 }
94 101
95 void ContentViewRenderView::OnSwapBuffersCompleted() { 102 void ContentViewRenderView::OnSwapBuffersCompleted() {
96 JNIEnv* env = base::android::AttachCurrentThread(); 103 JNIEnv* env = base::android::AttachCurrentThread();
97 Java_ContentViewRenderView_onSwapBuffersCompleted(env, java_obj_.obj()); 104 Java_ContentViewRenderView_onSwapBuffersCompleted(env, java_obj_.obj());
98 } 105 }
99 106
100 void ContentViewRenderView::InitCompositor() { 107 void ContentViewRenderView::InitCompositor() {
101 if (!compositor_) 108 if (!compositor_)
102 compositor_.reset(Compositor::Create(this)); 109 compositor_.reset(Compositor::Create(this));
103 } 110 }
104 111
105 } // namespace content 112 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698