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

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

Issue 214793005: Use HTMLMediaElement::togglePlayState() where appropriate (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 // ready state 120 // ready state
121 enum ReadyState { HAVE_NOTHING, HAVE_METADATA, HAVE_CURRENT_DATA, HAVE_FUTUR E_DATA, HAVE_ENOUGH_DATA }; 121 enum ReadyState { HAVE_NOTHING, HAVE_METADATA, HAVE_CURRENT_DATA, HAVE_FUTUR E_DATA, HAVE_ENOUGH_DATA };
122 ReadyState readyState() const; 122 ReadyState readyState() const;
123 bool seeking() const; 123 bool seeking() const;
124 124
125 // playback state 125 // playback state
126 virtual double currentTime() const OVERRIDE FINAL; 126 virtual double currentTime() const OVERRIDE FINAL;
127 virtual void setCurrentTime(double, ExceptionState&) OVERRIDE FINAL; 127 virtual void setCurrentTime(double, ExceptionState&) OVERRIDE FINAL;
128 virtual double duration() const OVERRIDE FINAL; 128 virtual double duration() const OVERRIDE FINAL;
129 virtual bool paused() const OVERRIDE FINAL; 129 bool paused() const;
130 double defaultPlaybackRate() const; 130 double defaultPlaybackRate() const;
131 void setDefaultPlaybackRate(double); 131 void setDefaultPlaybackRate(double);
132 double playbackRate() const; 132 double playbackRate() const;
133 void setPlaybackRate(double); 133 void setPlaybackRate(double);
134 void updatePlaybackRate(); 134 void updatePlaybackRate();
135 PassRefPtr<TimeRanges> played(); 135 PassRefPtr<TimeRanges> played();
136 PassRefPtr<TimeRanges> seekable() const; 136 PassRefPtr<TimeRanges> seekable() const;
137 bool ended() const; 137 bool ended() const;
138 bool autoplay() const; 138 bool autoplay() const;
139 bool loop() const; 139 bool loop() const;
140 void setLoop(bool b); 140 void setLoop(bool b);
141 virtual void play() OVERRIDE FINAL; 141 void play();
142 virtual void pause() OVERRIDE FINAL; 142 void pause();
143 143
144 // statistics 144 // statistics
145 unsigned webkitAudioDecodedByteCount() const; 145 unsigned webkitAudioDecodedByteCount() const;
146 unsigned webkitVideoDecodedByteCount() const; 146 unsigned webkitVideoDecodedByteCount() const;
147 147
148 // media source extensions 148 // media source extensions
149 void closeMediaSource(); 149 void closeMediaSource();
150 void durationChanged(double duration); 150 void durationChanged(double duration);
151 151
152 // controls 152 // controls
153 bool controls() const; 153 bool controls() const;
154 void setControls(bool); 154 void setControls(bool);
155 virtual double volume() const OVERRIDE FINAL; 155 virtual double volume() const OVERRIDE FINAL;
156 virtual void setVolume(double, ExceptionState&) OVERRIDE FINAL; 156 virtual void setVolume(double, ExceptionState&) OVERRIDE FINAL;
157 virtual bool muted() const OVERRIDE FINAL; 157 virtual bool muted() const OVERRIDE FINAL;
158 virtual void setMuted(bool) OVERRIDE FINAL; 158 virtual void setMuted(bool) OVERRIDE FINAL;
159 159
160 virtual bool canPlay() const OVERRIDE FINAL; 160 bool togglePlayStateWillPlay() const;
acolwell GONE FROM CHROMIUM 2014/03/28 01:02:52 nit: How about togglePlayStateWillTriggerPlay() or
philipj_slow 2014/03/28 07:22:23 I added a comment to explain briefly what these tw
161
162 void togglePlayState(); 161 void togglePlayState();
163 162
164 PassRefPtr<TextTrack> addTextTrack(const AtomicString& kind, const AtomicStr ing& label, const AtomicString& language, ExceptionState&); 163 PassRefPtr<TextTrack> addTextTrack(const AtomicString& kind, const AtomicStr ing& label, const AtomicString& language, ExceptionState&);
165 PassRefPtr<TextTrack> addTextTrack(const AtomicString& kind, const AtomicStr ing& label, ExceptionState& exceptionState) { return addTextTrack(kind, label, e mptyAtom, exceptionState); } 164 PassRefPtr<TextTrack> addTextTrack(const AtomicString& kind, const AtomicStr ing& label, ExceptionState& exceptionState) { return addTextTrack(kind, label, e mptyAtom, exceptionState); }
166 PassRefPtr<TextTrack> addTextTrack(const AtomicString& kind, ExceptionState& exceptionState) { return addTextTrack(kind, emptyAtom, emptyAtom, exceptionStat e); } 165 PassRefPtr<TextTrack> addTextTrack(const AtomicString& kind, ExceptionState& exceptionState) { return addTextTrack(kind, emptyAtom, emptyAtom, exceptionStat e); }
167 166
168 TextTrackList* textTracks(); 167 TextTrackList* textTracks();
169 CueList currentlyActiveCues() const { return m_currentlyActiveCues; } 168 CueList currentlyActiveCues() const { return m_currentlyActiveCues; }
170 169
171 void addTextTrack(TextTrack*); 170 void addTextTrack(TextTrack*);
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 inline bool isHTMLMediaElement(const HTMLElement& element) 552 inline bool isHTMLMediaElement(const HTMLElement& element)
554 { 553 {
555 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 554 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
556 } 555 }
557 556
558 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 557 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
559 558
560 } //namespace 559 } //namespace
561 560
562 #endif 561 #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