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 |