Closed Bug 2070709 Opened 2 months ago Closed 1 month ago

Add `WidgetManager` singleton

Categories

(Firefox :: Widgets, task, P3)

task
Points:
5

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: fchasen, Assigned: fchasen)

References

(Blocks 1 open bug)

Details

(Whiteboard: [hnt][hnt-wattle])

Attachments

(1 external file)

Need to add a new WidgetRegistry class with the following stub methods:

  • register(descriptorOrArray)

  • unregister(idOrArray) has(id) and describe(id), plus init() and uninit().

  • has(id)

  • describe(id)

  • init and uninit

Init should be called in the browser-before-ui-startup category

  • Adds a WidgetManager singleton that stores one widget per extension id.
  • Emits "change" at init and on register and unregister with the IDs of the updated widgets.
Assignee: nobody → fchasen
Status: NEW → ASSIGNED

Going with WidgetManager to avoid conflicts with the existing WidgetsRegistry

Points: --- → 5
Summary: Add `WidgetRegistry` singleton → Add `WidgetManager` singleton
Duplicate of this bug: 2070710

Backed out for causing for causing bc tests failures at moz-widget-header
Backout Link
Push with failures
Failure Log
Failure line TEST-UNEXPECTED-FAIL | browser/base/content/test/browser-static/browser_all_files_referenced.js | checkAllTheFiles - file only referenced from unreferenced files: chrome://browser/content/widgets/moz-widget-header.css referenced from chrome://browser/content/widgets/moz-widget-header.mjs

Flags: needinfo?(fchasen)

Backed out for causing mass failures @nsContentSecurityUtils.cpp.

Thanks, sorry for not catching that. I'll need to update the frame-src allowlist like we did for the crossword.

Flags: needinfo?(fchasen)

Also updating to dynamically import moz-widget.

Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
QA Whiteboard: [qa-triage-done-c161/b160]
Flags: needinfo?(fchasen)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: