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

Side by Side Diff: content/shell/android/java/src/org/chromium/content_shell/ShellManager.java

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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 package org.chromium.content_shell; 5 package org.chromium.content_shell;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.Context; 8 import android.content.Context;
9 import android.util.AttributeSet; 9 import android.util.AttributeSet;
10 import android.view.LayoutInflater; 10 import android.view.LayoutInflater;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 public ShellManager(final Context context, AttributeSet attrs) { 46 public ShellManager(final Context context, AttributeSet attrs) {
47 super(context, attrs); 47 super(context, attrs);
48 nativeInit(this); 48 nativeInit(this);
49 mContentViewClient = new ContentViewClient() { 49 mContentViewClient = new ContentViewClient() {
50 @Override 50 @Override
51 public ContentVideoViewClient getContentVideoViewClient() { 51 public ContentVideoViewClient getContentVideoViewClient() {
52 return new ActivityContentVideoViewClient((Activity) context) { 52 return new ActivityContentVideoViewClient((Activity) context) {
53 @Override 53 @Override
54 public void onShowCustomView(View view) { 54 public void onShowCustomView(View view) {
55 super.onShowCustomView(view); 55 super.onShowCustomView(view);
56 if (CommandLine.getInstance().hasSwitch( 56 if (!CommandLine.getInstance().hasSwitch(
57 ContentSwitches.ENABLE_OVERLAY_FULLSCREEN_VIDEO_ SUBTITLE)) { 57 ContentSwitches.DISABLE_OVERLAY_FULLSCREEN_VIDEO _SUBTITLE)) {
58 setOverlayVideoMode(true); 58 setOverlayVideoMode(true);
59 } 59 }
60 } 60 }
61 61
62 @Override 62 @Override
63 public void onDestroyContentVideoView() { 63 public void onDestroyContentVideoView() {
64 super.onDestroyContentVideoView(); 64 super.onDestroyContentVideoView();
65 if (CommandLine.getInstance().hasSwitch( 65 if (!CommandLine.getInstance().hasSwitch(
66 ContentSwitches.ENABLE_OVERLAY_FULLSCREEN_VIDEO_ SUBTITLE)) { 66 ContentSwitches.DISABLE_OVERLAY_FULLSCREEN_VIDEO _SUBTITLE)) {
67 setOverlayVideoMode(false); 67 setOverlayVideoMode(false);
68 } 68 }
69 } 69 }
70 }; 70 };
71 } 71 }
72 }; 72 };
73 } 73 }
74 74
75 /** 75 /**
76 * @param window The window used to generate all shells. 76 * @param window The window used to generate all shells.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 if (shellView.getParent() == null) return; 164 if (shellView.getParent() == null) return;
165 ContentView contentView = shellView.getContentView(); 165 ContentView contentView = shellView.getContentView();
166 if (contentView != null) contentView.onHide(); 166 if (contentView != null) contentView.onHide();
167 shellView.setContentViewRenderView(null); 167 shellView.setContentViewRenderView(null);
168 removeView(shellView); 168 removeView(shellView);
169 } 169 }
170 170
171 private static native void nativeInit(Object shellManagerInstance); 171 private static native void nativeInit(Object shellManagerInstance);
172 private static native void nativeLaunchShell(String url); 172 private static native void nativeLaunchShell(String url);
173 } 173 }
OLDNEW
« content/public/common/content_switches.h ('K') | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698