Bug 1030821 - Fix broken zoom by making recording hint be set as boolean. r=mikeh, a=2.0+
authorAndrew Osmond <aosmond@mozilla.com>
Mon, 30 Jun 2014 06:33:00 -0400
changeset 207647 b5f91ccf9fd16ae5060c589300c16e5aa522443a
parent 207646 ad4ea249261ae76579b52c2efb4dfd090240f4a4
child 207648 4c30346e553b505471ea075625b03e2b4f364283
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikeh, 2
bugs1030821
milestone32.0a2
Bug 1030821 - Fix broken zoom by making recording hint be set as boolean. r=mikeh, a=2.0+
dom/camera/FallbackCameraControl.cpp
dom/camera/GonkCameraControl.cpp
dom/camera/GonkCameraControl.h
dom/camera/ICameraControl.h
--- a/dom/camera/FallbackCameraControl.cpp
+++ b/dom/camera/FallbackCameraControl.cpp
@@ -27,16 +27,18 @@ public:
   virtual nsresult Set(uint32_t aKey, const nsAString& aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult Get(uint32_t aKey, nsAString& aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult Set(uint32_t aKey, double aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult Get(uint32_t aKey, double& aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult Set(uint32_t aKey, int32_t aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult Get(uint32_t aKey, int32_t& aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult Set(uint32_t aKey, int64_t aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult Get(uint32_t aKey, int64_t& aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
+  virtual nsresult Set(uint32_t aKey, bool aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
+  virtual nsresult Get(uint32_t aKey, bool& aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult Set(uint32_t aKey, const Size& aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult Get(uint32_t aKey, Size& aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult Set(uint32_t aKey, const nsTArray<Region>& aRegions) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
   virtual nsresult Get(uint32_t aKey, nsTArray<Region>& aRegions) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
 
   virtual nsresult SetLocation(const Position& aLocation) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
 
   virtual nsresult Get(uint32_t aKey, nsTArray<Size>& aSizes) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; }
--- a/dom/camera/GonkCameraControl.cpp
+++ b/dom/camera/GonkCameraControl.cpp
@@ -468,16 +468,29 @@ nsGonkCameraControl::Set(uint32_t aKey, 
 }
 
 nsresult
 nsGonkCameraControl::Get(uint32_t aKey, int64_t& aRet)
 {
   return mParams.Get(aKey, aRet);
 }
 
+// Boolean parameter accessors.
+nsresult
+nsGonkCameraControl::Set(uint32_t aKey, bool aValue)
+{
+  return SetAndPush(aKey, aValue);
+}
+
+nsresult
+nsGonkCameraControl::Get(uint32_t aKey, bool& aRet)
+{
+  return mParams.Get(aKey, aRet);
+}
+
 // Weighted-region parameter accessors.
 nsresult
 nsGonkCameraControl::Set(uint32_t aKey, const nsTArray<Region>& aRegions)
 {
   return SetAndPush(aKey, aRegions);
 }
 
 nsresult
--- a/dom/camera/GonkCameraControl.h
+++ b/dom/camera/GonkCameraControl.h
@@ -60,16 +60,18 @@ public:
   virtual nsresult Set(uint32_t aKey, const nsAString& aValue) MOZ_OVERRIDE;
   virtual nsresult Get(uint32_t aKey, nsAString& aValue) MOZ_OVERRIDE;
   virtual nsresult Set(uint32_t aKey, double aValue) MOZ_OVERRIDE;
   virtual nsresult Get(uint32_t aKey, double& aValue) MOZ_OVERRIDE;
   virtual nsresult Set(uint32_t aKey, int32_t aValue) MOZ_OVERRIDE;
   virtual nsresult Get(uint32_t aKey, int32_t& aValue) MOZ_OVERRIDE;
   virtual nsresult Set(uint32_t aKey, int64_t aValue) MOZ_OVERRIDE;
   virtual nsresult Get(uint32_t aKey, int64_t& aValue) MOZ_OVERRIDE;
+  virtual nsresult Set(uint32_t aKey, bool aValue) MOZ_OVERRIDE;
+  virtual nsresult Get(uint32_t aKey, bool& aValue) MOZ_OVERRIDE;
   virtual nsresult Set(uint32_t aKey, const Size& aValue) MOZ_OVERRIDE;
   virtual nsresult Get(uint32_t aKey, Size& aValue) MOZ_OVERRIDE;
   virtual nsresult Set(uint32_t aKey, const nsTArray<Region>& aRegions) MOZ_OVERRIDE;
   virtual nsresult Get(uint32_t aKey, nsTArray<Region>& aRegions) MOZ_OVERRIDE;
 
   virtual nsresult SetLocation(const Position& aLocation) MOZ_OVERRIDE;
 
   virtual nsresult Get(uint32_t aKey, nsTArray<Size>& aSizes) MOZ_OVERRIDE;
--- a/dom/camera/ICameraControl.h
+++ b/dom/camera/ICameraControl.h
@@ -201,16 +201,18 @@ public:
   virtual nsresult Set(uint32_t aKey, const nsAString& aValue) = 0;
   virtual nsresult Get(uint32_t aKey, nsAString& aValue) = 0;
   virtual nsresult Set(uint32_t aKey, double aValue) = 0;
   virtual nsresult Get(uint32_t aKey, double& aValue) = 0;
   virtual nsresult Set(uint32_t aKey, int32_t aValue) = 0;
   virtual nsresult Get(uint32_t aKey, int32_t& aValue) = 0;
   virtual nsresult Set(uint32_t aKey, int64_t aValue) = 0;
   virtual nsresult Get(uint32_t aKey, int64_t& aValue) = 0;
+  virtual nsresult Set(uint32_t aKey, bool aValue) = 0;
+  virtual nsresult Get(uint32_t aKey, bool& aValue) = 0;
   virtual nsresult Set(uint32_t aKey, const Size& aValue) = 0;
   virtual nsresult Get(uint32_t aKey, Size& aValue) = 0;
   virtual nsresult Set(uint32_t aKey, const nsTArray<Region>& aRegions) = 0;
   virtual nsresult Get(uint32_t aKey, nsTArray<Region>& aRegions) = 0;
 
   virtual nsresult SetLocation(const Position& aLocation) = 0;
 
   virtual nsresult Get(uint32_t aKey, nsTArray<Size>& aSizes) = 0;