dom/camera/DOMCameraControl.cpp
changeset 177875 72a05425a854e7b482b61101a52ed3cb8551eb8f
parent 177874 e6ac52f874d097648fcf91fd2db247af3a297d6b
child 177876 958d209e788e0f45fa3dc73b52699c3f4b811043
--- a/dom/camera/DOMCameraControl.cpp
+++ b/dom/camera/DOMCameraControl.cpp
@@ -15,16 +15,17 @@
 #include "mozilla/MediaManager.h"
 #include "mozilla/Services.h"
 #include "mozilla/unused.h"
 #include "nsIAppsService.h"
 #include "nsIObserverService.h"
 #include "nsIDOMDeviceStorage.h"
 #include "nsIDOMEventListener.h"
 #include "nsIScriptSecurityManager.h"
+#include "Navigator.h"
 #include "nsXULAppAPI.h"
 #include "DOMCameraManager.h"
 #include "DOMCameraCapabilities.h"
 #include "CameraCommon.h"
 #include "nsGlobalWindow.h"
 #include "CameraPreviewMediaStream.h"
 #include "mozilla/dom/CameraControlBinding.h"
 #include "mozilla/dom/CameraManagerBinding.h"
@@ -61,16 +62,23 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED_20(ns
                                       mSetConfigurationOnErrorCb,
                                       mOnShutterCb,
                                       mOnClosedCb,
                                       mOnRecorderStateChangeCb,
                                       mOnPreviewStateChangeCb,
                                       mOnAutoFocusMovingCb,
                                       mOnFacesDetectedCb)
 
+/* static */
+bool
+nsDOMCameraControl::HasSupport(JSContext* aCx, JSObject* aGlobal)
+{
+  return Navigator::HasCameraSupport(aCx, aGlobal);
+}
+
 class mozilla::StartRecordingHelper : public nsIDOMEventListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDOMEVENTLISTENER
 
   StartRecordingHelper(nsDOMCameraControl* aDOMCameraControl)
     : mDOMCameraControl(aDOMCameraControl)