OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef AutomaticTrackSelection_h | 5 #ifndef AutomaticTrackSelection_h |
6 #define AutomaticTrackSelection_h | 6 #define AutomaticTrackSelection_h |
7 | 7 |
8 #include "core/html/track/TextTrackKindUserPreference.h" | |
8 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
9 | 10 |
10 namespace blink { | 11 namespace blink { |
11 | 12 |
12 class TextTrackList; | 13 class TextTrackList; |
13 class TrackGroup; | 14 class TrackGroup; |
14 | 15 |
15 class AutomaticTrackSelection { | 16 class AutomaticTrackSelection { |
16 STACK_ALLOCATED(); | 17 STACK_ALLOCATED(); |
17 public: | 18 public: |
18 struct Configuration { | 19 struct Configuration { |
19 Configuration() | 20 Configuration() |
20 : disableCurrentlyEnabledTracks(false) | 21 : disableCurrentlyEnabledTracks(false) |
21 , forceEnableSubtitleOrCaptionTrack(false) { } | 22 , forceEnableSubtitleOrCaptionTrack(false) |
23 , textTrackKindUserPreference(TextTrackKindUserPreference::Default) { } | |
22 | 24 |
23 bool disableCurrentlyEnabledTracks; | 25 bool disableCurrentlyEnabledTracks; |
24 bool forceEnableSubtitleOrCaptionTrack; | 26 bool forceEnableSubtitleOrCaptionTrack; |
27 TextTrackKindUserPreference textTrackKindUserPreference; | |
25 }; | 28 }; |
26 | 29 |
27 AutomaticTrackSelection(const Configuration&); | 30 AutomaticTrackSelection(const Configuration&); |
28 | 31 |
29 void perform(TextTrackList&); | 32 void perform(TextTrackList&); |
30 | 33 |
31 private: | 34 private: |
32 void performAutomaticTextTrackSelection(const TrackGroup&); | 35 void performAutomaticTextTrackSelection(const TrackGroup&); |
33 void enableDefaultMetadataTextTracks(const TrackGroup&); | 36 void enableDefaultMetadataTextTracks(const TrackGroup&); |
37 const AtomicString& preferredTrackKind(); | |
philipj_slow
2015/07/09 15:34:09
I guess this can be const?
srivats
2015/07/09 21:25:37
Done.
| |
34 | 38 |
35 const Configuration m_configuration; | 39 const Configuration m_configuration; |
36 }; | 40 }; |
37 | 41 |
38 } // namespace blink | 42 } // namespace blink |
39 | 43 |
40 #endif // AutomaticTrackSelection_h | 44 #endif // AutomaticTrackSelection_h |
OLD | NEW |