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

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

Issue 2007983006: Rename OwnPtr::clear() to reset() in modules/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 } 443 }
444 444
445 void MediaSource::setReadyState(const AtomicString& state) 445 void MediaSource::setReadyState(const AtomicString& state)
446 { 446 {
447 DCHECK(state == openKeyword() || state == closedKeyword() || state == endedK eyword()); 447 DCHECK(state == openKeyword() || state == closedKeyword() || state == endedK eyword());
448 448
449 AtomicString oldState = readyState(); 449 AtomicString oldState = readyState();
450 DVLOG(MEDIA_SOURCE_LOG_LEVEL) << __FUNCTION__ << " : " << oldState << " -> " << state << " " << this; 450 DVLOG(MEDIA_SOURCE_LOG_LEVEL) << __FUNCTION__ << " : " << oldState << " -> " << state << " " << this;
451 451
452 if (state == closedKeyword()) { 452 if (state == closedKeyword()) {
453 m_webMediaSource.clear(); 453 m_webMediaSource.reset();
454 } 454 }
455 455
456 if (oldState == state) 456 if (oldState == state)
457 return; 457 return;
458 458
459 m_readyState = state; 459 m_readyState = state;
460 460
461 onReadyStateChange(oldState, state); 461 onReadyStateChange(oldState, state);
462 } 462 }
463 463
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 return m_attachedElement || m_webMediaSource 567 return m_attachedElement || m_webMediaSource
568 || m_asyncEventQueue->hasPendingEvents() 568 || m_asyncEventQueue->hasPendingEvents()
569 || m_isAddedToRegistry; 569 || m_isAddedToRegistry;
570 } 570 }
571 571
572 void MediaSource::stop() 572 void MediaSource::stop()
573 { 573 {
574 m_asyncEventQueue->close(); 574 m_asyncEventQueue->close();
575 if (!isClosed()) 575 if (!isClosed())
576 setReadyState(closedKeyword()); 576 setReadyState(closedKeyword());
577 m_webMediaSource.clear(); 577 m_webMediaSource.reset();
578 } 578 }
579 579
580 PassOwnPtr<WebSourceBuffer> MediaSource::createWebSourceBuffer(const String& typ e, const String& codecs, ExceptionState& exceptionState) 580 PassOwnPtr<WebSourceBuffer> MediaSource::createWebSourceBuffer(const String& typ e, const String& codecs, ExceptionState& exceptionState)
581 { 581 {
582 WebSourceBuffer* webSourceBuffer = 0; 582 WebSourceBuffer* webSourceBuffer = 0;
583 583
584 switch (m_webMediaSource->addSourceBuffer(type, codecs, &webSourceBuffer)) { 584 switch (m_webMediaSource->addSourceBuffer(type, codecs, &webSourceBuffer)) {
585 case WebMediaSource::AddStatusOk: 585 case WebMediaSource::AddStatusOk:
586 return adoptPtr(webSourceBuffer); 586 return adoptPtr(webSourceBuffer);
587 case WebMediaSource::AddStatusNotSupported: 587 case WebMediaSource::AddStatusNotSupported:
(...skipping 26 matching lines...) Expand all
614 614
615 m_asyncEventQueue->enqueueEvent(event); 615 m_asyncEventQueue->enqueueEvent(event);
616 } 616 }
617 617
618 URLRegistry& MediaSource::registry() const 618 URLRegistry& MediaSource::registry() const
619 { 619 {
620 return MediaSourceRegistry::registry(); 620 return MediaSourceRegistry::registry();
621 } 621 }
622 622
623 } // namespace blink 623 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698