Backed out changeset e92f1571ab9d (bug 1029401) for Android Test failure on a CLOSED TREE

This commit is contained in:
Carsten "Tomcat" Book 2014-06-27 14:23:55 +02:00
parent a66428a56c
commit 9e0944861f
5 changed files with 11 additions and 23 deletions

View File

@ -37,14 +37,6 @@ MediaEngineTabVideoSource::MediaEngineTabVideoSource()
nsresult
MediaEngineTabVideoSource::StartRunnable::Run()
{
nsCOMPtr<nsIDOMWindow> win;
nsresult rv = mVideoSource->mTabSource->GetTabToStream(getter_AddRefs(win));
NS_ENSURE_SUCCESS(rv, rv);
if (!win)
return NS_OK;
mVideoSource->mWindow = win;
mVideoSource->Draw();
nsCOMPtr<nsPIDOMWindow> privateDOMWindow = do_QueryInterface(mVideoSource->mWindow);
if (privateDOMWindow) {
@ -102,6 +94,13 @@ MediaEngineTabVideoSource::InitRunnable::Run()
mVideoSource->mTabSource = do_GetService(NS_TABSOURCESERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDOMWindow> win;
rv = mVideoSource->mTabSource->GetTabToStream(getter_AddRefs(win));
NS_ENSURE_SUCCESS(rv, rv);
if (!win)
return NS_OK;
mVideoSource->mWindow = win;
nsCOMPtr<nsIRunnable> start(new StartRunnable(mVideoSource));
start->Run();
return NS_OK;

View File

@ -2,9 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef MEDIAENGINETABVIDEOSOURCE_H_
#define MEDIAENGINETABVIDEOSOURCE_H_
#include "nsIDOMEventListener.h"
#include "MediaEngine.h"
#include "ImageContainer.h"
@ -70,5 +67,3 @@ private:
nsCOMPtr<nsITabSource> mTabSource;
};
}
#endif /* MEDIAENGINETABVIDEOSOURCE_H_ */

View File

@ -30,6 +30,7 @@ GetUserMediaLog()
#include "MediaEngineWebRTC.h"
#include "ImageContainer.h"
#include "nsIComponentRegistrar.h"
#include "MediaEngineTabVideoSource.h"
#include "nsITabSource.h"
#include "MediaTrackConstraints.h"
@ -209,12 +210,8 @@ MediaEngineWebRTC::EnumerateVideoDevices(nsTArray<nsRefPtr<MediaEngineVideoSourc
}
}
if (mHasTabVideoSource) {
if (!mTabVideoSource) {
mTabVideoSource = new MediaEngineTabVideoSource();
}
aVSources->AppendElement(mTabVideoSource);
}
if (mHasTabVideoSource)
aVSources->AppendElement(new MediaEngineTabVideoSource());
return;
#endif

View File

@ -28,7 +28,6 @@
#include "MediaStreamGraph.h"
#include "MediaEngineWrapper.h"
#include "MediaEngineTabVideoSource.h"
// WebRTC library includes follow
@ -404,7 +403,6 @@ private:
// Maps UUID to MediaEngineSource (one set for audio, one for video).
nsRefPtrHashtable<nsStringHashKey, MediaEngineWebRTCVideoSource > mVideoSources;
nsRefPtrHashtable<nsStringHashKey, MediaEngineWebRTCAudioSource > mAudioSources;
nsRefPtr<MediaEngineTabVideoSource> mTabVideoSource;
};
}

View File

@ -17,8 +17,7 @@ if CONFIG['MOZ_WEBRTC']:
'LoadManager.h',
'LoadManagerFactory.h',
'LoadMonitor.h',
'MediaEngineTabVideoSource.h',
'MediaEngineWebRTC.h', ]
'MediaEngineWebRTC.h']
UNIFIED_SOURCES += [
'LoadManager.cpp',
'LoadManagerFactory.cpp',