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

Side by Side Diff: third_party/WebKit/Source/modules/mediasource/MediaSource.h

Issue 2315113002: MSE: Throw TypeError instead of InvalidAccessError per spec update (Closed)
Patch Set: addSourceBuffer(null) is really addSourceBuffer("null") in at least Blink 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 USING_GARBAGE_COLLECTED_MIXIN(MediaSource); 58 USING_GARBAGE_COLLECTED_MIXIN(MediaSource);
59 public: 59 public:
60 static const AtomicString& openKeyword(); 60 static const AtomicString& openKeyword();
61 static const AtomicString& closedKeyword(); 61 static const AtomicString& closedKeyword();
62 static const AtomicString& endedKeyword(); 62 static const AtomicString& endedKeyword();
63 63
64 static MediaSource* create(ExecutionContext*); 64 static MediaSource* create(ExecutionContext*);
65 ~MediaSource() override; 65 ~MediaSource() override;
66 66
67 static void logAndThrowDOMException(ExceptionState&, const ExceptionCode& er ror, const String& message); 67 static void logAndThrowDOMException(ExceptionState&, const ExceptionCode& er ror, const String& message);
68 static void logAndThrowTypeError(ExceptionState&, const String&);
68 69
69 // MediaSource.idl methods 70 // MediaSource.idl methods
70 SourceBufferList* sourceBuffers() { return m_sourceBuffers.get(); } 71 SourceBufferList* sourceBuffers() { return m_sourceBuffers.get(); }
71 SourceBufferList* activeSourceBuffers() { return m_activeSourceBuffers.get() ; } 72 SourceBufferList* activeSourceBuffers() { return m_activeSourceBuffers.get() ; }
72 SourceBuffer* addSourceBuffer(const String& type, ExceptionState&); 73 SourceBuffer* addSourceBuffer(const String& type, ExceptionState&);
73 void removeSourceBuffer(SourceBuffer*, ExceptionState&); 74 void removeSourceBuffer(SourceBuffer*, ExceptionState&);
74 void setDuration(double, ExceptionState&); 75 void setDuration(double, ExceptionState&);
75 76
76 DEFINE_ATTRIBUTE_EVENT_LISTENER(sourceopen); 77 DEFINE_ATTRIBUTE_EVENT_LISTENER(sourceopen);
77 DEFINE_ATTRIBUTE_EVENT_LISTENER(sourceended); 78 DEFINE_ATTRIBUTE_EVENT_LISTENER(sourceended);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 Member<SourceBufferList> m_activeSourceBuffers; 146 Member<SourceBufferList> m_activeSourceBuffers;
146 147
147 Member<TimeRanges> m_liveSeekableRange; 148 Member<TimeRanges> m_liveSeekableRange;
148 149
149 int m_addedToRegistryCounter; 150 int m_addedToRegistryCounter;
150 }; 151 };
151 152
152 } // namespace blink 153 } // namespace blink
153 154
154 #endif // MediaSource_h 155 #endif // MediaSource_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698