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

Side by Side Diff: Source/core/html/track/AutomaticTrackSelection.h

Issue 1118613002: Hook up Android closed captions 'enabled' setting to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Prioritize language over kind in auto track selection 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 unified diff | Download patch
OLDNEW
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;
fs 2015/07/07 08:22:05 Nit: Not needed (in the header.)
srivats 2015/07/07 18:44:49 Done.
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 void performAutomaticTextTrackSelection(const TrackGroup&);
33 void enableDefaultMetadataTextTracks(const TrackGroup&); 37 void enableDefaultMetadataTextTracks(const TrackGroup&);
38 const AtomicString& preferredTrackKind();
34 39
35 const Configuration m_configuration; 40 const Configuration m_configuration;
36 }; 41 };
37 42
38 } // namespace blink 43 } // namespace blink
39 44
40 #endif // AutomaticTrackSelection_h 45 #endif // AutomaticTrackSelection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698