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

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: Addressed lgtm comment and rebased 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
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() const;
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
OLDNEW
« 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