Closed Bug 1213433 Opened 10 years ago Closed 10 years ago

Complete the implementation of chrome.browserAction

Categories

(WebExtensions :: Untriaged, defect)

defect
Not set
normal

Tracking

(firefox45 fixed)

RESOLVED FIXED
mozilla45
Iteration:
45.2 - Nov 30
Tracking Status
firefox45 --- fixed

People

(Reporter: andy+bugzilla, Assigned: kmag)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, Whiteboard: [browserAction])

Attachments

(1 file)

The methods on the API are: https://developer.chrome.com/extensions/browserAction Currently implemented: setTitle getTitle setIcon setPopup getPopup setBadgeText getBadgeText setBadgeBackgroundColor getBadgeBackgroundColor Won't be implemented because they are deprecated: - To be implemented: enable disable
Assignee: nobody → kmaglione+bmo
Blocks: webext
Flags: blocking-webextensions+
Comment on attachment 8687646 [details] [diff] [review] [webext] Add `enable` and `disable` methods to browserAction API Review of attachment 8687646 [details] [diff] [review]: ----------------------------------------------------------------- Thanks, this looks great. There is just one thing that is not clear for me. ::: browser/components/extensions/ext-browserAction.js @@ +215,5 @@ > }).api(), > > + enable: function(tabId) { > + let tab = tabId ? TabManager.getTab(tabId) : null; > + browserActionOf(extension).setProperty(tab, "enabled", true); If the tabId is presented but invalid (because the tab is gone already) do we set enable/disable globally here? Is this what chrome does? (the documentation does not mention this case)
Attachment #8687646 - Flags: review?(gkrizsanits) → review+
(In reply to Gabor Krizsanits [:krizsa :gabor] from comment #2) > If the tabId is presented but invalid (because the tab is gone already) do > we set enable/disable globally here? Is this what chrome does? (the > documentation does not mention this case) Hm. Good catch. I think we do. I'll file a follow-up bug.
Blocks: 1225215
https://hg.mozilla.org/integration/fx-team/rev/4d1341e642b9db3a70d6cf8cfc4c95b0dc723874 Bug 1213433: [webext] Add `enable` and `disable` methods to browserAction API. r=gabor
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Iteration: --- → 45.2 - Nov 30
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: