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

Side by Side Diff: Source/core/html/track/vtt/VTTCue.h

Issue 635793002: Replace FINAL and OVERRIDE with their C++11 counterparts in Source/core/html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/core/html/track/VideoTrackList.h ('k') | Source/core/html/track/vtt/VTTElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, Opera Software ASA. All rights reserved. 2 * Copyright (c) 2013, Opera Software ASA. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 22 matching lines...) Expand all
33 #include "core/html/track/TextTrackCue.h" 33 #include "core/html/track/TextTrackCue.h"
34 #include "platform/heap/Handle.h" 34 #include "platform/heap/Handle.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class Document; 38 class Document;
39 class ExecutionContext; 39 class ExecutionContext;
40 class VTTCue; 40 class VTTCue;
41 class VTTScanner; 41 class VTTScanner;
42 42
43 class VTTCueBox FINAL : public HTMLDivElement { 43 class VTTCueBox final : public HTMLDivElement {
44 public: 44 public:
45 static PassRefPtrWillBeRawPtr<VTTCueBox> create(Document& document, VTTCue* cue) 45 static PassRefPtrWillBeRawPtr<VTTCueBox> create(Document& document, VTTCue* cue)
46 { 46 {
47 return adoptRefWillBeNoop(new VTTCueBox(document, cue)); 47 return adoptRefWillBeNoop(new VTTCueBox(document, cue));
48 } 48 }
49 49
50 VTTCue* getCue() const { return m_cue; } 50 VTTCue* getCue() const { return m_cue; }
51 void applyCSSProperties(const IntSize& videoSize); 51 void applyCSSProperties(const IntSize& videoSize);
52 52
53 virtual void trace(Visitor*) OVERRIDE; 53 virtual void trace(Visitor*) override;
54 54
55 private: 55 private:
56 VTTCueBox(Document&, VTTCue*); 56 VTTCueBox(Document&, VTTCue*);
57 57
58 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; 58 virtual RenderObject* createRenderer(RenderStyle*) override;
59 59
60 RawPtrWillBeMember<VTTCue> m_cue; 60 RawPtrWillBeMember<VTTCue> m_cue;
61 }; 61 };
62 62
63 class VTTCue FINAL : public TextTrackCue { 63 class VTTCue final : public TextTrackCue {
64 DEFINE_WRAPPERTYPEINFO(); 64 DEFINE_WRAPPERTYPEINFO();
65 public: 65 public:
66 static PassRefPtrWillBeRawPtr<VTTCue> create(Document& document, double star tTime, double endTime, const String& text) 66 static PassRefPtrWillBeRawPtr<VTTCue> create(Document& document, double star tTime, double endTime, const String& text)
67 { 67 {
68 return adoptRefWillBeNoop(new VTTCue(document, startTime, endTime, text) ); 68 return adoptRefWillBeNoop(new VTTCue(document, startTime, endTime, text) );
69 } 69 }
70 70
71 virtual ~VTTCue(); 71 virtual ~VTTCue();
72 72
73 const String& vertical() const; 73 const String& vertical() const;
(...skipping 18 matching lines...) Expand all
92 void setText(const String&); 92 void setText(const String&);
93 93
94 void parseSettings(const String&); 94 void parseSettings(const String&);
95 95
96 PassRefPtrWillBeRawPtr<DocumentFragment> getCueAsHTML(); 96 PassRefPtrWillBeRawPtr<DocumentFragment> getCueAsHTML();
97 PassRefPtrWillBeRawPtr<DocumentFragment> createCueRenderingTree(); 97 PassRefPtrWillBeRawPtr<DocumentFragment> createCueRenderingTree();
98 98
99 const String& regionId() const { return m_regionId; } 99 const String& regionId() const { return m_regionId; }
100 void setRegionId(const String&); 100 void setRegionId(const String&);
101 101
102 virtual void updateDisplay(const IntSize& videoSize, HTMLDivElement& contain er) OVERRIDE; 102 virtual void updateDisplay(const IntSize& videoSize, HTMLDivElement& contain er) override;
103 103
104 virtual void updateDisplayTree(double movieTime) OVERRIDE; 104 virtual void updateDisplayTree(double movieTime) override;
105 virtual void removeDisplayTree() OVERRIDE; 105 virtual void removeDisplayTree() override;
106 virtual void notifyRegionWhenRemovingDisplayTree(bool notifyRegion) OVERRIDE ; 106 virtual void notifyRegionWhenRemovingDisplayTree(bool notifyRegion) override ;
107 107
108 void markFutureAndPastNodes(ContainerNode*, double previousTimestamp, double movieTime); 108 void markFutureAndPastNodes(ContainerNode*, double previousTimestamp, double movieTime);
109 109
110 int calculateComputedLinePosition(); 110 int calculateComputedLinePosition();
111 111
112 std::pair<double, double> getCSSPosition() const; 112 std::pair<double, double> getCSSPosition() const;
113 113
114 CSSValueID getCSSAlignment() const; 114 CSSValueID getCSSAlignment() const;
115 int getCSSSize() const; 115 int getCSSSize() const;
116 CSSValueID getCSSWritingDirection() const; 116 CSSValueID getCSSWritingDirection() const;
(...skipping 10 matching lines...) Expand all
127 enum CueAlignment { 127 enum CueAlignment {
128 Start = 0, 128 Start = 0,
129 Middle, 129 Middle,
130 End, 130 End,
131 Left, 131 Left,
132 Right, 132 Right,
133 NumberOfAlignments 133 NumberOfAlignments
134 }; 134 };
135 CueAlignment getAlignment() const { return m_cueAlignment; } 135 CueAlignment getAlignment() const { return m_cueAlignment; }
136 136
137 virtual ExecutionContext* executionContext() const OVERRIDE; 137 virtual ExecutionContext* executionContext() const override;
138 138
139 #ifndef NDEBUG 139 #ifndef NDEBUG
140 virtual String toString() const OVERRIDE; 140 virtual String toString() const override;
141 #endif 141 #endif
142 142
143 virtual void trace(Visitor*) OVERRIDE; 143 virtual void trace(Visitor*) override;
144 144
145 private: 145 private:
146 VTTCue(Document&, double startTime, double endTime, const String& text); 146 VTTCue(Document&, double startTime, double endTime, const String& text);
147 147
148 Document& document() const; 148 Document& document() const;
149 149
150 VTTCueBox& ensureDisplayTree(); 150 VTTCueBox& ensureDisplayTree();
151 PassRefPtrWillBeRawPtr<VTTCueBox> getDisplayTree(const IntSize& videoSize); 151 PassRefPtrWillBeRawPtr<VTTCueBox> getDisplayTree(const IntSize& videoSize);
152 152
153 virtual void cueDidChange() OVERRIDE; 153 virtual void cueDidChange() override;
154 154
155 void createVTTNodeTree(); 155 void createVTTNodeTree();
156 void copyVTTNodeToDOMTree(ContainerNode* vttNode, ContainerNode* root); 156 void copyVTTNodeToDOMTree(ContainerNode* vttNode, ContainerNode* root);
157 157
158 std::pair<double, double> getPositionCoordinates() const; 158 std::pair<double, double> getPositionCoordinates() const;
159 159
160 void calculateDisplayParameters(); 160 void calculateDisplayParameters();
161 161
162 enum CueSetting { 162 enum CueSetting {
163 None, 163 None,
(...skipping 27 matching lines...) Expand all
191 bool m_displayTreeShouldChange : 1; 191 bool m_displayTreeShouldChange : 1;
192 bool m_notifyRegion : 1; 192 bool m_notifyRegion : 1;
193 }; 193 };
194 194
195 // VTTCue is currently the only TextTrackCue subclass. 195 // VTTCue is currently the only TextTrackCue subclass.
196 DEFINE_TYPE_CASTS(VTTCue, TextTrackCue, cue, true, true); 196 DEFINE_TYPE_CASTS(VTTCue, TextTrackCue, cue, true, true);
197 197
198 } // namespace blink 198 } // namespace blink
199 199
200 #endif // VTTCue_h 200 #endif // VTTCue_h
OLDNEW
« no previous file with comments | « Source/core/html/track/VideoTrackList.h ('k') | Source/core/html/track/vtt/VTTElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698