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

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

Issue 1815033003: Add srcObject attribute of type MediaStream to HTMLMediaElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: haraken's comments + extra test Created 4 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
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 bool hasRemoteRoutes() const { return m_remoteRoutesAvailable; } 102 bool hasRemoteRoutes() const { return m_remoteRoutesAvailable; }
103 bool isPlayingRemotely() const { return m_playingRemotely; } 103 bool isPlayingRemotely() const { return m_playingRemotely; }
104 104
105 // error state 105 // error state
106 MediaError* error() const; 106 MediaError* error() const;
107 107
108 // network state 108 // network state
109 void setSrc(const AtomicString&); 109 void setSrc(const AtomicString&);
110 const KURL& currentSrc() const { return m_currentSrc; } 110 const KURL& currentSrc() const { return m_currentSrc; }
111 void setSrcObjectURL(const AtomicString&);
philipj_slow 2016/03/21 11:13:13 Rather than using an object URL, can you look into
Guido Urdaneta 2016/03/21 16:34:53 Source/platform and public/platform cannot access
philipj_slow 2016/03/22 16:06:54 Just judging by include rules, maybe public/web/We
Guido Urdaneta 2016/03/24 14:38:44 I went for the URL+srcObject approach. I called th
111 112
112 enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO _SOURCE }; 113 enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO _SOURCE };
113 NetworkState getNetworkState() const; 114 NetworkState getNetworkState() const;
114 115
115 String preload() const; 116 String preload() const;
116 void setPreload(const AtomicString&); 117 void setPreload(const AtomicString&);
117 WebMediaPlayer::Preload preloadType() const; 118 WebMediaPlayer::Preload preloadType() const;
118 String effectivePreload() const; 119 String effectivePreload() const;
119 WebMediaPlayer::Preload effectivePreloadType() const; 120 WebMediaPlayer::Preload effectivePreloadType() const;
120 121
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 // loading 349 // loading
349 void invokeLoadAlgorithm(); 350 void invokeLoadAlgorithm();
350 void invokeResourceSelectionAlgorithm(); 351 void invokeResourceSelectionAlgorithm();
351 void loadInternal(); 352 void loadInternal();
352 void selectMediaResource(); 353 void selectMediaResource();
353 void loadResource(const KURL&, ContentType&); 354 void loadResource(const KURL&, ContentType&);
354 void startPlayerLoad(); 355 void startPlayerLoad();
355 void setPlayerPreload(); 356 void setPlayerPreload();
356 WebMediaPlayer::LoadType loadType() const; 357 WebMediaPlayer::LoadType loadType() const;
357 void scheduleNextSourceChild(); 358 void scheduleNextSourceChild();
359 void loadSourceFromObject();
360 void loadSourceFromAttribute();
361 void loadSourceFromURL(const AtomicString&);
358 void loadNextSourceChild(); 362 void loadNextSourceChild();
359 void clearMediaPlayer(); 363 void clearMediaPlayer();
360 void clearMediaPlayerAndAudioSourceProviderClientWithoutLocking(); 364 void clearMediaPlayerAndAudioSourceProviderClientWithoutLocking();
361 bool havePotentialSourceChild(); 365 bool havePotentialSourceChild();
362 void noneSupported(); 366 void noneSupported();
363 void mediaEngineError(MediaError*); 367 void mediaEngineError(MediaError*);
364 void cancelPendingEventsAndCallbacks(); 368 void cancelPendingEventsAndCallbacks();
365 void waitForSourceChange(); 369 void waitForSourceChange();
366 void setIgnorePreloadNone(); 370 void setIgnorePreloadNone();
367 371
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 // The last time a timeupdate event was sent (wall clock). 496 // The last time a timeupdate event was sent (wall clock).
493 double m_lastTimeUpdateEventWallTime; 497 double m_lastTimeUpdateEventWallTime;
494 498
495 // The last time a timeupdate event was sent in movie time. 499 // The last time a timeupdate event was sent in movie time.
496 double m_lastTimeUpdateEventMovieTime; 500 double m_lastTimeUpdateEventMovieTime;
497 501
498 // The default playback start position. 502 // The default playback start position.
499 double m_defaultPlaybackStartPosition; 503 double m_defaultPlaybackStartPosition;
500 504
501 // Loading state. 505 // Loading state.
502 enum LoadState { WaitingForSource, LoadingFromSrcAttr, LoadingFromSourceElem ent }; 506 enum LoadState { WaitingForSource, LoadingFromSrcObject, LoadingFromSrcAttr, LoadingFromSourceElement };
503 LoadState m_loadState; 507 LoadState m_loadState;
504 RefPtrWillBeMember<HTMLSourceElement> m_currentSourceNode; 508 RefPtrWillBeMember<HTMLSourceElement> m_currentSourceNode;
505 RefPtrWillBeMember<Node> m_nextChildNodeToConsider; 509 RefPtrWillBeMember<Node> m_nextChildNodeToConsider;
510 AtomicString m_srcObjectURL;
506 511
507 // "Deferred loading" state (for preload=none). 512 // "Deferred loading" state (for preload=none).
508 enum DeferredLoadState { 513 enum DeferredLoadState {
509 // The load is not deferred. 514 // The load is not deferred.
510 NotDeferred, 515 NotDeferred,
511 // The load is deferred, and waiting for the task to set the 516 // The load is deferred, and waiting for the task to set the
512 // delaying-the-load-event flag (to false). 517 // delaying-the-load-event flag (to false).
513 WaitingForStopDelayingLoadEventTask, 518 WaitingForStopDelayingLoadEventTask,
514 // The load is the deferred, and waiting for a triggering event. 519 // The load is the deferred, and waiting for a triggering event.
515 WaitingForTrigger, 520 WaitingForTrigger,
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 inline bool isHTMLMediaElement(const HTMLElement& element) 649 inline bool isHTMLMediaElement(const HTMLElement& element)
645 { 650 {
646 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 651 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
647 } 652 }
648 653
649 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 654 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
650 655
651 } // namespace blink 656 } // namespace blink
652 657
653 #endif // HTMLMediaElement_h 658 #endif // HTMLMediaElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698