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 |
*/ |