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

Side by Side Diff: Source/core/html/HTMLMediaElement.h

Issue 14936003: Remove unused code behind USE(PLATFORM_TEXT_TRACK_MENU) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years, 7 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
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('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) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 typedef PODIntervalTree<double, TextTrackCue*> CueIntervalTree; 60 typedef PODIntervalTree<double, TextTrackCue*> CueIntervalTree;
61 typedef CueIntervalTree::IntervalType CueInterval; 61 typedef CueIntervalTree::IntervalType CueInterval;
62 typedef Vector<CueInterval> CueList; 62 typedef Vector<CueInterval> CueList;
63 63
64 // FIXME: The inheritance from MediaPlayerClient here should be private inherita nce. 64 // FIXME: The inheritance from MediaPlayerClient here should be private inherita nce.
65 // But it can't be until the Chromium WebMediaPlayerClientImpl class is fixed so it 65 // But it can't be until the Chromium WebMediaPlayerClientImpl class is fixed so it
66 // no longer depends on typecasting a MediaPlayerClient to an HTMLMediaElement. 66 // no longer depends on typecasting a MediaPlayerClient to an HTMLMediaElement.
67 67
68 class HTMLMediaElement : public HTMLElement, public MediaPlayerClient, public Ac tiveDOMObject, public MediaControllerInterface 68 class HTMLMediaElement : public HTMLElement, public MediaPlayerClient, public Ac tiveDOMObject, public MediaControllerInterface
69 , private TextTrackClient 69 , private TextTrackClient
70 #if USE(PLATFORM_TEXT_TRACK_MENU)
71 , public PlatformTextTrackMenuClient
72 #endif
73 { 70 {
74 public: 71 public:
75 MediaPlayer* player() const { return m_player.get(); } 72 MediaPlayer* player() const { return m_player.get(); }
76 73
77 virtual bool isVideo() const = 0; 74 virtual bool isVideo() const = 0;
78 virtual bool hasVideo() const { return false; } 75 virtual bool hasVideo() const { return false; }
79 virtual bool hasAudio() const; 76 virtual bool hasAudio() const;
80 77
81 void rewind(double timeDelta); 78 void rewind(double timeDelta);
82 void returnToRealtime(); 79 void returnToRealtime();
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 void removeAllInbandTracks(); 203 void removeAllInbandTracks();
207 void closeCaptionTracksChanged(); 204 void closeCaptionTracksChanged();
208 void notifyMediaPlayerOfTextTrackChanges(); 205 void notifyMediaPlayerOfTextTrackChanges();
209 206
210 virtual void didAddTrack(HTMLTrackElement*); 207 virtual void didAddTrack(HTMLTrackElement*);
211 virtual void didRemoveTrack(HTMLTrackElement*); 208 virtual void didRemoveTrack(HTMLTrackElement*);
212 209
213 virtual void mediaPlayerDidAddTrack(PassRefPtr<InbandTextTrackPrivate>) OVER RIDE; 210 virtual void mediaPlayerDidAddTrack(PassRefPtr<InbandTextTrackPrivate>) OVER RIDE;
214 virtual void mediaPlayerDidRemoveTrack(PassRefPtr<InbandTextTrackPrivate>) O VERRIDE; 211 virtual void mediaPlayerDidRemoveTrack(PassRefPtr<InbandTextTrackPrivate>) O VERRIDE;
215 212
216 #if USE(PLATFORM_TEXT_TRACK_MENU)
217 virtual void setSelectedTextTrack(PassRefPtr<PlatformTextTrack>) OVERRIDE;
218 virtual Vector<RefPtr<PlatformTextTrack> > platformTextTracks() OVERRIDE;
219 PlatformTextTrackMenuInterface* platformTextTrackMenu();
220 #endif
221
222 struct TrackGroup { 213 struct TrackGroup {
223 enum GroupKind { CaptionsAndSubtitles, Description, Chapter, Metadata, O ther }; 214 enum GroupKind { CaptionsAndSubtitles, Description, Chapter, Metadata, O ther };
224 215
225 TrackGroup(GroupKind kind) 216 TrackGroup(GroupKind kind)
226 : visibleTrack(0) 217 : visibleTrack(0)
227 , defaultTrack(0) 218 , defaultTrack(0)
228 , kind(kind) 219 , kind(kind)
229 , hasSrcLang(false) 220 , hasSrcLang(false)
230 { 221 {
231 } 222 }
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 618
628 String m_mediaGroup; 619 String m_mediaGroup;
629 friend class MediaController; 620 friend class MediaController;
630 RefPtr<MediaController> m_mediaController; 621 RefPtr<MediaController> m_mediaController;
631 622
632 friend class TrackDisplayUpdateScope; 623 friend class TrackDisplayUpdateScope;
633 624
634 #if ENABLE(ENCRYPTED_MEDIA_V2) 625 #if ENABLE(ENCRYPTED_MEDIA_V2)
635 RefPtr<MediaKeys> m_mediaKeys; 626 RefPtr<MediaKeys> m_mediaKeys;
636 #endif 627 #endif
637
638 #if USE(PLATFORM_TEXT_TRACK_MENU)
639 RefPtr<PlatformTextTrackMenuInterface> m_platformMenu;
640 #endif
641 }; 628 };
642 629
643 #ifndef NDEBUG 630 #ifndef NDEBUG
644 // Template specializations required by PodIntervalTree in debug mode. 631 // Template specializations required by PodIntervalTree in debug mode.
645 template <> 632 template <>
646 struct ValueToString<double> { 633 struct ValueToString<double> {
647 static String string(const double value) 634 static String string(const double value)
648 { 635 {
649 return String::number(value); 636 return String::number(value);
650 } 637 }
(...skipping 15 matching lines...) Expand all
666 653
667 inline HTMLMediaElement* toMediaElement(Node* node) 654 inline HTMLMediaElement* toMediaElement(Node* node)
668 { 655 {
669 ASSERT_WITH_SECURITY_IMPLICATION(!node || isMediaElement(node)); 656 ASSERT_WITH_SECURITY_IMPLICATION(!node || isMediaElement(node));
670 return static_cast<HTMLMediaElement*>(node); 657 return static_cast<HTMLMediaElement*>(node);
671 } 658 }
672 659
673 } //namespace 660 } //namespace
674 661
675 #endif 662 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698