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

Unified Diff: Source/core/html/track/AutomaticTrackSelection.h

Issue 868113005: Move automatic text track selection code to AutomaticTrackSelection helper (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Pass TextTrackList as parameter instead. Created 5 years, 10 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/HTMLMediaElement.cpp ('k') | Source/core/html/track/AutomaticTrackSelection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/AutomaticTrackSelection.h
diff --git a/Source/core/html/track/AutomaticTrackSelection.h b/Source/core/html/track/AutomaticTrackSelection.h
new file mode 100644
index 0000000000000000000000000000000000000000..5572d0f99988a9f08302ebce7f033a2b1a76e0fa
--- /dev/null
+++ b/Source/core/html/track/AutomaticTrackSelection.h
@@ -0,0 +1,40 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef AutomaticTrackSelection_h
+#define AutomaticTrackSelection_h
+
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class TextTrackList;
+class TrackGroup;
+
+class AutomaticTrackSelection {
+ STACK_ALLOCATED();
+public:
+ struct Configuration {
+ Configuration()
+ : disableCurrentlyEnabledTracks(false)
+ , forceEnableSubtitleOrCaptionTrack(false) { }
+
+ bool disableCurrentlyEnabledTracks;
+ bool forceEnableSubtitleOrCaptionTrack;
+ };
+
+ AutomaticTrackSelection(const Configuration&);
+
+ void perform(TextTrackList&);
+
+private:
+ void performAutomaticTextTrackSelection(const TrackGroup&);
+ void enableDefaultMetadataTextTracks(const TrackGroup&);
+
+ const Configuration m_configuration;
+};
+
+} // namespace blink
+
+#endif // AutomaticTrackSelection_h
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/core/html/track/AutomaticTrackSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698