2012-09-04 18:01:56 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* 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 DOM_CAMERA_DOMCAMERACONTROL_H
|
|
|
|
#define DOM_CAMERA_DOMCAMERACONTROL_H
|
|
|
|
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsAutoPtr.h"
|
|
|
|
#include "nsCycleCollectionParticipant.h"
|
|
|
|
#include "DictionaryHelpers.h"
|
|
|
|
#include "ICameraControl.h"
|
|
|
|
#include "DOMCameraPreview.h"
|
|
|
|
#include "nsIDOMCameraManager.h"
|
|
|
|
#include "CameraCommon.h"
|
2012-12-11 02:14:06 -08:00
|
|
|
#include "AudioChannelAgent.h"
|
2012-09-04 18:01:56 -07:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
|
|
|
|
|
|
|
|
// Main camera control.
|
|
|
|
class nsDOMCameraControl : public nsICameraControl
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS(nsDOMCameraControl)
|
|
|
|
NS_DECL_NSICAMERACONTROL
|
|
|
|
|
2012-09-30 17:37:47 -07:00
|
|
|
nsDOMCameraControl(uint32_t aCameraId, nsIThread* aCameraThread, nsICameraGetCameraCallback* onSuccess, nsICameraErrorCallback* onError, uint64_t aWindowId);
|
|
|
|
nsresult Result(nsresult aResult, nsICameraGetCameraCallback* onSuccess, nsICameraErrorCallback* onError, uint64_t aWindowId);
|
|
|
|
|
|
|
|
void Shutdown();
|
2012-09-04 18:01:56 -07:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual ~nsDOMCameraControl();
|
|
|
|
|
|
|
|
private:
|
|
|
|
nsDOMCameraControl(const nsDOMCameraControl&) MOZ_DELETE;
|
|
|
|
nsDOMCameraControl& operator=(const nsDOMCameraControl&) MOZ_DELETE;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
/* additional members */
|
|
|
|
nsRefPtr<ICameraControl> mCameraControl; // non-DOM camera control
|
|
|
|
nsCOMPtr<nsICameraCapabilities> mDOMCapabilities;
|
2012-12-11 02:14:06 -08:00
|
|
|
// An agent used to join audio channel service.
|
|
|
|
nsCOMPtr<nsIAudioChannelAgent> mAudioChannelAgent;
|
2012-09-04 18:01:56 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // DOM_CAMERA_DOMCAMERACONTROL_H
|