Skip to content

Commit

Permalink
Bug 1306137 - remove b2g camera code: Remove dom/camera/ and code whi…
Browse files Browse the repository at this point in the history
…ch depends on it. r=aosmond,bkelly

MozReview-Commit-ID: 7gvZrDtmcZP
  • Loading branch information
Archaeopteryx committed Oct 4, 2016
1 parent 0ec13f6 commit 5165924
Show file tree
Hide file tree
Showing 80 changed files with 5 additions and 16,460 deletions.
31 changes: 0 additions & 31 deletions dom/base/Navigator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
#ifdef MOZ_B2G_BT
#include "BluetoothManager.h"
#endif
#include "DOMCameraManager.h"

#ifdef MOZ_AUDIO_CHANNEL_MANAGER
#include "AudioChannelManager.h"
Expand Down Expand Up @@ -233,7 +232,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Navigator)
#ifdef MOZ_AUDIO_CHANNEL_MANAGER
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mAudioChannelManager)
#endif
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCameraManager)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMediaDevices)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTimeManager)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mServiceWorkerContainer)
Expand Down Expand Up @@ -331,7 +329,6 @@ Navigator::Invalidate()
}
#endif

mCameraManager = nullptr;
mMediaDevices = nullptr;

#ifdef MOZ_AUDIO_CHANNEL_MANAGER
Expand Down Expand Up @@ -1902,23 +1899,6 @@ Navigator::GetMozTime(ErrorResult& aRv)
}
#endif

nsDOMCameraManager*
Navigator::GetMozCameras(ErrorResult& aRv)
{
if (!mCameraManager) {
if (!mWindow ||
!mWindow->GetOuterWindow() ||
mWindow->GetOuterWindow()->GetCurrentInnerWindow() != mWindow) {
aRv.Throw(NS_ERROR_NOT_AVAILABLE);
return nullptr;
}

mCameraManager = nsDOMCameraManager::CreateInstance(mWindow);
}

return mCameraManager;
}

already_AddRefed<ServiceWorkerContainer>
Navigator::ServiceWorker()
{
Expand Down Expand Up @@ -1965,9 +1945,6 @@ Navigator::OnNavigation()
if (manager) {
manager->OnNavigation(mWindow->WindowID());
}
if (mCameraManager) {
mCameraManager->OnNavigation(mWindow->WindowID());
}
}

bool
Expand Down Expand Up @@ -2021,14 +1998,6 @@ Navigator::HasWakeLockSupport(JSContext* /* unused*/, JSObject* /*unused */)
return !!pmService;
}

/* static */
bool
Navigator::HasCameraSupport(JSContext* /* unused */, JSObject* aGlobal)
{
nsCOMPtr<nsPIDOMWindowInner> win = GetWindowFromGlobal(aGlobal);
return win && nsDOMCameraManager::CheckPermission(win);
}

/* static */
bool
Navigator::HasWifiManagerSupport(JSContext* /* unused */,
Expand Down
5 changes: 0 additions & 5 deletions dom/base/Navigator.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class nsPluginArray;
class nsMimeTypeArray;
class nsPIDOMWindowInner;
class nsIDOMNavigatorSystemMessages;
class nsDOMCameraManager;
class nsDOMDeviceStorage;
class nsIPrincipal;
class nsIURI;
Expand Down Expand Up @@ -230,7 +229,6 @@ class Navigator final : public nsIDOMNavigator
InputPortManager* GetInputPortManager(ErrorResult& aRv);
already_AddRefed<LegacyMozTCPSocket> MozTCPSocket();
network::Connection* GetConnection(ErrorResult& aRv);
nsDOMCameraManager* GetMozCameras(ErrorResult& aRv);
MediaDevices* GetMediaDevices(ErrorResult& aRv);

#ifdef MOZ_B2G_RIL
Expand Down Expand Up @@ -281,8 +279,6 @@ class Navigator final : public nsIDOMNavigator

// WebIDL helper methods
static bool HasWakeLockSupport(JSContext* /* unused*/, JSObject* /*unused */);
static bool HasCameraSupport(JSContext* /* unused */,
JSObject* aGlobal);
static bool HasWifiManagerSupport(JSContext* /* unused */,
JSObject* aGlobal);
#ifdef MOZ_NFC
Expand Down Expand Up @@ -347,7 +343,6 @@ class Navigator final : public nsIDOMNavigator
#ifdef MOZ_AUDIO_CHANNEL_MANAGER
RefPtr<system::AudioChannelManager> mAudioChannelManager;
#endif
RefPtr<nsDOMCameraManager> mCameraManager;
RefPtr<MediaDevices> mMediaDevices;
nsTArray<nsWeakPtr> mDeviceStorageStores;
RefPtr<time::TimeManager> mTimeManager;
Expand Down
16 changes: 0 additions & 16 deletions dom/base/nsContentPermissionHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,22 +686,6 @@ nsContentPermissionRequestProxy::Allow(JS::HandleValue aChoices)
return NS_ERROR_FAILURE;
}

#ifdef MOZ_WIDGET_GONK
uint32_t len = mPermissionRequests.Length();
for (uint32_t i = 0; i < len; i++) {
if (mPermissionRequests[i].type().EqualsLiteral("audio-capture")) {
GonkPermissionService::GetInstance()->addGrantInfo(
"android.permission.RECORD_AUDIO",
static_cast<ContentParent*>(mParent->Manager())->Pid());
}
if (mPermissionRequests[i].type().EqualsLiteral("video-capture")) {
GonkPermissionService::GetInstance()->addGrantInfo(
"android.permission.CAMERA",
static_cast<ContentParent*>(mParent->Manager())->Pid());
}
}
#endif

