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

Side by Side Diff: Source/modules/mediastream/MediaStreamRegistry.cpp

Issue 16753003: Revert "Remove MediaStreamDescriptor and call/use WebMediaStream directly" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 25 matching lines...) Expand all
36 // Since WebWorkers cannot obtain MediaSource objects, we should be on the m ain thread. 36 // Since WebWorkers cannot obtain MediaSource objects, we should be on the m ain thread.
37 ASSERT(isMainThread()); 37 ASSERT(isMainThread());
38 DEFINE_STATIC_LOCAL(MediaStreamRegistry, instance, ()); 38 DEFINE_STATIC_LOCAL(MediaStreamRegistry, instance, ());
39 return instance; 39 return instance;
40 } 40 }
41 41
42 void MediaStreamRegistry::registerURL(SecurityOrigin*, const KURL& url, URLRegis trable* stream) 42 void MediaStreamRegistry::registerURL(SecurityOrigin*, const KURL& url, URLRegis trable* stream)
43 { 43 {
44 ASSERT(&stream->registry() == this); 44 ASSERT(&stream->registry() == this);
45 ASSERT(isMainThread()); 45 ASSERT(isMainThread());
46 m_webMediaStreams.set(url.string(), static_cast<MediaStream*>(stream)->webSt ream()); 46 m_streamDescriptors.set(url.string(), static_cast<MediaStream*>(stream)->des criptor());
47 } 47 }
48 48
49 void MediaStreamRegistry::unregisterURL(const KURL& url) 49 void MediaStreamRegistry::unregisterURL(const KURL& url)
50 { 50 {
51 ASSERT(isMainThread()); 51 ASSERT(isMainThread());
52 m_webMediaStreams.remove(url.string()); 52 m_streamDescriptors.remove(url.string());
53 } 53 }
54 54
55 WebKit::WebMediaStream MediaStreamRegistry::lookupWebMediaStream(const String& u rl) 55 MediaStreamDescriptor* MediaStreamRegistry::lookupMediaStreamDescriptor(const St ring& url)
56 { 56 {
57 ASSERT(isMainThread()); 57 ASSERT(isMainThread());
58 return m_webMediaStreams.get(url); 58 return m_streamDescriptors.get(url);
59 } 59 }
60 60
61 } // namespace WebCore 61 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/mediastream/MediaStreamRegistry.h ('k') | Source/modules/mediastream/MediaStreamTrack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698