| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2011 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 20 matching lines...) Expand all Loading... |
| 31 #include "core/dom/ExecutionContext.h" | 31 #include "core/dom/ExecutionContext.h" |
| 32 #include "core/events/Event.h" | 32 #include "core/events/Event.h" |
| 33 #include "modules/mediastream/MediaStreamTrackSourcesCallback.h" | 33 #include "modules/mediastream/MediaStreamTrackSourcesCallback.h" |
| 34 #include "modules/mediastream/MediaStreamTrackSourcesRequestImpl.h" | 34 #include "modules/mediastream/MediaStreamTrackSourcesRequestImpl.h" |
| 35 #include "platform/mediastream/MediaStreamCenter.h" | 35 #include "platform/mediastream/MediaStreamCenter.h" |
| 36 #include "platform/mediastream/MediaStreamComponent.h" | 36 #include "platform/mediastream/MediaStreamComponent.h" |
| 37 #include "public/platform/WebSourceInfo.h" | 37 #include "public/platform/WebSourceInfo.h" |
| 38 | 38 |
| 39 namespace WebCore { | 39 namespace WebCore { |
| 40 | 40 |
| 41 PassRefPtr<MediaStreamTrack> MediaStreamTrack::create(ExecutionContext* context,
MediaStreamComponent* component) | 41 DEFINE_GC_INFO(MediaStreamTrack); |
| 42 |
| 43 PassRefPtrWillBeRawPtr<MediaStreamTrack> MediaStreamTrack::create(ExecutionConte
xt* context, MediaStreamComponent* component) |
| 42 { | 44 { |
| 43 RefPtr<MediaStreamTrack> track = adoptRef(new MediaStreamTrack(context, comp
onent)); | 45 RefPtrWillBeRawPtr<MediaStreamTrack> track = adoptRefCountedWillBeRefCounted
GarbageCollected(new MediaStreamTrack(context, component)); |
| 44 track->suspendIfNeeded(); | 46 track->suspendIfNeeded(); |
| 45 return track.release(); | 47 return track.release(); |
| 46 } | 48 } |
| 47 | 49 |
| 48 MediaStreamTrack::MediaStreamTrack(ExecutionContext* context, MediaStreamCompone
nt* component) | 50 MediaStreamTrack::MediaStreamTrack(ExecutionContext* context, MediaStreamCompone
nt* component) |
| 49 : ActiveDOMObject(context) | 51 : ActiveDOMObject(context) |
| 50 , m_stopped(false) | 52 , m_stopped(false) |
| 51 , m_component(component) | 53 , m_component(component) |
| 52 { | 54 { |
| 53 ScriptWrappable::init(this); | 55 ScriptWrappable::init(this); |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 { | 190 { |
| 189 return EventTargetNames::MediaStreamTrack; | 191 return EventTargetNames::MediaStreamTrack; |
| 190 } | 192 } |
| 191 | 193 |
| 192 ExecutionContext* MediaStreamTrack::executionContext() const | 194 ExecutionContext* MediaStreamTrack::executionContext() const |
| 193 { | 195 { |
| 194 return ActiveDOMObject::executionContext(); | 196 return ActiveDOMObject::executionContext(); |
| 195 } | 197 } |
| 196 | 198 |
| 197 } // namespace WebCore | 199 } // namespace WebCore |
| OLD | NEW |