1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef DOM_CAMERA_DOMCAMERACONTROL_H
6 #define DOM_CAMERA_DOMCAMERACONTROL_H
10 #include "nsCycleCollectionParticipant.h"
11 #include "DictionaryHelpers.h"
12 #include "ICameraControl.h"
13 #include "DOMCameraPreview.h"
14 #include "nsIDOMCameraManager.h"
15 #include "CameraCommon.h"
20 // Main camera control.
21 class nsDOMCameraControl
: public nsICameraControl
24 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
25 NS_DECL_CYCLE_COLLECTION_CLASS(nsDOMCameraControl
)
26 NS_DECL_NSICAMERACONTROL
28 nsDOMCameraControl(uint32_t aCameraId
, nsIThread
* aCameraThread
, nsICameraGetCameraCallback
* onSuccess
, nsICameraErrorCallback
* onError
, uint64_t aWindowId
);
29 nsresult
Result(nsresult aResult
, nsICameraGetCameraCallback
* onSuccess
, nsICameraErrorCallback
* onError
, uint64_t aWindowId
);
34 virtual ~nsDOMCameraControl();
37 nsDOMCameraControl(const nsDOMCameraControl
&) MOZ_DELETE
;
38 nsDOMCameraControl
& operator=(const nsDOMCameraControl
&) MOZ_DELETE
;
41 /* additional members */
42 nsRefPtr
<ICameraControl
> mCameraControl
; // non-DOM camera control
43 nsCOMPtr
<nsICameraCapabilities
> mDOMCapabilities
;
46 } // namespace mozilla
48 #endif // DOM_CAMERA_DOMCAMERACONTROL_H