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

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

Issue 2263823002: Deliver change notifications to SourceBuffer track lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Call VideoTrackList::trackSelected also the SourceBuffer track list Created 4 years, 3 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 24 matching lines...) Expand all
35 #include "core/html/URLRegistry.h" 35 #include "core/html/URLRegistry.h"
36 #include "platform/heap/Handle.h" 36 #include "platform/heap/Handle.h"
37 #include "wtf/Forward.h" 37 #include "wtf/Forward.h"
38 #include <memory> 38 #include <memory>
39 39
40 namespace blink { 40 namespace blink {
41 41
42 class WebMediaSource; 42 class WebMediaSource;
43 class HTMLMediaElement; 43 class HTMLMediaElement;
44 class TimeRanges; 44 class TimeRanges;
45 class TrackBase;
45 46
46 class CORE_EXPORT HTMLMediaSource : public URLRegistrable, public GarbageCollect edMixin { 47 class CORE_EXPORT HTMLMediaSource : public URLRegistrable, public GarbageCollect edMixin {
47 public: 48 public:
48 static void setRegistry(URLRegistry*); 49 static void setRegistry(URLRegistry*);
49 static HTMLMediaSource* lookup(const String& url) { return s_registry ? stat ic_cast<HTMLMediaSource*>(s_registry->lookup(url)) : 0; } 50 static HTMLMediaSource* lookup(const String& url) { return s_registry ? stat ic_cast<HTMLMediaSource*>(s_registry->lookup(url)) : 0; }
50 51
51 // Called when an HTMLMediaElement is attempting to attach to this object, 52 // Called when an HTMLMediaElement is attempting to attach to this object,
52 // and helps enforce attachment to at most one element at a time. 53 // and helps enforce attachment to at most one element at a time.
53 // If already attached, returns false. Otherwise, must be in 54 // If already attached, returns false. Otherwise, must be in
54 // 'closed' state, and returns true to indicate attachment success. 55 // 'closed' state, and returns true to indicate attachment success.
55 // Reattachment allowed by first calling close() (even if already in 'closed '). 56 // Reattachment allowed by first calling close() (even if already in 'closed ').
56 // Once attached, the source uses the element to synchronously service some 57 // Once attached, the source uses the element to synchronously service some
57 // API operations like duration change that may need to initiate seek. 58 // API operations like duration change that may need to initiate seek.
58 virtual bool attachToElement(HTMLMediaElement*) = 0; 59 virtual bool attachToElement(HTMLMediaElement*) = 0;
59 virtual void setWebMediaSourceAndOpen(std::unique_ptr<WebMediaSource>) = 0; 60 virtual void setWebMediaSourceAndOpen(std::unique_ptr<WebMediaSource>) = 0;
60 virtual void close() = 0; 61 virtual void close() = 0;
61 virtual bool isClosed() const = 0; 62 virtual bool isClosed() const = 0;
62 virtual double duration() const = 0; 63 virtual double duration() const = 0;
63 virtual TimeRanges* buffered() const = 0; 64 virtual TimeRanges* buffered() const = 0;
64 virtual TimeRanges* seekable() const = 0; 65 virtual TimeRanges* seekable() const = 0;
66 virtual void onTrackChanged(TrackBase*) = 0;
65 67
66 // URLRegistrable 68 // URLRegistrable
67 URLRegistry& registry() const override { return *s_registry; } 69 URLRegistry& registry() const override { return *s_registry; }
68 70
69 private: 71 private:
70 static URLRegistry* s_registry; 72 static URLRegistry* s_registry;
71 }; 73 };
72 74
73 } // namespace blink 75 } // namespace blink
74 76
75 #endif 77 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.cpp ('k') | third_party/WebKit/Source/core/html/track/AudioTrack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698