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

Unified Diff: Source/core/page/Page.cpp

Issue 1118613002: Hook up Android closed captions 'enabled' setting to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed lgtm comment and rebased 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
« no previous file with comments | « Source/core/html/track/TextTrackList.cpp ('k') | Source/core/testing/InternalSettings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/Page.cpp
diff --git a/Source/core/page/Page.cpp b/Source/core/page/Page.cpp
index 7d325ea83d9445eb6c46849a6e503666e2f62c15..68e8d2363b6db9ba8381ab6d746e68e4fc55ee14 100644
--- a/Source/core/page/Page.cpp
+++ b/Source/core/page/Page.cpp
@@ -34,6 +34,7 @@
#include "core/frame/RemoteFrame.h"
#include "core/frame/RemoteFrameView.h"
#include "core/frame/Settings.h"
+#include "core/html/HTMLMediaElement.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/layout/LayoutView.h"
#include "core/layout/TextAutosizer.h"
@@ -495,6 +496,15 @@ void Page::settingsChanged(SettingsDelegate::ChangeType changeType)
doc->styleResolver()->viewportStyleResolver()->collectViewportRules();
}
break;
+ case SettingsDelegate::TextTrackKindUserPreferenceChange:
+ for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext()) {
+ if (frame->isLocalFrame()) {
+ Document* doc = toLocalFrame(frame)->document();
+ if (doc)
+ HTMLMediaElement::setTextTrackKindUserPreferenceForAllMediaElements(doc);
+ }
+ }
+ break;
}
}
« no previous file with comments | « Source/core/html/track/TextTrackList.cpp ('k') | Source/core/testing/InternalSettings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698