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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/accessibility/captioning/TextTrackSettings.java

Issue 1110103004: Hook up Android closed captions 'enabled' setting to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed lgtm nits Created 5 years, 5 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/public/android/java/src/org/chromium/content/browser/accessibility/captioning/TextTrackSettings.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/accessibility/captioning/TextTrackSettings.java b/content/public/android/java/src/org/chromium/content/browser/accessibility/captioning/TextTrackSettings.java
index e9986006942bcded9199ba147232e419255c0316..3726660d615b2349bd9373983289f9a797d5e9d7 100644
--- a/content/public/android/java/src/org/chromium/content/browser/accessibility/captioning/TextTrackSettings.java
+++ b/content/public/android/java/src/org/chromium/content/browser/accessibility/captioning/TextTrackSettings.java
@@ -16,6 +16,7 @@ import java.util.Objects;
@TargetApi(Build.VERSION_CODES.KITKAT)
public final class TextTrackSettings {
private static final String DEFAULT_VALUE = "";
+ private boolean mTextTracksEnabled;
private String mTextTrackBackgroundColor;
private String mTextTrackFontFamily;
private String mTextTrackFontStyle;
@@ -26,13 +27,14 @@ public final class TextTrackSettings {
/**
* Constructs a new TextTrackSettings object that will
- * return "" for all text track properties.
+ * return "" for all text track properties and false for textTracksEnabled.
*/
public TextTrackSettings() {}
/**
* Constructs a new TextTrackSettings object
*
+ * @param textTracksEnabled the captions state
* @param textTrackBackgroundColor the background color
* @param textTrackFontFamily the font family
* @param textTrackFontStyle the font style
@@ -41,9 +43,10 @@ public final class TextTrackSettings {
* @param textTrackTextShadow the text shadow
* @param textTrackTextSize the text size
*/
- public TextTrackSettings(String textTrackBackgroundColor, String textTrackFontFamily,
- String textTrackFontStyle, String textTrackFontVariant, String textTrackTextColor,
- String textTrackTextShadow, String textTrackTextSize) {
+ public TextTrackSettings(boolean textTracksEnabled, String textTrackBackgroundColor,
+ String textTrackFontFamily, String textTrackFontStyle, String textTrackFontVariant,
+ String textTrackTextColor, String textTrackTextShadow, String textTrackTextSize) {
+ mTextTracksEnabled = textTracksEnabled;
mTextTrackBackgroundColor = textTrackBackgroundColor;
mTextTrackFontFamily = textTrackFontFamily;
mTextTrackFontStyle = textTrackFontStyle;
@@ -54,6 +57,13 @@ public final class TextTrackSettings {
}
/**
+ * @return true if closed captions are "on"
+ */
+ public boolean getTextTracksEnabled() {
+ return mTextTracksEnabled;
+ }
+
+ /**
* @return the text track background color. Will return "" if the
* value is null
*/

Powered by Google App Engine
This is Rietveld 408576698