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

Side by Side Diff: Source/modules/mediastream/MediaStream.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
« no previous file with comments | « Source/modules/mediastream/MediaStream.h ('k') | Source/modules/mediastream/MediaStreamTrack.h » ('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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2011, 2012 Ericsson AB. All rights reserved. 3 * Copyright (C) 2011, 2012 Ericsson AB. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 const AtomicString& MediaStream::interfaceName() const 262 const AtomicString& MediaStream::interfaceName() const
263 { 263 {
264 return eventNames().interfaceForMediaStream; 264 return eventNames().interfaceForMediaStream;
265 } 265 }
266 266
267 ScriptExecutionContext* MediaStream::scriptExecutionContext() const 267 ScriptExecutionContext* MediaStream::scriptExecutionContext() const
268 { 268 {
269 return ContextLifecycleObserver::scriptExecutionContext(); 269 return ContextLifecycleObserver::scriptExecutionContext();
270 } 270 }
271 271
272 EventTargetData* MediaStream::eventTargetData()
273 {
274 return &m_eventTargetData;
275 }
276
277 EventTargetData* MediaStream::ensureEventTargetData()
278 {
279 return &m_eventTargetData;
280 }
281
282 void MediaStream::addRemoteTrack(MediaStreamComponent* component) 272 void MediaStream::addRemoteTrack(MediaStreamComponent* component)
283 { 273 {
284 ASSERT(component && !component->stream()); 274 ASSERT(component && !component->stream());
285 if (ended()) 275 if (ended())
286 return; 276 return;
287 277
288 component->setStream(descriptor()); 278 component->setStream(descriptor());
289 279
290 RefPtr<MediaStreamTrack> track = MediaStreamTrack::create(scriptExecutionCon text(), component); 280 RefPtr<MediaStreamTrack> track = MediaStreamTrack::create(scriptExecutionCon text(), component);
291 switch (component->source()->type()) { 281 switch (component->source()->type()) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 345
356 events.clear(); 346 events.clear();
357 } 347 }
358 348
359 URLRegistry& MediaStream::registry() const 349 URLRegistry& MediaStream::registry() const
360 { 350 {
361 return MediaStreamRegistry::registry(); 351 return MediaStreamRegistry::registry();
362 } 352 }
363 353
364 } // namespace WebCore 354 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/mediastream/MediaStream.h ('k') | Source/modules/mediastream/MediaStreamTrack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698