mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 839528 - Change the namespace of xpidl dictionary helpers, r=khuey
This commit is contained in:
parent
cd8c72e7b9
commit
b9080a0df7
@ -499,7 +499,7 @@ nsXMLHttpRequest::Initialize(nsISupports* aOwner, JSContext* cx, JSObject* obj,
|
||||
nsresult
|
||||
nsXMLHttpRequest::InitParameters(JSContext* aCx, const jsval* aParams)
|
||||
{
|
||||
XMLHttpRequestParameters params;
|
||||
mozilla::idl::XMLHttpRequestParameters params;
|
||||
nsresult rv = params.Init(aCx, aParams);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -124,7 +124,7 @@ nsresult
|
||||
DOMWheelEvent::InitFromCtor(const nsAString& aType,
|
||||
JSContext* aCx, jsval* aVal)
|
||||
{
|
||||
WheelEventInit d;
|
||||
mozilla::idl::WheelEventInit d;
|
||||
nsresult rv = d.Init(aCx, aVal);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -309,7 +309,7 @@ nsresult
|
||||
nsDOMEvent::InitFromCtor(const nsAString& aType,
|
||||
JSContext* aCx, jsval* aVal)
|
||||
{
|
||||
mozilla::dom::EventInit d;
|
||||
mozilla::idl::EventInit d;
|
||||
nsresult rv = d.Init(aCx, aVal);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
return InitEvent(aType, d.bubbles, d.cancelable);
|
||||
|
@ -154,7 +154,7 @@ nsresult
|
||||
nsDOMMouseEvent::InitFromCtor(const nsAString& aType,
|
||||
JSContext* aCx, jsval* aVal)
|
||||
{
|
||||
mozilla::dom::MouseEventInit d;
|
||||
mozilla::idl::MouseEventInit d;
|
||||
nsresult rv = d.Init(aCx, aVal);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = InitMouseEvent(aType, d.bubbles, d.cancelable,
|
||||
|
@ -172,7 +172,7 @@ nsresult
|
||||
nsDOMUIEvent::InitFromCtor(const nsAString& aType,
|
||||
JSContext* aCx, jsval* aVal)
|
||||
{
|
||||
mozilla::dom::UIEventInit d;
|
||||
mozilla::idl::UIEventInit d;
|
||||
nsresult rv = d.Init(aCx, aVal);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
return InitUIEvent(aType, d.bubbles, d.cancelable, d.view, d.detail);
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
using namespace mozilla::idl;
|
||||
|
||||
CameraControlImpl::CameraControlImpl(uint32_t aCameraId, nsIThread* aCameraThread, uint64_t aWindowId)
|
||||
: mCameraId(aCameraId)
|
||||
|
@ -48,14 +48,14 @@ class CameraControlImpl : public ICameraControl
|
||||
public:
|
||||
CameraControlImpl(uint32_t aCameraId, nsIThread* aCameraThread, uint64_t aWindowId);
|
||||
|
||||
nsresult GetPreviewStream(dom::CameraSize aSize, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError);
|
||||
nsresult GetPreviewStream(idl::CameraSize aSize, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError);
|
||||
nsresult StartPreview(DOMCameraPreview* aDOMPreview);
|
||||
void StopPreview();
|
||||
nsresult AutoFocus(nsICameraAutoFocusCallback* onSuccess, nsICameraErrorCallback* onError);
|
||||
nsresult TakePicture(dom::CameraSize aSize, int32_t aRotation, const nsAString& aFileFormat, dom::CameraPosition aPosition, uint64_t aDateTime, nsICameraTakePictureCallback* onSuccess, nsICameraErrorCallback* onError);
|
||||
nsresult StartRecording(dom::CameraStartRecordingOptions* aOptions, nsIFile* aFolder, const nsAString& aFilename, nsICameraStartRecordingCallback* onSuccess, nsICameraErrorCallback* onError);
|
||||
nsresult TakePicture(idl::CameraSize aSize, int32_t aRotation, const nsAString& aFileFormat, idl::CameraPosition aPosition, uint64_t aDateTime, nsICameraTakePictureCallback* onSuccess, nsICameraErrorCallback* onError);
|
||||
nsresult StartRecording(idl::CameraStartRecordingOptions* aOptions, nsIFile* aFolder, const nsAString& aFilename, nsICameraStartRecordingCallback* onSuccess, nsICameraErrorCallback* onError);
|
||||
nsresult StopRecording();
|
||||
nsresult GetPreviewStreamVideoMode(dom::CameraRecorderOptions* aOptions, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError);
|
||||
nsresult GetPreviewStreamVideoMode(idl::CameraRecorderOptions* aOptions, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError);
|
||||
nsresult ReleaseHardware(nsICameraReleaseCallback* onSuccess, nsICameraErrorCallback* onError);
|
||||
|
||||
nsresult Set(uint32_t aKey, const nsAString& aValue);
|
||||
@ -87,12 +87,12 @@ public:
|
||||
virtual const char* GetParameter(const char* aKey) = 0;
|
||||
virtual const char* GetParameterConstChar(uint32_t aKey) = 0;
|
||||
virtual double GetParameterDouble(uint32_t aKey) = 0;
|
||||
virtual void GetParameter(uint32_t aKey, nsTArray<dom::CameraRegion>& aRegions) = 0;
|
||||
virtual void GetParameter(uint32_t aKey, nsTArray<idl::CameraRegion>& aRegions) = 0;
|
||||
virtual void SetParameter(const char* aKey, const char* aValue) = 0;
|
||||
virtual void SetParameter(uint32_t aKey, const char* aValue) = 0;
|
||||
virtual void SetParameter(uint32_t aKey, double aValue) = 0;
|
||||
virtual void SetParameter(uint32_t aKey, const nsTArray<dom::CameraRegion>& aRegions) = 0;
|
||||
virtual nsresult GetVideoSizes(nsTArray<dom::CameraSize>& aVideoSizes) = 0;
|
||||
virtual void SetParameter(uint32_t aKey, const nsTArray<idl::CameraRegion>& aRegions) = 0;
|
||||
virtual nsresult GetVideoSizes(nsTArray<idl::CameraSize>& aVideoSizes) = 0;
|
||||
virtual nsresult PushParameters() = 0;
|
||||
virtual void Shutdown();
|
||||
|
||||
@ -217,7 +217,7 @@ protected:
|
||||
class GetPreviewStreamTask : public nsRunnable
|
||||
{
|
||||
public:
|
||||
GetPreviewStreamTask(CameraControlImpl* aCameraControl, dom::CameraSize aSize, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError)
|
||||
GetPreviewStreamTask(CameraControlImpl* aCameraControl, idl::CameraSize aSize, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError)
|
||||
: mSize(aSize)
|
||||
, mCameraControl(aCameraControl)
|
||||
, mOnSuccessCb(new nsMainThreadPtrHolder<nsICameraPreviewStreamCallback>(onSuccess))
|
||||
@ -243,7 +243,7 @@ public:
|
||||
return rv;
|
||||
}
|
||||
|
||||
dom::CameraSize mSize;
|
||||
idl::CameraSize mSize;
|
||||
nsRefPtr<CameraControlImpl> mCameraControl;
|
||||
nsMainThreadPtrHandle<nsICameraPreviewStreamCallback> mOnSuccessCb;
|
||||
nsMainThreadPtrHandle<nsICameraErrorCallback> mOnErrorCb;
|
||||
@ -361,7 +361,7 @@ protected:
|
||||
class TakePictureTask : public nsRunnable
|
||||
{
|
||||
public:
|
||||
TakePictureTask(CameraControlImpl* aCameraControl, bool aCancel, dom::CameraSize aSize, int32_t aRotation, const nsAString& aFileFormat, dom::CameraPosition aPosition, uint64_t aDateTime, nsICameraTakePictureCallback* onSuccess, nsICameraErrorCallback* onError)
|
||||
TakePictureTask(CameraControlImpl* aCameraControl, bool aCancel, idl::CameraSize aSize, int32_t aRotation, const nsAString& aFileFormat, idl::CameraPosition aPosition, uint64_t aDateTime, nsICameraTakePictureCallback* onSuccess, nsICameraErrorCallback* onError)
|
||||
: mCameraControl(aCameraControl)
|
||||
, mCancel(aCancel)
|
||||
, mSize(aSize)
|
||||
@ -396,10 +396,10 @@ public:
|
||||
|
||||
nsRefPtr<CameraControlImpl> mCameraControl;
|
||||
bool mCancel;
|
||||
dom::CameraSize mSize;
|
||||
idl::CameraSize mSize;
|
||||
int32_t mRotation;
|
||||
nsString mFileFormat;
|
||||
dom::CameraPosition mPosition;
|
||||
idl::CameraPosition mPosition;
|
||||
uint64_t mDateTime;
|
||||
nsMainThreadPtrHandle<nsICameraTakePictureCallback> mOnSuccessCb;
|
||||
nsMainThreadPtrHandle<nsICameraErrorCallback> mOnErrorCb;
|
||||
@ -435,7 +435,7 @@ protected:
|
||||
class StartRecordingTask : public nsRunnable
|
||||
{
|
||||
public:
|
||||
StartRecordingTask(CameraControlImpl* aCameraControl, dom::CameraStartRecordingOptions aOptions, nsIFile* aFolder, const nsAString& aFilename, nsICameraStartRecordingCallback* onSuccess, nsICameraErrorCallback* onError, uint64_t aWindowId)
|
||||
StartRecordingTask(CameraControlImpl* aCameraControl, idl::CameraStartRecordingOptions aOptions, nsIFile* aFolder, const nsAString& aFilename, nsICameraStartRecordingCallback* onSuccess, nsICameraErrorCallback* onError, uint64_t aWindowId)
|
||||
: mCameraControl(aCameraControl)
|
||||
, mOptions(aOptions)
|
||||
, mFolder(aFolder)
|
||||
@ -473,7 +473,7 @@ public:
|
||||
}
|
||||
|
||||
nsRefPtr<CameraControlImpl> mCameraControl;
|
||||
dom::CameraStartRecordingOptions mOptions;
|
||||
idl::CameraStartRecordingOptions mOptions;
|
||||
nsCOMPtr<nsIFile> mFolder;
|
||||
nsString mFilename;
|
||||
nsMainThreadPtrHandle<nsICameraStartRecordingCallback> mOnSuccessCb;
|
||||
@ -570,7 +570,7 @@ public:
|
||||
class GetPreviewStreamVideoModeTask : public nsRunnable
|
||||
{
|
||||
public:
|
||||
GetPreviewStreamVideoModeTask(CameraControlImpl* aCameraControl, dom::CameraRecorderOptions aOptions, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError)
|
||||
GetPreviewStreamVideoModeTask(CameraControlImpl* aCameraControl, idl::CameraRecorderOptions aOptions, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError)
|
||||
: mCameraControl(aCameraControl)
|
||||
, mOptions(aOptions)
|
||||
, mOnSuccessCb(new nsMainThreadPtrHolder<nsICameraPreviewStreamCallback>(onSuccess))
|
||||
@ -592,7 +592,7 @@ public:
|
||||
}
|
||||
|
||||
nsRefPtr<CameraControlImpl> mCameraControl;
|
||||
dom::CameraRecorderOptions mOptions;
|
||||
idl::CameraRecorderOptions mOptions;
|
||||
nsMainThreadPtrHandle<nsICameraPreviewStreamCallback> mOnSuccessCb;
|
||||
nsMainThreadPtrHandle<nsICameraErrorCallback> mOnErrorCb;
|
||||
};
|
||||
|
@ -350,7 +350,7 @@ DOMCameraCapabilities::GetVideoSizes(JSContext* cx, JS::Value* aVideoSizes)
|
||||
{
|
||||
NS_ENSURE_TRUE(mCamera, NS_ERROR_NOT_AVAILABLE);
|
||||
|
||||
nsTArray<CameraSize> sizes;
|
||||
nsTArray<mozilla::idl::CameraSize> sizes;
|
||||
nsresult rv = mCamera->GetVideoSizes(sizes);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (sizes.Length() == 0) {
|
||||
|
@ -244,7 +244,7 @@ nsDOMCameraControl::StartRecording(const JS::Value& aOptions, nsIDOMDeviceStorag
|
||||
NS_ENSURE_TRUE(onSuccess, NS_ERROR_INVALID_ARG);
|
||||
NS_ENSURE_TRUE(storageArea, NS_ERROR_INVALID_ARG);
|
||||
|
||||
CameraStartRecordingOptions options;
|
||||
mozilla::idl::CameraStartRecordingOptions options;
|
||||
|
||||
// Default values, until the dictionary parser can handle them.
|
||||
options.rotation = 0;
|
||||
@ -321,7 +321,7 @@ nsDOMCameraControl::GetPreviewStream(const JS::Value& aOptions, nsICameraPreview
|
||||
{
|
||||
NS_ENSURE_TRUE(onSuccess, NS_ERROR_INVALID_ARG);
|
||||
|
||||
CameraSize size;
|
||||
mozilla::idl::CameraSize size;
|
||||
nsresult rv = size.Init(cx, &aOptions);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
@ -349,9 +349,9 @@ nsDOMCameraControl::TakePicture(const JS::Value& aOptions, nsICameraTakePictureC
|
||||
{
|
||||
NS_ENSURE_TRUE(onSuccess, NS_ERROR_INVALID_ARG);
|
||||
|
||||
CameraPictureOptions options;
|
||||
CameraSize size;
|
||||
CameraPosition pos;
|
||||
mozilla::idl::CameraPictureOptions options;
|
||||
mozilla::idl::CameraSize size;
|
||||
mozilla::idl::CameraPosition pos;
|
||||
|
||||
nsresult rv = options.Init(cx, &aOptions);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
@ -379,7 +379,7 @@ nsDOMCameraControl::GetPreviewStreamVideoMode(const JS::Value& aOptions, nsICame
|
||||
{
|
||||
NS_ENSURE_TRUE(onSuccess, NS_ERROR_INVALID_ARG);
|
||||
|
||||
CameraRecorderOptions options;
|
||||
mozilla::idl::CameraRecorderOptions options;
|
||||
nsresult rv = options.Init(cx, &aOptions);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -108,7 +108,7 @@ nsDOMCameraManager::GetCamera(const JS::Value& aOptions, nsICameraGetCameraCallb
|
||||
NS_ENSURE_TRUE(onSuccess, NS_ERROR_INVALID_ARG);
|
||||
|
||||
uint32_t cameraId = 0; // back (or forward-facing) camera by default
|
||||
CameraSelector selector;
|
||||
mozilla::idl::CameraSelector selector;
|
||||
|
||||
nsresult rv = selector.Init(cx, &aOptions);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -24,12 +24,12 @@ public:
|
||||
const char* GetParameter(const char* aKey);
|
||||
const char* GetParameterConstChar(uint32_t aKey);
|
||||
double GetParameterDouble(uint32_t aKey);
|
||||
void GetParameter(uint32_t aKey, nsTArray<dom::CameraRegion>& aRegions);
|
||||
void GetParameter(uint32_t aKey, nsTArray<idl::CameraRegion>& aRegions);
|
||||
void SetParameter(const char* aKey, const char* aValue);
|
||||
void SetParameter(uint32_t aKey, const char* aValue);
|
||||
void SetParameter(uint32_t aKey, double aValue);
|
||||
void SetParameter(uint32_t aKey, const nsTArray<dom::CameraRegion>& aRegions);
|
||||
nsresult GetVideoSizes(nsTArray<CameraSize>& aVideoSizes);
|
||||
void SetParameter(uint32_t aKey, const nsTArray<idl::CameraRegion>& aRegions);
|
||||
nsresult GetVideoSizes(nsTArray<idl::CameraSize>& aVideoSizes);
|
||||
nsresult PushParameters();
|
||||
|
||||
protected:
|
||||
@ -97,7 +97,7 @@ nsFallbackCameraControl::GetParameterDouble(uint32_t aKey)
|
||||
}
|
||||
|
||||
void
|
||||
nsFallbackCameraControl::GetParameter(uint32_t aKey, nsTArray<dom::CameraRegion>& aRegions)
|
||||
nsFallbackCameraControl::GetParameter(uint32_t aKey, nsTArray<idl::CameraRegion>& aRegions)
|
||||
{
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ nsFallbackCameraControl::SetParameter(uint32_t aKey, double aValue)
|
||||
}
|
||||
|
||||
void
|
||||
nsFallbackCameraControl::SetParameter(uint32_t aKey, const nsTArray<dom::CameraRegion>& aRegions)
|
||||
nsFallbackCameraControl::SetParameter(uint32_t aKey, const nsTArray<idl::CameraRegion>& aRegions)
|
||||
{
|
||||
}
|
||||
|
||||
@ -182,7 +182,7 @@ nsFallbackCameraControl::PullParametersImpl()
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsFallbackCameraControl::GetVideoSizes(nsTArray<CameraSize>& aVideoSizes)
|
||||
nsFallbackCameraControl::GetVideoSizes(nsTArray<idl::CameraSize>& aVideoSizes)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
@ -405,7 +405,8 @@ nsGonkCameraControl::GetParameterDouble(uint32_t aKey)
|
||||
}
|
||||
|
||||
void
|
||||
nsGonkCameraControl::GetParameter(uint32_t aKey, nsTArray<CameraRegion>& aRegions)
|
||||
nsGonkCameraControl::GetParameter(uint32_t aKey,
|
||||
nsTArray<idl::CameraRegion>& aRegions)
|
||||
{
|
||||
aRegions.Clear();
|
||||
|
||||
@ -432,7 +433,7 @@ nsGonkCameraControl::GetParameter(uint32_t aKey, nsTArray<CameraRegion>& aRegion
|
||||
}
|
||||
|
||||
aRegions.SetCapacity(count);
|
||||
CameraRegion* r;
|
||||
idl::CameraRegion* r;
|
||||
|
||||
// parse all of the region sets
|
||||
uint32_t i;
|
||||
@ -449,7 +450,8 @@ nsGonkCameraControl::GetParameter(uint32_t aKey, nsTArray<CameraRegion>& aRegion
|
||||
}
|
||||
|
||||
void
|
||||
nsGonkCameraControl::GetParameter(uint32_t aKey, nsTArray<CameraSize>& aSizes)
|
||||
nsGonkCameraControl::GetParameter(uint32_t aKey,
|
||||
nsTArray<idl::CameraSize>& aSizes)
|
||||
{
|
||||
const char* key = getKeyText(aKey);
|
||||
if (!key) {
|
||||
@ -465,7 +467,7 @@ nsGonkCameraControl::GetParameter(uint32_t aKey, nsTArray<CameraSize>& aSizes)
|
||||
}
|
||||
|
||||
const char* p = value;
|
||||
CameraSize* s;
|
||||
idl::CameraSize* s;
|
||||
|
||||
// The 'value' string is in the format "w1xh1,w2xh2,w3xh3,..."
|
||||
while (p) {
|
||||
@ -563,7 +565,8 @@ nsGonkCameraControl::SetParameter(uint32_t aKey, double aValue)
|
||||
}
|
||||
|
||||
void
|
||||
nsGonkCameraControl::SetParameter(uint32_t aKey, const nsTArray<CameraRegion>& aRegions)
|
||||
nsGonkCameraControl::SetParameter(uint32_t aKey,
|
||||
const nsTArray<idl::CameraRegion>& aRegions)
|
||||
{
|
||||
const char* key = getKeyText(aKey);
|
||||
if (!key) {
|
||||
@ -582,7 +585,7 @@ nsGonkCameraControl::SetParameter(uint32_t aKey, const nsTArray<CameraRegion>& a
|
||||
nsCString s;
|
||||
|
||||
for (uint32_t i = 0; i < length; ++i) {
|
||||
const CameraRegion* r = &aRegions[i];
|
||||
const idl::CameraRegion* r = &aRegions[i];
|
||||
s.AppendPrintf("(%d,%d,%d,%d,%d),", r->top, r->left, r->bottom, r->right, r->weight);
|
||||
}
|
||||
|
||||
@ -703,7 +706,7 @@ nsGonkCameraControl::SetupThumbnail(uint32_t aPictureWidth, uint32_t aPictureHei
|
||||
*/
|
||||
uint32_t smallestArea = UINT_MAX;
|
||||
uint32_t smallestIndex = UINT_MAX;
|
||||
nsAutoTArray<CameraSize, 8> thumbnailSizes;
|
||||
nsAutoTArray<idl::CameraSize, 8> thumbnailSizes;
|
||||
GetParameter(CAMERA_PARAM_SUPPORTED_JPEG_THUMBNAIL_SIZES, thumbnailSizes);
|
||||
|
||||
for (uint32_t i = 0; i < thumbnailSizes.Length(); ++i) {
|
||||
@ -1344,7 +1347,7 @@ already_AddRefed<GonkRecorderProfileManager>
|
||||
nsGonkCameraControl::GetGonkRecorderProfileManager()
|
||||
{
|
||||
if (!mProfileManager) {
|
||||
nsTArray<CameraSize> sizes;
|
||||
nsTArray<idl::CameraSize> sizes;
|
||||
nsresult rv = GetVideoSizes(sizes);
|
||||
NS_ENSURE_SUCCESS(rv, nullptr);
|
||||
|
||||
@ -1364,7 +1367,7 @@ nsGonkCameraControl::GetRecorderProfileManagerImpl()
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsGonkCameraControl::GetVideoSizes(nsTArray<CameraSize>& aVideoSizes)
|
||||
nsGonkCameraControl::GetVideoSizes(nsTArray<idl::CameraSize>& aVideoSizes)
|
||||
{
|
||||
aVideoSizes.Clear();
|
||||
|
||||
@ -1381,7 +1384,7 @@ nsGonkCameraControl::GetVideoSizes(nsTArray<CameraSize>& aVideoSizes)
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < sizes.size(); ++i) {
|
||||
CameraSize size;
|
||||
idl::CameraSize size;
|
||||
size.width = sizes[i].width;
|
||||
size.height = sizes[i].height;
|
||||
aVideoSizes.AppendElement(size);
|
||||
|
@ -45,14 +45,14 @@ public:
|
||||
const char* GetParameter(const char* aKey);
|
||||
const char* GetParameterConstChar(uint32_t aKey);
|
||||
double GetParameterDouble(uint32_t aKey);
|
||||
void GetParameter(uint32_t aKey, nsTArray<dom::CameraRegion>& aRegions);
|
||||
void GetParameter(uint32_t aKey, nsTArray<dom::CameraSize>& aSizes);
|
||||
void GetParameter(uint32_t aKey, nsTArray<idl::CameraRegion>& aRegions);
|
||||
void GetParameter(uint32_t aKey, nsTArray<idl::CameraSize>& aSizes);
|
||||
void SetParameter(const char* aKey, const char* aValue);
|
||||
void SetParameter(uint32_t aKey, const char* aValue);
|
||||
void SetParameter(uint32_t aKey, double aValue);
|
||||
void SetParameter(uint32_t aKey, const nsTArray<dom::CameraRegion>& aRegions);
|
||||
void SetParameter(uint32_t aKey, const nsTArray<idl::CameraRegion>& aRegions);
|
||||
void SetParameter(uint32_t aKey, int aValue);
|
||||
nsresult GetVideoSizes(nsTArray<dom::CameraSize>& aVideoSizes);
|
||||
nsresult GetVideoSizes(nsTArray<idl::CameraSize>& aVideoSizes);
|
||||
nsresult PushParameters();
|
||||
|
||||
void AutoFocusComplete(bool aSuccess);
|
||||
|
@ -86,7 +86,7 @@ public:
|
||||
* supported by the camera hardware. (Just because it appears in a recorder
|
||||
* profile doesn't mean the hardware can handle it.)
|
||||
*/
|
||||
void SetSupportedResolutions(const nsTArray<dom::CameraSize>& aSizes)
|
||||
void SetSupportedResolutions(const nsTArray<idl::CameraSize>& aSizes)
|
||||
{ mSupportedSizes = aSizes; }
|
||||
|
||||
/**
|
||||
@ -104,7 +104,7 @@ public:
|
||||
protected:
|
||||
virtual ~GonkRecorderProfileManager();
|
||||
|
||||
nsTArray<dom::CameraSize> mSupportedSizes;
|
||||
nsTArray<idl::CameraSize> mSupportedSizes;
|
||||
};
|
||||
|
||||
}; // namespace mozilla
|
||||
|
@ -22,14 +22,14 @@ class ICameraControl
|
||||
public:
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(ICameraControl)
|
||||
|
||||
virtual nsresult GetPreviewStream(dom::CameraSize aSize, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
|
||||
virtual nsresult GetPreviewStream(idl::CameraSize aSize, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
|
||||
virtual nsresult StartPreview(DOMCameraPreview* aDOMPreview) = 0;
|
||||
virtual void StopPreview() = 0;
|
||||
virtual nsresult AutoFocus(nsICameraAutoFocusCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
|
||||
virtual nsresult TakePicture(dom::CameraSize aSize, int32_t aRotation, const nsAString& aFileFormat, dom::CameraPosition aPosition, uint64_t aDateTime, nsICameraTakePictureCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
|
||||
virtual nsresult StartRecording(dom::CameraStartRecordingOptions* aOptions, nsIFile* aFolder, const nsAString& aFilename, nsICameraStartRecordingCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
|
||||
virtual nsresult TakePicture(idl::CameraSize aSize, int32_t aRotation, const nsAString& aFileFormat, idl::CameraPosition aPosition, uint64_t aDateTime, nsICameraTakePictureCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
|
||||
virtual nsresult StartRecording(idl::CameraStartRecordingOptions* aOptions, nsIFile* aFolder, const nsAString& aFilename, nsICameraStartRecordingCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
|
||||
virtual nsresult StopRecording() = 0;
|
||||
virtual nsresult GetPreviewStreamVideoMode(dom::CameraRecorderOptions* aOptions, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
|
||||
virtual nsresult GetPreviewStreamVideoMode(idl::CameraRecorderOptions* aOptions, nsICameraPreviewStreamCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
|
||||
virtual nsresult ReleaseHardware(nsICameraReleaseCallback* onSuccess, nsICameraErrorCallback* onError) = 0;
|
||||
|
||||
virtual nsresult Set(uint32_t aKey, const nsAString& aValue) = 0;
|
||||
@ -46,18 +46,18 @@ public:
|
||||
virtual nsresult Get(nsICameraRecorderStateChange** aOnRecorderStateChange) = 0;
|
||||
virtual nsresult SetFocusAreas(JSContext* aCx, const JS::Value& aValue) = 0;
|
||||
virtual nsresult SetMeteringAreas(JSContext* aCx, const JS::Value& aValue) = 0;
|
||||
virtual nsresult GetVideoSizes(nsTArray<dom::CameraSize>& aVideoSizes) = 0;
|
||||
virtual nsresult GetVideoSizes(nsTArray<idl::CameraSize>& aVideoSizes) = 0;
|
||||
virtual already_AddRefed<RecorderProfileManager> GetRecorderProfileManager() = 0;
|
||||
virtual uint32_t GetCameraId() = 0;
|
||||
|
||||
virtual const char* GetParameter(const char* aKey) = 0;
|
||||
virtual const char* GetParameterConstChar(uint32_t aKey) = 0;
|
||||
virtual double GetParameterDouble(uint32_t aKey) = 0;
|
||||
virtual void GetParameter(uint32_t aKey, nsTArray<dom::CameraRegion>& aRegions) = 0;
|
||||
virtual void GetParameter(uint32_t aKey, nsTArray<idl::CameraRegion>& aRegions) = 0;
|
||||
virtual void SetParameter(const char* aKey, const char* aValue) = 0;
|
||||
virtual void SetParameter(uint32_t aKey, const char* aValue) = 0;
|
||||
virtual void SetParameter(uint32_t aKey, double aValue) = 0;
|
||||
virtual void SetParameter(uint32_t aKey, const nsTArray<dom::CameraRegion>& aRegions) = 0;
|
||||
virtual void SetParameter(uint32_t aKey, const nsTArray<idl::CameraRegion>& aRegions) = 0;
|
||||
|
||||
virtual void Shutdown() = 0;
|
||||
|
||||
|
@ -2161,7 +2161,7 @@ static PRTime
|
||||
ExtractDateFromOptions(JSContext* aCx, const JS::Value& aOptions)
|
||||
{
|
||||
PRTime result = 0;
|
||||
DeviceStorageEnumerationParameters params;
|
||||
mozilla::idl::DeviceStorageEnumerationParameters params;
|
||||
if (!JSVAL_IS_VOID(aOptions) && !aOptions.isNull()) {
|
||||
nsresult rv = params.Init(aCx, &aOptions);
|
||||
if (NS_SUCCEEDED(rv) && !JSVAL_IS_VOID(params.since) && !params.since.isNull() && params.since.isObject()) {
|
||||
|
@ -97,7 +97,7 @@ protected:
|
||||
nsresult status;
|
||||
} mData;
|
||||
|
||||
ArchiveReaderOptions mOptions;
|
||||
mozilla::idl::ArchiveReaderOptions mOptions;
|
||||
};
|
||||
|
||||
END_FILE_NAMESPACE
|
||||
|
@ -22,7 +22,7 @@ USING_FILE_NAMESPACE
|
||||
|
||||
ArchiveZipItem::ArchiveZipItem(const char* aFilename,
|
||||
const ZipCentral& aCentralStruct,
|
||||
const ArchiveReaderOptions& aOptions)
|
||||
const mozilla::idl::ArchiveReaderOptions& aOptions)
|
||||
: mFilename(aFilename),
|
||||
mCentralStruct(aCentralStruct),
|
||||
mOptions(aOptions)
|
||||
@ -111,7 +111,7 @@ ArchiveZipItem::StrToInt16(const uint8_t* aStr)
|
||||
// ArchiveReaderZipEvent
|
||||
|
||||
ArchiveReaderZipEvent::ArchiveReaderZipEvent(ArchiveReader* aArchiveReader,
|
||||
const ArchiveReaderOptions& aOptions)
|
||||
const mozilla::idl::ArchiveReaderOptions& aOptions)
|
||||
: ArchiveReaderEvent(aArchiveReader),
|
||||
mOptions(aOptions)
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ class ArchiveZipItem : public ArchiveItem
|
||||
public:
|
||||
ArchiveZipItem(const char* aFilename,
|
||||
const ZipCentral& aCentralStruct,
|
||||
const ArchiveReaderOptions& aOptions);
|
||||
const mozilla::idl::ArchiveReaderOptions& aOptions);
|
||||
virtual ~ArchiveZipItem();
|
||||
|
||||
nsresult GetFilename(nsString& aFilename);
|
||||
@ -45,7 +45,7 @@ private: // data
|
||||
nsString mFilenameU;
|
||||
ZipCentral mCentralStruct;
|
||||
|
||||
ArchiveReaderOptions mOptions;
|
||||
mozilla::idl::ArchiveReaderOptions mOptions;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -55,12 +55,12 @@ class ArchiveReaderZipEvent : public ArchiveReaderEvent
|
||||
{
|
||||
public:
|
||||
ArchiveReaderZipEvent(ArchiveReader* aArchiveReader,
|
||||
const ArchiveReaderOptions& aOptions);
|
||||
const mozilla::idl::ArchiveReaderOptions& aOptions);
|
||||
|
||||
nsresult Exec();
|
||||
|
||||
private:
|
||||
ArchiveReaderOptions mOptions;
|
||||
mozilla::idl::ArchiveReaderOptions mOptions;
|
||||
};
|
||||
|
||||
END_FILE_NAMESPACE
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
DOMFileMetadataParameters mConfig;
|
||||
mozilla::idl::DOMFileMetadataParameters mConfig;
|
||||
|
||||
uint64_t mSize;
|
||||
int64_t mLastModified;
|
||||
|
@ -505,7 +505,7 @@ IDBDatabase::CreateObjectStore(const nsAString& aName,
|
||||
|
||||
DatabaseInfo* databaseInfo = transaction->DBInfo();
|
||||
|
||||
mozilla::dom::IDBObjectStoreParameters params;
|
||||
mozilla::idl::IDBObjectStoreParameters params;
|
||||
KeyPath keyPath(0);
|
||||
|
||||
nsresult rv;
|
||||
|
@ -2551,7 +2551,7 @@ IDBObjectStore::CreateIndex(const nsAString& aName,
|
||||
#endif
|
||||
|
||||
nsresult rv;
|
||||
mozilla::dom::IDBIndexParameters params;
|
||||
mozilla::idl::IDBIndexParameters params;
|
||||
|
||||
// Get optional arguments.
|
||||
if (!JSVAL_IS_VOID(aOptions) && !JSVAL_IS_NULL(aOptions)) {
|
||||
|
@ -2157,7 +2157,7 @@ ContentParent::RecvAddGeolocationListener(const IPC::Principal& aPrincipal)
|
||||
}
|
||||
|
||||
nsRefPtr<nsGeolocation> geosvc = static_cast<nsGeolocation*>(geo.get());
|
||||
nsAutoPtr<mozilla::dom::GeoPositionOptions> options(new mozilla::dom::GeoPositionOptions());
|
||||
nsAutoPtr<mozilla::idl::GeoPositionOptions> options(new mozilla::idl::GeoPositionOptions());
|
||||
jsval null = JS::NullValue();
|
||||
options->Init(nullptr, &null);
|
||||
geosvc->WatchPosition(this, nullptr, options.forget(), &mGeolocationWatchID);
|
||||
|
@ -476,7 +476,7 @@ SmsRequest::NotifyThreadList(const jsval& aThreadList, JSContext* aCx)
|
||||
|
||||
MOZ_ASSERT(arrayEntry.isObject());
|
||||
|
||||
SmsThreadListItem item;
|
||||
mozilla::idl::SmsThreadListItem item;
|
||||
nsresult rv = item.Init(aCx, &arrayEntry);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -286,7 +286,7 @@ nsDOMGeoPositionError::NotifyCallback(nsIDOMGeoPositionErrorCallback* aCallback)
|
||||
nsGeolocationRequest::nsGeolocationRequest(nsGeolocation* aLocator,
|
||||
nsIDOMGeoPositionCallback* aCallback,
|
||||
nsIDOMGeoPositionErrorCallback* aErrorCallback,
|
||||
mozilla::dom::GeoPositionOptions* aOptions,
|
||||
mozilla::idl::GeoPositionOptions* aOptions,
|
||||
bool aWatchPositionRequest,
|
||||
int32_t aWatchId)
|
||||
: mAllowed(false),
|
||||
@ -306,13 +306,13 @@ nsGeolocationRequest::~nsGeolocationRequest()
|
||||
}
|
||||
|
||||
|
||||
static mozilla::dom::GeoPositionOptions*
|
||||
static mozilla::idl::GeoPositionOptions*
|
||||
OptionsFromJSOptions(JSContext* aCx, const jsval& aOptions, nsresult* aRv)
|
||||
{
|
||||
*aRv = NS_OK;
|
||||
nsAutoPtr<mozilla::dom::GeoPositionOptions> options(nullptr);
|
||||
nsAutoPtr<mozilla::idl::GeoPositionOptions> options(nullptr);
|
||||
if (aCx && !JSVAL_IS_VOID(aOptions) && !JSVAL_IS_NULL(aOptions)) {
|
||||
options = new mozilla::dom::GeoPositionOptions();
|
||||
options = new mozilla::idl::GeoPositionOptions();
|
||||
nsresult rv = options->Init(aCx, &aOptions);
|
||||
if (NS_FAILED(rv)) {
|
||||
*aRv = rv;
|
||||
@ -1250,7 +1250,7 @@ nsGeolocation::GetCurrentPosition(nsIDOMGeoPositionCallback *callback,
|
||||
JSContext* cx)
|
||||
{
|
||||
nsresult rv;
|
||||
nsAutoPtr<mozilla::dom::GeoPositionOptions> options(
|
||||
nsAutoPtr<mozilla::idl::GeoPositionOptions> options(
|
||||
OptionsFromJSOptions(cx, jsoptions, &rv));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
return GetCurrentPosition(callback, errorCallback, options.forget());
|
||||
@ -1259,7 +1259,7 @@ nsGeolocation::GetCurrentPosition(nsIDOMGeoPositionCallback *callback,
|
||||
nsresult
|
||||
nsGeolocation::GetCurrentPosition(nsIDOMGeoPositionCallback *callback,
|
||||
nsIDOMGeoPositionErrorCallback *errorCallback,
|
||||
mozilla::dom::GeoPositionOptions *options)
|
||||
mozilla::idl::GeoPositionOptions *options)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(callback);
|
||||
|
||||
@ -1323,7 +1323,7 @@ nsGeolocation::WatchPosition(nsIDOMGeoPositionCallback *callback,
|
||||
int32_t *_retval)
|
||||
{
|
||||
nsresult rv;
|
||||
nsAutoPtr<mozilla::dom::GeoPositionOptions> options(
|
||||
nsAutoPtr<mozilla::idl::GeoPositionOptions> options(
|
||||
OptionsFromJSOptions(cx, jsoptions, &rv));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
return WatchPosition(callback, errorCallback, options.forget(), _retval);
|
||||
@ -1332,7 +1332,7 @@ nsGeolocation::WatchPosition(nsIDOMGeoPositionCallback *callback,
|
||||
nsresult
|
||||
nsGeolocation::WatchPosition(nsIDOMGeoPositionCallback *callback,
|
||||
nsIDOMGeoPositionErrorCallback *errorCallback,
|
||||
mozilla::dom::GeoPositionOptions *options,
|
||||
mozilla::idl::GeoPositionOptions *options,
|
||||
int32_t *_retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(callback);
|
||||
|
@ -53,7 +53,7 @@ class nsGeolocationRequest
|
||||
nsGeolocationRequest(nsGeolocation* locator,
|
||||
nsIDOMGeoPositionCallback* callback,
|
||||
nsIDOMGeoPositionErrorCallback* errorCallback,
|
||||
mozilla::dom::GeoPositionOptions* aOptions,
|
||||
mozilla::idl::GeoPositionOptions* aOptions,
|
||||
bool watchPositionRequest = false,
|
||||
int32_t watchId = 0);
|
||||
void Shutdown();
|
||||
@ -86,7 +86,7 @@ class nsGeolocationRequest
|
||||
nsCOMPtr<nsITimer> mTimeoutTimer;
|
||||
nsCOMPtr<nsIDOMGeoPositionCallback> mCallback;
|
||||
nsCOMPtr<nsIDOMGeoPositionErrorCallback> mErrorCallback;
|
||||
nsAutoPtr<mozilla::dom::GeoPositionOptions> mOptions;
|
||||
nsAutoPtr<mozilla::idl::GeoPositionOptions> mOptions;
|
||||
|
||||
nsRefPtr<nsGeolocation> mLocator;
|
||||
|
||||
@ -204,11 +204,11 @@ public:
|
||||
// Versions of the DOM APIs that don't require JS option values
|
||||
nsresult WatchPosition(nsIDOMGeoPositionCallback *callback,
|
||||
nsIDOMGeoPositionErrorCallback *errorCallback,
|
||||
mozilla::dom::GeoPositionOptions *options,
|
||||
mozilla::idl::GeoPositionOptions *options,
|
||||
int32_t *_retval);
|
||||
nsresult GetCurrentPosition(nsIDOMGeoPositionCallback *callback,
|
||||
nsIDOMGeoPositionErrorCallback *errorCallback,
|
||||
mozilla::dom::GeoPositionOptions *options);
|
||||
mozilla::idl::GeoPositionOptions *options);
|
||||
private:
|
||||
|
||||
~nsGeolocation();
|
||||
|
@ -132,7 +132,7 @@ def print_header_file(fd, conf):
|
||||
|
||||
fd.write("\n"
|
||||
"namespace mozilla {\n"
|
||||
"namespace dom {\n\n")
|
||||
"namespace idl {\n\n")
|
||||
|
||||
dicts = []
|
||||
for d in conf.dictionaries:
|
||||
@ -215,7 +215,7 @@ def print_cpp_file(fd, conf):
|
||||
if not c in conf.exclude_automatic_type_include:
|
||||
fd.write("#include \"%s.h\"\n" % c)
|
||||
|
||||
fd.write("\nusing namespace mozilla::dom;\n\n")
|
||||
fd.write("\nusing namespace mozilla::idl;\n\n")
|
||||
|
||||
for a in attrnames:
|
||||
fd.write("static jsid %s = JSID_VOID;\n"% get_jsid(a))
|
||||
|
@ -85,8 +85,8 @@ def print_header_file(fd, conf):
|
||||
for e in conf.simple_events:
|
||||
fd.write("#include \"nsIDOM%s.h\"\n" % e)
|
||||
fd.write("#else\n")
|
||||
fd.write("#ifndef _gen_mozilla_generated_events_h_\n"
|
||||
"#define _gen_mozilla_generated_events_h_\n\n")
|
||||
fd.write("#ifndef _gen_mozilla_idl_generated_events_h_\n"
|
||||
"#define _gen_mozilla_idl_generated_events_h_\n\n")
|
||||
fd.write("/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */\n")
|
||||
fd.write("#include \"nscore.h\"\n")
|
||||
fd.write("class nsEvent;\n")
|
||||
@ -296,7 +296,7 @@ def write_cpp(eventname, iface, fd):
|
||||
fd.write("nsresult\n")
|
||||
fd.write("%s::InitFromCtor(const nsAString& aType, JSContext* aCx, jsval* aVal)\n" % classname)
|
||||
fd.write("{\n");
|
||||
fd.write(" mozilla::dom::%sInit d;\n" % eventname)
|
||||
fd.write(" mozilla::idl::%sInit d;\n" % eventname)
|
||||
fd.write(" nsresult rv = d.Init(aCx, aVal);\n")
|
||||
fd.write(" NS_ENSURE_SUCCESS(rv, rv);\n")
|
||||
fd.write(" return Init%s(aType, d.bubbles, d.cancelable" % eventname)
|
||||
|
Loading…
Reference in New Issue
Block a user