[Camera][Gecko] (Finally) get rid of CameraControl callbacks

RESOLVED FIXED in 2.2 S2 (19dec)

Status

Firefox OS
Gaia::Camera
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: mikeh, Assigned: mikeh)

Tracking

(Blocks: 1 bug, {dev-doc-needed})

unspecified
2.2 S2 (19dec)
ARM
Gonk (Firefox OS)
dev-doc-needed
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

Comment hidden (empty)
Depends on: 1109240
Created attachment 8533972 [details] [diff] [review]
Remove method callbacks from CameraControl, v1
Assignee: nobody → mhabicher
Status: NEW → ASSIGNED
Attachment #8533972 - Flags: review?(aosmond)
Comment on attachment 8533972 [details] [diff] [review]
Remove method callbacks from CameraControl, v1

Removing r? -- this patch doesn't include the unsolicited event callback removal.
Attachment #8533972 - Flags: review?(aosmond)
Created attachment 8534184 [details] [diff] [review]
Remove method and attribute callbacks from CameraControl, v2

try push: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=b6f016170c93
Attachment #8533972 - Attachment is obsolete: true
Attachment #8534184 - Flags: review?(aosmond)
Comment on attachment 8534184 [details] [diff] [review]
Remove method and attribute callbacks from CameraControl, v2

bz: this patch removes all of the method and attribute callbacks, in favour of promises and events.
Attachment #8534184 - Flags: review?(bzbarsky)
Comment on attachment 8534184 [details] [diff] [review]
Remove method and attribute callbacks from CameraControl, v2

Review of attachment 8534184 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/camera/DOMCameraControl.cpp
@@ -1701,5 @@
>        aError, aContext);
>      return;
>    }
>  
> -  DOM_CAMERA_LOGI("DOM OnUserError aContext=%u, aError=0x%x\n", aContext, aError);

We stil need this print.

::: dom/webidl/CameraControl.webidl
@@ -351,5 @@
> -     stop moving the focus position; it can be used to update a UI element to
> -     indicate that the camera is still trying to focus, or has finished. Some
> -     platforms do not support this event, in which case the callback is never
> -     invoked. */
> -  [Pref="camera.control.autofocus_moving_callback.enabled"]

Remove this pref from modules/libpref/init/all.js since we no longer use it?
Comment on attachment 8534184 [details] [diff] [review]
Remove method and attribute callbacks from CameraControl, v2

Review of attachment 8534184 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/camera/DOMCameraControl.cpp
@@ -1701,5 @@
>        aError, aContext);
>      return;
>    }
>  
> -  DOM_CAMERA_LOGI("DOM OnUserError aContext=%u, aError=0x%x\n", aContext, aError);

Missed the addition at the top sorry.
Attachment #8534184 - Flags: review?(aosmond) → review+
Comment on attachment 8534184 [details] [diff] [review]
Remove method and attribute callbacks from CameraControl, v2

r=me for the webidl changes.  I sorta-skimmed part of the rest, but if you want me to actually look at it at all carefully, please let me know.
Attachment #8534184 - Flags: review?(bzbarsky) → review+
(In reply to Boris Zbarsky [:bz] from comment #7)

> r=me for the webidl changes.  I sorta-skimmed part of the rest, but if you
> want me to actually look at it at all carefully, please let me know.

Nope -- as long as you're fine with the WebIDL, the rest is just deleting the backing code. Thanks!
Created attachment 8534753 [details] [diff] [review]
Remove method and attribute callbacks from CameraControl, v2.1 r=aosmond,bz

Fix a couple of broken tests; carrying r+ forward.

try-push: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=084cb33dddec
Attachment #8534184 - Attachment is obsolete: true
Attachment #8534753 - Flags: review+
Created attachment 8534811 [details] [diff] [review]
Remove method and attribute callbacks from CameraControl, v2.2 r=aosmond,bz

Fix the (last?) broken test. Carrying r+ forward.

try-push: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=c6ba18aec720
Attachment #8534753 - Attachment is obsolete: true
Attachment #8534811 - Flags: review+
https://hg.mozilla.org/integration/b2g-inbound/rev/12c5cc6e88b3
https://hg.mozilla.org/mozilla-central/rev/12c5cc6e88b3
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S2 (19dec)
Keywords: dev-doc-needed
See Also: → bug 1161175
You need to log in before you can comment on or make changes to this bug.