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

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

Issue 26878003: Reduce repetitive EventTarget subclassing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nit Created 7 years, 2 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 ScriptExecutionContext* SourceBuffer::scriptExecutionContext() const 375 ScriptExecutionContext* SourceBuffer::scriptExecutionContext() const
376 { 376 {
377 return ActiveDOMObject::scriptExecutionContext(); 377 return ActiveDOMObject::scriptExecutionContext();
378 } 378 }
379 379
380 const AtomicString& SourceBuffer::interfaceName() const 380 const AtomicString& SourceBuffer::interfaceName() const
381 { 381 {
382 return eventNames().interfaceForSourceBuffer; 382 return eventNames().interfaceForSourceBuffer;
383 } 383 }
384 384
385 EventTargetData* SourceBuffer::eventTargetData()
386 {
387 return &m_eventTargetData;
388 }
389
390 EventTargetData* SourceBuffer::ensureEventTargetData()
391 {
392 return &m_eventTargetData;
393 }
394
395 bool SourceBuffer::isRemoved() const 385 bool SourceBuffer::isRemoved() const
396 { 386 {
397 return !m_source; 387 return !m_source;
398 } 388 }
399 389
400 void SourceBuffer::scheduleEvent(const AtomicString& eventName) 390 void SourceBuffer::scheduleEvent(const AtomicString& eventName)
401 { 391 {
402 ASSERT(m_asyncEventQueue); 392 ASSERT(m_asyncEventQueue);
403 393
404 RefPtr<Event> event = Event::create(eventName); 394 RefPtr<Event> event = Event::create(eventName);
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 appendStreamDone(true); 616 appendStreamDone(true);
627 } 617 }
628 618
629 void SourceBuffer::didFail(FileError::ErrorCode errorCode) 619 void SourceBuffer::didFail(FileError::ErrorCode errorCode)
630 { 620 {
631 LOG(Media, "SourceBuffer::didFail(%d) %p", errorCode, this); 621 LOG(Media, "SourceBuffer::didFail(%d) %p", errorCode, this);
632 appendStreamDone(false); 622 appendStreamDone(false);
633 } 623 }
634 624
635 } // namespace WebCore 625 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/mediasource/SourceBuffer.h ('k') | Source/modules/mediasource/SourceBufferList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698