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 |
13 class TextTrack; | |
12 class TextTrackList; | 14 class TextTrackList; |
13 class TrackGroup; | 15 class TrackGroup; |
14 | 16 |
15 class AutomaticTrackSelection { | 17 class AutomaticTrackSelection { |
16 STACK_ALLOCATED(); | 18 STACK_ALLOCATED(); |
17 public: | 19 public: |
18 struct Configuration { | 20 struct Configuration { |
19 Configuration() | 21 Configuration() |
20 : disableCurrentlyEnabledTracks(false) | 22 : disableCurrentlyEnabledTracks(false) |
21 , forceEnableSubtitleOrCaptionTrack(false) { } | 23 , forceEnableSubtitleOrCaptionTrack(false) |
24 , textTrackKindUserPreference(TextTrackKindUserPreference::Default) { } | |
22 | 25 |
23 bool disableCurrentlyEnabledTracks; | 26 bool disableCurrentlyEnabledTracks; |
24 bool forceEnableSubtitleOrCaptionTrack; | 27 bool forceEnableSubtitleOrCaptionTrack; |
28 TextTrackKindUserPreference textTrackKindUserPreference; | |
25 }; | 29 }; |
26 | 30 |
27 AutomaticTrackSelection(const Configuration&); | 31 AutomaticTrackSelection(const Configuration&); |
28 | 32 |
29 void perform(TextTrackList&); | 33 void perform(TextTrackList&); |
30 | 34 |
31 private: | 35 private: |
32 void performAutomaticTextTrackSelection(const TrackGroup&); | 36 RefPtrWillBeRawPtr<TextTrack> performAutomaticTextTrackSelection(const Track Group&); |
fs
2015/06/23 09:23:58
PassRef...
srivats
2015/06/24 01:40:19
Done.
| |
33 void enableDefaultMetadataTextTracks(const TrackGroup&); | 37 void enableDefaultMetadataTextTracks(const TrackGroup&); |
38 RefPtrWillBeRawPtr<TextTrack> enableTrackBasedOnUserPreference(RefPtrWillBeR awPtr<TextTrack>, | |
fs
2015/06/23 09:23:58
Nit: PassRef... (both args.)
srivats
2015/06/24 01:40:20
Done.
| |
39 RefPtrWillBeRawPtr<TextTrack>); | |
34 | 40 |
35 const Configuration m_configuration; | 41 const Configuration m_configuration; |
42 RefPtrWillBeRawPtr<TextTrack> fallbackCaptionOrSubtitleTrack; | |
fs
2015/06/23 09:23:58
Nit: m_fallback...
srivats
2015/06/24 01:40:19
Done.
| |
36 }; | 43 }; |
37 | 44 |
38 } // namespace blink | 45 } // namespace blink |
39 | 46 |
40 #endif // AutomaticTrackSelection_h | 47 #endif // AutomaticTrackSelection_h |
OLD | NEW |