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

Side by Side Diff: Source/modules/mediasource/MediaSourceBase.cpp

Issue 266453005: Apply TypeChecking to MediaSource IDLs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use MAX_VALUE instead of POS_INF. Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/mediasource/MediaSource.idl ('k') | Source/modules/mediasource/SourceBuffer.cpp » ('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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 { 222 {
223 DEFINE_STATIC_LOCAL(const AtomicString, network, ("network", AtomicString::C onstructFromLiteral)); 223 DEFINE_STATIC_LOCAL(const AtomicString, network, ("network", AtomicString::C onstructFromLiteral));
224 DEFINE_STATIC_LOCAL(const AtomicString, decode, ("decode", AtomicString::Con structFromLiteral)); 224 DEFINE_STATIC_LOCAL(const AtomicString, decode, ("decode", AtomicString::Con structFromLiteral));
225 225
226 if (error == network) { 226 if (error == network) {
227 endOfStreamInternal(blink::WebMediaSource::EndOfStreamStatusNetworkError , exceptionState); 227 endOfStreamInternal(blink::WebMediaSource::EndOfStreamStatusNetworkError , exceptionState);
228 } else if (error == decode) { 228 } else if (error == decode) {
229 endOfStreamInternal(blink::WebMediaSource::EndOfStreamStatusDecodeError, exceptionState); 229 endOfStreamInternal(blink::WebMediaSource::EndOfStreamStatusDecodeError, exceptionState);
230 } else { 230 } else {
231 ASSERT_NOT_REACHED(); // IDL enforcement should prevent this case. 231 ASSERT_NOT_REACHED(); // IDL enforcement should prevent this case.
232 exceptionState.throwTypeError("parameter 1 is not a valid enum value.");
233 } 232 }
234 } 233 }
235 234
236 void MediaSourceBase::endOfStream(ExceptionState& exceptionState) 235 void MediaSourceBase::endOfStream(ExceptionState& exceptionState)
237 { 236 {
238 endOfStreamInternal(blink::WebMediaSource::EndOfStreamStatusNoError, excepti onState); 237 endOfStreamInternal(blink::WebMediaSource::EndOfStreamStatusNoError, excepti onState);
239 } 238 }
240 239
241 void MediaSourceBase::endOfStreamInternal(const blink::WebMediaSource::EndOfStre amStatus eosStatus, ExceptionState& exceptionState) 240 void MediaSourceBase::endOfStreamInternal(const blink::WebMediaSource::EndOfStre amStatus eosStatus, ExceptionState& exceptionState)
242 { 241 {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 { 355 {
357 return ActiveDOMObject::executionContext(); 356 return ActiveDOMObject::executionContext();
358 } 357 }
359 358
360 URLRegistry& MediaSourceBase::registry() const 359 URLRegistry& MediaSourceBase::registry() const
361 { 360 {
362 return MediaSourceRegistry::registry(); 361 return MediaSourceRegistry::registry();
363 } 362 }
364 363
365 } 364 }
OLDNEW
« no previous file with comments | « Source/modules/mediasource/MediaSource.idl ('k') | Source/modules/mediasource/SourceBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698