Closed Bug 1619766 Opened 5 years ago Closed 5 years ago

Support runtime.openOptionsPage on GeckoView

Categories

(GeckoView :: Extensions, enhancement, P1)

Unspecified
All
enhancement

Tracking

(firefox79 fixed)

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: contact, Assigned: esawin, Mentored)

Details

(Whiteboard: [geckoview:m78][geckoview:m79])

Attachments

(2 files)

openOptionsPage is a blocker for whitelisting the Search by Image extension, I couldn't find a way to open the the extension's options using the API or the UI.

Summary: Support runtime.openOptionsPage on Fenix → Support runtime.openOptionsPage on GeckoView

Looks like we use BrowserTab.selectOrAddTab which is a Fennec method that doesn't work anymore.

All it's needed here is to call GeckoViewTabBridge.createNewTab for the open_in_tab case and adding a new onOpenOptionsUI delegate java API for the native UI case either in the TabDelegate on in a new delegate.

https://searchfox.org/mozilla-central/rev/91f6c02fcf4c16f78fdc4417f61f192688294066/mobile/android/components/extensions/ext-android.js#53-69

Mentor: agi
Status: UNCONFIRMED → NEW
Ever confirmed: true
Rank: 5
Whiteboard: [geckoview:m77]
Priority: P2 → P1

so just to clarify the code would be something like this

global.openOptionsPage = extension => {
  const { options_ui } = extension.manifest;
  if (options_ui.open_in_tab) {
    // use GeckoViewTabBridge.createNewTab
  } else {
    // send message
  }
}

where an example for createNewTab is in Comment 1.

Priority: P1 → P2
Whiteboard: [geckoview:m77] → [geckoview:m78]

We will want to uplift this to 78 when done.

Whiteboard: [geckoview:m78] → [geckoview:m78][geckoview:m79]
Assignee: nobody → esawin
Priority: P2 → P1
Attachment #9153563 - Attachment description: Bug 1619766 - [1.0] [WIP] Add WebExtension openOptionsPage support. → Bug 1619766 - [1.1] Add WebExtension openOptionsPage support.
Attachment #9153563 - Attachment description: Bug 1619766 - [1.1] Add WebExtension openOptionsPage support. → Bug 1619766 - [1.2] Add WebExtension openOptionsPage support.
Pushed by esawin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fa01d9615f6d [1.2] Add WebExtension openOptionsPage support. r=agi,geckoview-reviewers,robwu https://hg.mozilla.org/integration/autoland/rev/2b8e623fb40c [2.0] Add WebExtension openOptionsPage tests. r=geckoview-reviewers,agi
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: