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

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

Issue 61603006: Remove MediaSourcePrivate/SourceBufferPrivate (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: assert null Created 7 years, 1 month 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
« no previous file with comments | « no previous file | Source/core/html/TimeRanges.h » ('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) 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 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef HTMLMediaSource_h 31 #ifndef HTMLMediaSource_h
32 #define HTMLMediaSource_h 32 #define HTMLMediaSource_h
33 33
34 #include "core/html/HTMLMediaElement.h" 34 #include "core/html/HTMLMediaElement.h"
35 #include "core/html/URLRegistry.h" 35 #include "core/html/URLRegistry.h"
36 #include "wtf/Forward.h" 36 #include "wtf/Forward.h"
37 37
38 namespace blink {
39 class WebMediaSource;
40 }
41
38 namespace WebCore { 42 namespace WebCore {
39 43
40 class MediaSourcePrivate;
41 class TimeRanges; 44 class TimeRanges;
42 45
43 class HTMLMediaSource : public URLRegistrable { 46 class HTMLMediaSource : public URLRegistrable {
44 public: 47 public:
45 static void setRegistry(URLRegistry*); 48 static void setRegistry(URLRegistry*);
46 static HTMLMediaSource* lookup(const String& url) { return s_registry ? stat ic_cast<HTMLMediaSource*>(s_registry->lookup(url)) : 0; } 49 static HTMLMediaSource* lookup(const String& url) { return s_registry ? stat ic_cast<HTMLMediaSource*>(s_registry->lookup(url)) : 0; }
47 50
48 void ref() { refHTMLMediaSource(); } 51 void ref() { refHTMLMediaSource(); }
49 void deref() { derefHTMLMediaSource(); } 52 void deref() { derefHTMLMediaSource(); }
50 53
51 // Called when an HTMLMediaElement is attempting to attach to this object, 54 // Called when an HTMLMediaElement is attempting to attach to this object,
52 // and helps enforce attachment to at most one element at a time. 55 // and helps enforce attachment to at most one element at a time.
53 // If already attached, returns false. Otherwise, must be in 56 // If already attached, returns false. Otherwise, must be in
54 // 'closed' state, and returns true to indicate attachment success. 57 // 'closed' state, and returns true to indicate attachment success.
55 // Reattachment allowed by first calling close() (even if already in 'closed '). 58 // Reattachment allowed by first calling close() (even if already in 'closed ').
56 // Once attached, the source uses the element to synchronously service some 59 // Once attached, the source uses the element to synchronously service some
57 // API operations like duration change that may need to initiate seek. 60 // API operations like duration change that may need to initiate seek.
58 virtual bool attachToElement(HTMLMediaElement*) = 0; 61 virtual bool attachToElement(HTMLMediaElement*) = 0;
59 virtual void setPrivateAndOpen(PassOwnPtr<MediaSourcePrivate>) = 0; 62 virtual void setWebMediaSourceAndOpen(PassOwnPtr<blink::WebMediaSource>) = 0 ;
60 virtual void close() = 0; 63 virtual void close() = 0;
61 virtual bool isClosed() const = 0; 64 virtual bool isClosed() const = 0;
62 virtual double duration() const = 0; 65 virtual double duration() const = 0;
63 virtual PassRefPtr<TimeRanges> buffered() const = 0; 66 virtual PassRefPtr<TimeRanges> buffered() const = 0;
64 virtual void refHTMLMediaSource() = 0; 67 virtual void refHTMLMediaSource() = 0;
65 virtual void derefHTMLMediaSource() = 0; 68 virtual void derefHTMLMediaSource() = 0;
66 69
67 // URLRegistrable 70 // URLRegistrable
68 virtual URLRegistry& registry() const OVERRIDE { return *s_registry; } 71 virtual URLRegistry& registry() const OVERRIDE { return *s_registry; }
69 72
70 private: 73 private:
71 static URLRegistry* s_registry; 74 static URLRegistry* s_registry;
72 }; 75 };
73 76
74 } 77 }
75 78
76 #endif 79 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/TimeRanges.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698