Bug 1213473 (webext-runtime)

Complete the implementation of chrome.runtime

RESOLVED FIXED

Status

defect
P2
normal
RESOLVED FIXED
4 years ago
Last year

People

(Reporter: andy+bugzilla, Unassigned)

Tracking

(Blocks 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [runtime]triaged)

The methods on the API are:

https://developer.chrome.com/extensions/runtime

Currently implemented:

onStartup
getManifest − object chrome.runtime.getManifest()
getURL − string chrome.runtime.getURL(string path)
id
sendMessage − chrome.runtime.sendMessage(string extensionId, any message, object options, function responseCallback)
onMessage
onConnect

To be implemented:

Types

Port
MessageSender
PlatformOs
PlatformArch
PlatformNaclArch
PlatformInfo
RequestUpdateCheckStatus
OnInstalledReason
OnRestartRequiredReason

Properties

lastError

Methods

getBackgroundPage − chrome.runtime.getBackgroundPage(function callback)
openOptionsPage − chrome.runtime.openOptionsPage(function callback)
setUninstallURL − chrome.runtime.setUninstallURL(string url, function callback)
reload − chrome.runtime.reload()
requestUpdateCheck − chrome.runtime.requestUpdateCheck(function callback)
restart − chrome.runtime.restart()
connect − Port chrome.runtime.connect(string extensionId, object connectInfo)
connectNative − Port chrome.runtime.connectNative(string application)
sendNativeMessage − chrome.runtime.sendNativeMessage(string application, object message, function responseCallback)
getPlatformInfo − chrome.runtime.getPlatformInfo(function callback)
getPackageDirectoryEntry − chrome.runtime.getPackageDirectoryEntry(function callback)

Events

onInstalled
onSuspend
onSuspendCanceled
onUpdateAvailable
onBrowserUpdateAvailable
onConnectExternal
onMessageExternal
onRestartRequired
Depends on: 1213858
chrome.runtime.getPlatformInfo used by Ghostery
Blocks: 1190682
Flags: blocking-webextensions-
Depends on: 1223589
Depends on: 1234091
(In reply to Andy McKay [:andym] from comment #0)
> onUpdateAvailable

We're working on a way for add-ons to delay update in bug 1231172, I think that could be used to implement chrome.runtime.onUpdateAvailable() as it is currently documented in https://developer.chrome.com/extensions/runtime#event-onUpdateAvailable
Whiteboard: [runtime] → [runtime]triaged
Depends on: 1247435
Depends on: 1252871
Alias: webext-runtime
No longer blocks: 1190682
Depends on: 1190682
Depends on: 1279012
The Reddit Enhancement Suite needs the `chrome.runtime.lastError` property.
(Actually, we apparently *do* support runtime.lastError. No longer blocks 1208765.)
Matt has both the blocking bugs so gets the tracker.
Component: WebExtensions: Untriaged → WebExtensions: General
Flags: blocking-webextensions-
Priority: -- → P2
Depends on: 1307624
Depends on: 1313644
Depends on: 1313648
Depends on: 1313653
No longer blocks: 1303905
There are a couple of things not implemented by runtime, mostly by design, so I'm calling this bug done. The two remaining tracking bugs are about test improvements and not the runtime API itself.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.