nsTArray<PermissionChoice> choices;
if (aChoices.isNullOrUndefined()) {
// No choice is specified.
Expand Down
7 changes: 0 additions & 7 deletions dom/base/nsGkAtomList.h
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,6 @@ GK_ATOM(oncomplete, "oncomplete")
GK_ATOM(oncompositionend, "oncompositionend")
GK_ATOM(oncompositionstart, "oncompositionstart")
GK_ATOM(oncompositionupdate, "oncompositionupdate")
GK_ATOM(onconfigurationchange, "onconfigurationchange")
GK_ATOM(onconnect, "onconnect")
GK_ATOM(onconnected, "onconnected")
GK_ATOM(onconnecting, "onconnecting")
Expand Down Expand Up @@ -791,7 +790,6 @@ GK_ATOM(onenterpincodereq, "onenterpincodereq")
GK_ATOM(onemergencycbmodechange, "onemergencycbmodechange")
GK_ATOM(onerror, "onerror")
GK_ATOM(onevicted, "onevicted")
GK_ATOM(onfacesdetected, "onfacesdetected")
GK_ATOM(onfailed, "onfailed")
GK_ATOM(onfetch, "onfetch")
GK_ATOM(onfinish, "onfinish")
Expand Down Expand Up @@ -882,16 +880,13 @@ GK_ATOM(onpairingconsentreq, "onpairingconsentreq")
GK_ATOM(onpaste, "onpaste")
GK_ATOM(onpendingchange, "onpendingchange")
GK_ATOM(onpichange, "onpichange")
GK_ATOM(onpicture, "onpicture")
GK_ATOM(onpointerlockchange, "onpointerlockchange")
GK_ATOM(onpointerlockerror, "onpointerlockerror")
GK_ATOM(onpopuphidden, "onpopuphidden")
GK_ATOM(onpopuphiding, "onpopuphiding")
GK_ATOM(onpopuppositioned, "onpopuppositioned")
GK_ATOM(onpopupshowing, "onpopupshowing")
GK_ATOM(onpopupshown, "onpopupshown")
GK_ATOM(onposter, "onposter")
GK_ATOM(onpreviewstatechange, "onpreviewstatechange")
GK_ATOM(onpullphonebookreq, "onpullphonebookreq")
GK_ATOM(onpullvcardentryreq, "onpullvcardentryreq")
GK_ATOM(onpullvcardlistingreq, "onpullvcardlistingreq")
Expand All @@ -907,7 +902,6 @@ GK_ATOM(onreadsuccess, "onreadsuccess")
GK_ATOM(onready, "onready")
GK_ATOM(onreadystatechange, "onreadystatechange")
GK_ATOM(onreceived, "onreceived")
GK_ATOM(onrecorderstatechange, "onrecorderstatechange")
GK_ATOM(onremoteheld, "onremoteheld")
GK_ATOM(onremoteresumed, "onremoteresumed")
GK_ATOM(onresourcetimingbufferfull, "onresourcetimingbufferfull")
Expand All @@ -928,7 +922,6 @@ GK_ATOM(onsending, "onsending")
GK_ATOM(onsent, "onsent")
GK_ATOM(onset, "onset")
GK_ATOM(onshow, "onshow")
GK_ATOM(onshutter, "onshutter")
GK_ATOM(onstatechange, "onstatechange")
GK_ATOM(onstatuschanged, "onstatuschanged")
GK_ATOM(onstkcommand, "onstkcommand")
Expand Down
39 changes: 0 additions & 39 deletions dom/bindings/Bindings.conf
Original file line number Diff line number Diff line change
Expand Up @@ -189,45 +189,6 @@ DOMInterfaces = {
'nativeType': 'mozilla::dom::cache::CacheStorage',
},

'CameraCapabilities': {
'nativeType': 'mozilla::dom::CameraCapabilities',
'headerFile': 'DOMCameraCapabilities.h'
},

'CameraControl': {
'nativeType': 'mozilla::nsDOMCameraControl',
'headerFile': 'DOMCameraControl.h',
'binaryNames': {
"release": "ReleaseHardware"
}
},

'CameraDetectedFace': {
'nativeType': 'mozilla::dom::DOMCameraDetectedFace',
'headerFile': 'DOMCameraDetectedFace.h'
},

'CameraManager': {
'nativeType': 'nsDOMCameraManager',
'headerFile': 'DOMCameraManager.h'
},

'CameraRecorderAudioProfile': {
'headerFile': 'DOMCameraCapabilities.h'
},

'CameraRecorderProfile': {
'headerFile': 'DOMCameraCapabilities.h'
},

'CameraRecorderProfiles': {
'headerFile': 'DOMCameraCapabilities.h'
},

'CameraRecorderVideoProfile': {
'headerFile': 'DOMCameraCapabilities.h'
},

'CanvasRenderingContext2D': {
'implicitJSContext': [
'createImageData', 'getImageData'
Expand Down
1 change: 0 additions & 1 deletion dom/bindings/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ LOCAL_INCLUDES += [
'/dom/base',
'/dom/battery',
'/dom/bluetooth/common/webapi',
'/dom/camera',
'/dom/canvas',
'/dom/geolocation',
'/dom/html',
Expand Down
49 changes: 0 additions & 49 deletions dom/camera/AutoRwLock.h

This file was deleted.

44 changes: 0 additions & 44 deletions dom/camera/CameraCommon.h

This file was deleted.

Loading

0 comments on commit 5165924

Please sign in to comment.