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

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

Issue 182493003: enable subtitle support and the new fullscreen video (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't enable fullscreen subtitle for webview Created 6 years, 9 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 | Annotate | Revision Log
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_video_view.h" 5 #include "content/browser/android/content_video_view.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "content/browser/android/content_view_core_impl.h" 10 #include "content/browser/android/content_view_core_impl.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 return reinterpret_cast<gfx::NativeView>( 200 return reinterpret_cast<gfx::NativeView>(
201 Java_ContentVideoView_getNativeViewAndroid(env, 201 Java_ContentVideoView_getNativeViewAndroid(env,
202 content_video_view.obj())); 202 content_video_view.obj()));
203 203
204 } 204 }
205 205
206 JavaObjectWeakGlobalRef ContentVideoView::CreateJavaObject() { 206 JavaObjectWeakGlobalRef ContentVideoView::CreateJavaObject() {
207 ContentViewCoreImpl* content_view_core = manager_->GetContentViewCore(); 207 ContentViewCoreImpl* content_view_core = manager_->GetContentViewCore();
208 JNIEnv* env = AttachCurrentThread(); 208 JNIEnv* env = AttachCurrentThread();
209 bool legacyMode = !CommandLine::ForCurrentProcess()->HasSwitch( 209 bool legacyMode = CommandLine::ForCurrentProcess()->HasSwitch(
210 switches::kEnableOverlayFullscreenVideoSubtitle); 210 switches::kDisableOverlayFullscreenVideoSubtitle);
211 return JavaObjectWeakGlobalRef( 211 return JavaObjectWeakGlobalRef(
212 env, 212 env,
213 Java_ContentVideoView_createContentVideoView( 213 Java_ContentVideoView_createContentVideoView(
214 env, 214 env,
215 content_view_core->GetContext().obj(), 215 content_view_core->GetContext().obj(),
216 reinterpret_cast<intptr_t>(this), 216 reinterpret_cast<intptr_t>(this),
217 content_view_core->GetContentVideoViewClient().obj(), 217 content_view_core->GetContentVideoViewClient().obj(),
218 legacyMode).obj()); 218 legacyMode).obj());
219 } 219 }
220 220
(...skipping 10 matching lines...) Expand all
231 void ContentVideoView::DestroyContentVideoView(bool native_view_destroyed) { 231 void ContentVideoView::DestroyContentVideoView(bool native_view_destroyed) {
232 JNIEnv* env = AttachCurrentThread(); 232 JNIEnv* env = AttachCurrentThread();
233 ScopedJavaLocalRef<jobject> content_video_view = GetJavaObject(env); 233 ScopedJavaLocalRef<jobject> content_video_view = GetJavaObject(env);
234 if (!content_video_view.is_null()) { 234 if (!content_video_view.is_null()) {
235 Java_ContentVideoView_destroyContentVideoView(env, 235 Java_ContentVideoView_destroyContentVideoView(env,
236 content_video_view.obj(), native_view_destroyed); 236 content_video_view.obj(), native_view_destroyed);
237 j_content_video_view_.reset(); 237 j_content_video_view_.reset();
238 } 238 }
239 } 239 }
240 } // namespace content 240 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698