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

Side by Side Diff: Source/WebCore/platform/mediastream/MediaStreamCenter.cpp

Issue 13844006: MediaStream API: Moving Add/Remove track from WebMediaStreamCenterClient to WebMediaStream (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 8 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) 2011 Ericsson AB. All rights reserved. 2 * Copyright (C) 2011 Ericsson AB. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. 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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 void MediaStreamCenter::endLocalMediaStream(MediaStreamDescriptor* streamDescrip tor) 50 void MediaStreamCenter::endLocalMediaStream(MediaStreamDescriptor* streamDescrip tor)
51 { 51 {
52 MediaStreamDescriptorClient* client = streamDescriptor->client(); 52 MediaStreamDescriptorClient* client = streamDescriptor->client();
53 if (client) 53 if (client)
54 client->streamEnded(); 54 client->streamEnded();
55 else 55 else
56 streamDescriptor->setEnded(); 56 streamDescriptor->setEnded();
57 } 57 }
58 58
59 void MediaStreamCenter::addMediaStreamTrack(MediaStreamDescriptor* streamDescrip tor, MediaStreamComponent* component)
60 {
61 MediaStreamDescriptorClient* client = streamDescriptor->client();
62 if (client)
63 client->addRemoteTrack(component);
64 }
65
66 void MediaStreamCenter::removeMediaStreamTrack(MediaStreamDescriptor* streamDesc riptor, MediaStreamComponent* component)
67 {
68 MediaStreamDescriptorClient* client = streamDescriptor->client();
69 if (client)
70 client->removeRemoteTrack(component);
71 }
72
73 } // namespace WebCore 59 } // namespace WebCore
74 60
75 #endif // ENABLE(MEDIA_STREAM) 61 #endif // ENABLE(MEDIA_STREAM)
OLDNEW
« no previous file with comments | « Source/WebCore/platform/mediastream/MediaStreamCenter.h ('k') | Source/WebCore/platform/mediastream/MediaStreamDescriptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698