Bug 811646 - Split big base installer download into multiple HTTP range requests...
[gecko.git] / dom / camera / DOMCameraCapabilities.h
blob5a0d729d49e7b1558fec5b67703eb5c46c8a6d19
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_DOMCAMERACAPABILITIES_H
6 #define DOM_CAMERA_DOMCAMERACAPABILITIES_H
8 #include "nsCycleCollectionParticipant.h"
9 #include "ICameraControl.h"
10 #include "nsAutoPtr.h"
11 #include "CameraCommon.h"
13 namespace mozilla {
15 typedef nsresult (*ParseItemAndAddFunc)(JSContext* aCx, JSObject* aArray, uint32_t aIndex, const char* aStart, char** aEnd);
17 class DOMCameraCapabilities MOZ_FINAL : public nsICameraCapabilities
19 public:
20 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
21 NS_DECL_CYCLE_COLLECTION_CLASS(DOMCameraCapabilities)
22 NS_DECL_NSICAMERACAPABILITIES
24 DOMCameraCapabilities(ICameraControl* aCamera)
25 : mCamera(aCamera)
27 DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
30 nsresult ParameterListToNewArray(
31 JSContext* cx,
32 JSObject** aArray,
33 uint32_t aKey,
34 ParseItemAndAddFunc aParseItemAndAdd
36 nsresult StringListToNewObject(JSContext* aCx, JS::Value* aArray, uint32_t aKey);
37 nsresult DimensionListToNewObject(JSContext* aCx, JS::Value* aArray, uint32_t aKey);
39 private:
40 DOMCameraCapabilities(const DOMCameraCapabilities&) MOZ_DELETE;
41 DOMCameraCapabilities& operator=(const DOMCameraCapabilities&) MOZ_DELETE;
43 protected:
44 /* additional members */
45 ~DOMCameraCapabilities()
47 // destructor code
48 DOM_CAMERA_LOGT("%s:%d : this=%p, mCamera=%p\n", __func__, __LINE__, this, mCamera.get());
51 nsRefPtr<ICameraControl> mCamera;
54 } // namespace mozilla
56 #endif // DOM_CAMERA_DOMCAMERACAPABILITIES_H