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

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

Issue 1306413003: Make classes and structures in core/html fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 "core/html/track/TextTrackKindUserPreference.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "wtf/Allocator.h"
10 11
11 namespace blink { 12 namespace blink {
12 13
13 class TextTrackList; 14 class TextTrackList;
14 class TrackGroup; 15 class TrackGroup;
15 16
16 class AutomaticTrackSelection { 17 class AutomaticTrackSelection {
17 STACK_ALLOCATED(); 18 STACK_ALLOCATED();
18 public: 19 public:
19 struct Configuration { 20 struct Configuration {
21 DISALLOW_ALLOCATION();
20 Configuration() 22 Configuration()
21 : disableCurrentlyEnabledTracks(false) 23 : disableCurrentlyEnabledTracks(false)
22 , forceEnableSubtitleOrCaptionTrack(false) 24 , forceEnableSubtitleOrCaptionTrack(false)
23 , textTrackKindUserPreference(TextTrackKindUserPreference::Default) { } 25 , textTrackKindUserPreference(TextTrackKindUserPreference::Default) { }
24 26
25 bool disableCurrentlyEnabledTracks; 27 bool disableCurrentlyEnabledTracks;
26 bool forceEnableSubtitleOrCaptionTrack; 28 bool forceEnableSubtitleOrCaptionTrack;
27 TextTrackKindUserPreference textTrackKindUserPreference; 29 TextTrackKindUserPreference textTrackKindUserPreference;
28 }; 30 };
29 31
30 AutomaticTrackSelection(const Configuration&); 32 AutomaticTrackSelection(const Configuration&);
31 33
32 void perform(TextTrackList&); 34 void perform(TextTrackList&);
33 35
34 private: 36 private:
35 void performAutomaticTextTrackSelection(const TrackGroup&); 37 void performAutomaticTextTrackSelection(const TrackGroup&);
36 void enableDefaultMetadataTextTracks(const TrackGroup&); 38 void enableDefaultMetadataTextTracks(const TrackGroup&);
37 const AtomicString& preferredTrackKind() const; 39 const AtomicString& preferredTrackKind() const;
38 40
39 const Configuration m_configuration; 41 const Configuration m_configuration;
40 }; 42 };
41 43
42 } // namespace blink 44 } // namespace blink
43 45
44 #endif // AutomaticTrackSelection_h 46 #endif // AutomaticTrackSelection_h
OLDNEW
« no previous file with comments | « Source/core/html/shadow/DateTimeNumericFieldElement.h ('k') | Source/core/html/track/CueTimeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698