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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 m_mode = newMode; 156 m_mode = newMode;
157 } 157 }
158 158
159 PassRefPtr<TimeRanges> SourceBuffer::buffered(ExceptionState& exceptionState) co nst 159 PassRefPtr<TimeRanges> SourceBuffer::buffered(ExceptionState& exceptionState) co nst
160 { 160 {
161 // Section 3.1 buffered attribute steps. 161 // Section 3.1 buffered attribute steps.
162 // 1. If this object has been removed from the sourceBuffers attribute of th e parent media source then throw an 162 // 1. If this object has been removed from the sourceBuffers attribute of th e parent media source then throw an
163 // InvalidStateError exception and abort these steps. 163 // InvalidStateError exception and abort these steps.
164 if (isRemoved()) { 164 if (isRemoved()) {
165 exceptionState.throwDOMException(InvalidStateError, "This SourceBuffer h as been removed from the parent media source."); 165 exceptionState.throwDOMException(InvalidStateError, "This SourceBuffer h as been removed from the parent media source.");
166 return 0; 166 return nullptr;
167 } 167 }
168 168
169 // 2. Return a new static normalized TimeRanges object for the media segment s buffered. 169 // 2. Return a new static normalized TimeRanges object for the media segment s buffered.
170 return TimeRanges::create(m_webSourceBuffer->buffered()); 170 return TimeRanges::create(m_webSourceBuffer->buffered());
171 } 171 }
172 172
173 double SourceBuffer::timestampOffset() const 173 double SourceBuffer::timestampOffset() const
174 { 174 {
175 return m_timestampOffset; 175 return m_timestampOffset;
176 } 176 }
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 423
424 void SourceBuffer::removedFromMediaSource() 424 void SourceBuffer::removedFromMediaSource()
425 { 425 {
426 if (isRemoved()) 426 if (isRemoved())
427 return; 427 return;
428 428
429 abortIfUpdating(); 429 abortIfUpdating();
430 430
431 m_webSourceBuffer->removedFromMediaSource(); 431 m_webSourceBuffer->removedFromMediaSource();
432 m_webSourceBuffer.clear(); 432 m_webSourceBuffer.clear();
433 m_source = 0; 433 m_source = nullptr;
434 m_asyncEventQueue = 0; 434 m_asyncEventQueue = 0;
435 } 435 }
436 436
437 bool SourceBuffer::hasPendingActivity() const 437 bool SourceBuffer::hasPendingActivity() const
438 { 438 {
439 return m_source; 439 return m_source;
440 } 440 }
441 441
442 void SourceBuffer::suspend() 442 void SourceBuffer::suspend()
443 { 443 {
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 // 14. Queue a task to fire a simple event named updateend at this SourceBuf fer object. 670 // 14. Queue a task to fire a simple event named updateend at this SourceBuf fer object.
671 scheduleEvent(EventTypeNames::updateend); 671 scheduleEvent(EventTypeNames::updateend);
672 TRACE_EVENT_ASYNC_END0("media", "SourceBuffer::appendStream", this); 672 TRACE_EVENT_ASYNC_END0("media", "SourceBuffer::appendStream", this);
673 } 673 }
674 674
675 void SourceBuffer::clearAppendStreamState() 675 void SourceBuffer::clearAppendStreamState()
676 { 676 {
677 m_streamMaxSizeValid = false; 677 m_streamMaxSizeValid = false;
678 m_streamMaxSize = 0; 678 m_streamMaxSize = 0;
679 m_loader.clear(); 679 m_loader.clear();
680 m_stream = 0; 680 m_stream = nullptr;
681 } 681 }
682 682
683 void SourceBuffer::didStartLoading() 683 void SourceBuffer::didStartLoading()
684 { 684 {
685 WTF_LOG(Media, "SourceBuffer::didStartLoading() %p", this); 685 WTF_LOG(Media, "SourceBuffer::didStartLoading() %p", this);
686 } 686 }
687 687
688 void SourceBuffer::didReceiveDataForClient(const char* data, unsigned dataLength ) 688 void SourceBuffer::didReceiveDataForClient(const char* data, unsigned dataLength )
689 { 689 {
690 WTF_LOG(Media, "SourceBuffer::didReceiveDataForClient(%d) %p", dataLength, t his); 690 WTF_LOG(Media, "SourceBuffer::didReceiveDataForClient(%d) %p", dataLength, t his);
(...skipping 14 matching lines...) Expand all
705 WTF_LOG(Media, "SourceBuffer::didFail(%d) %p", errorCode, this); 705 WTF_LOG(Media, "SourceBuffer::didFail(%d) %p", errorCode, this);
706 appendStreamDone(false); 706 appendStreamDone(false);
707 } 707 }
708 708
709 void SourceBuffer::trace(Visitor* visitor) 709 void SourceBuffer::trace(Visitor* visitor)
710 { 710 {
711 visitor->trace(m_source); 711 visitor->trace(m_source);
712 } 712 }
713 713
714 } // namespace WebCore 714 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/InspectorIndexedDBAgent.cpp ('k') | Source/modules/mediasource/WebKitSourceBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698