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

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

Issue 319213002: Fix MediaSource.duration setter behavior to match the current spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 6 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 /* 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 void setLoop(bool b); 142 void setLoop(bool b);
143 void play(); 143 void play();
144 void pause(); 144 void pause();
145 145
146 // statistics 146 // statistics
147 unsigned webkitAudioDecodedByteCount() const; 147 unsigned webkitAudioDecodedByteCount() const;
148 unsigned webkitVideoDecodedByteCount() const; 148 unsigned webkitVideoDecodedByteCount() const;
149 149
150 // media source extensions 150 // media source extensions
151 void closeMediaSource(); 151 void closeMediaSource();
152 void durationChanged(double duration); 152 void durationChanged(double duration, bool requestSeek);
153 153
154 // controls 154 // controls
155 bool controls() const; 155 bool controls() const;
156 void setControls(bool); 156 void setControls(bool);
157 double volume() const; 157 double volume() const;
158 void setVolume(double, ExceptionState&); 158 void setVolume(double, ExceptionState&);
159 bool muted() const; 159 bool muted() const;
160 void setMuted(bool); 160 void setMuted(bool);
161 161
162 // play/pause toggling that uses the media controller if present. togglePlay StateWillPlay() is 162 // play/pause toggling that uses the media controller if present. togglePlay StateWillPlay() is
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) OVERRIDE FINAL; 339 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) OVERRIDE FINAL;
340 virtual void mediaPlayerMediaSourceOpened(blink::WebMediaSource*) OVERRIDE F INAL; 340 virtual void mediaPlayerMediaSourceOpened(blink::WebMediaSource*) OVERRIDE F INAL;
341 341
342 void loadTimerFired(Timer<HTMLMediaElement>*); 342 void loadTimerFired(Timer<HTMLMediaElement>*);
343 void progressEventTimerFired(Timer<HTMLMediaElement>*); 343 void progressEventTimerFired(Timer<HTMLMediaElement>*);
344 void playbackProgressTimerFired(Timer<HTMLMediaElement>*); 344 void playbackProgressTimerFired(Timer<HTMLMediaElement>*);
345 void startPlaybackProgressTimer(); 345 void startPlaybackProgressTimer();
346 void startProgressEventTimer(); 346 void startProgressEventTimer();
347 void stopPeriodicTimers(); 347 void stopPeriodicTimers();
348 348
349 void seek(double time, ExceptionState&); 349 enum SeekSkipPermission { SkipAllowed, SkipNotAllowed};
350 void seek(SeekSkipPermission, double time, ExceptionState&);
350 void finishSeek(); 351 void finishSeek();
351 void checkIfSeekNeeded(); 352 void checkIfSeekNeeded();
352 void addPlayedRange(double start, double end); 353 void addPlayedRange(double start, double end);
353 354
354 void scheduleTimeupdateEvent(bool periodicEvent); 355 void scheduleTimeupdateEvent(bool periodicEvent);
355 void scheduleEvent(const AtomicString& eventName); // FIXME: Rename to sched uleNamedEvent for clarity. 356 void scheduleEvent(const AtomicString& eventName); // FIXME: Rename to sched uleNamedEvent for clarity.
356 357
357 // loading 358 // loading
358 void prepareForLoad(); 359 void prepareForLoad();
359 void loadInternal(); 360 void loadInternal();
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 inline bool isHTMLMediaElement(const HTMLElement& element) 560 inline bool isHTMLMediaElement(const HTMLElement& element)
560 { 561 {
561 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 562 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
562 } 563 }
563 564
564 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 565 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
565 566
566 } //namespace 567 } //namespace
567 568
568 #endif 569 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698