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

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

Issue 868113005: Move automatic text track selection code to AutomaticTrackSelection helper (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef AutomaticTrackSelection_h
6 #define AutomaticTrackSelection_h
7
8 #include "platform/heap/Handle.h"
9
10 namespace blink {
11
12 class TextTrackList;
13 class TrackGroup;
14
15 class AutomaticTrackSelection {
16 STACK_ALLOCATED();
17 public:
18 struct Configuration {
19 Configuration()
20 : disableCurrentlyEnabledTracks(false)
21 , forceEnableSubtitleOrCaptionTrack(false) { }
22
23 bool disableCurrentlyEnabledTracks;
24 bool forceEnableSubtitleOrCaptionTrack;
25 };
26
27 AutomaticTrackSelection(TextTrackList*, const Configuration&);
28
29 void perform();
30
31 private:
32 void performAutomaticTextTrackSelection(const TrackGroup&);
33 void enableDefaultMetadataTextTracks(const TrackGroup&);
34
35 RawPtrWillBeMember<TextTrackList> m_textTracks;
philipj_slow 2015/02/11 03:00:24 Could we make this an argument to perform() to sav
fs 2015/02/11 10:02:26 Done. (Wanted to make it 'const' too, but apparent
philipj_slow 2015/02/11 10:29:54 Well, it does modify the members of the list, so e
36 Configuration m_configuration;
philipj_slow 2015/02/11 03:00:24 Make it const to document that performing track se
fs 2015/02/11 10:02:26 Done. (Unit-testability would require passing the
37 };
38
39 } // namespace blink
40
41 #endif // AutomaticTrackSelection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698