[tbb-bugs] #17248 [Tor Browser]: Investigate new WebExtensions API requirements for our extensions

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Nov 12 15:55:57 UTC 2015


#17248: Investigate new WebExtensions API requirements for our extensions
----------------------------------+--------------------------
 Reporter:  gk                    |          Owner:  tbb-team
     Type:  task                  |         Status:  new
 Priority:  High                  |      Milestone:
Component:  Tor Browser           |        Version:
 Severity:  Normal                |     Resolution:
 Keywords:  TorBrowserTeam201511  |  Actual Points:
Parent ID:                        |         Points:
  Sponsor:                        |
----------------------------------+--------------------------
Changes (by brade):

 * cc: mcs, brade (added)
 * severity:   => Normal


Comment:

 Mark and I made a pass through Tor Launcher looking at API requirements.
 I am going to post a series of comments that capture what we learned (this
 is the first).

 '''Requirements for which there is no solution / no Web Extensions API
 (NS#):'''

 NS1: Define and potentially override default preference values
 Current Solution: defaults/preferences/prefs.js

 NS2: Read, write, observe, and enumerate existing browser preferences
 Current Solution: nsIPrefService/nsIPrefBranch and related APIs

 NS3: Change the browser's UI locale without restart
 Current Solution: Change the browser.useragent.locale preference and then
 send a "chrome-flush-caches" observer notification
 Notes: Used in Tor Launcher after the user choose a language

 NS4: Localized HTML
 Current Solution: XUL with localized entities
 Related bugs: https://code.google.com/p/chromium/issues/detail?id=115800

 NS5: Get notified just before the browser exits
 Current Solution: Observer for "quit-application-granted"
 Notes: Could count open and close of tabs but this will not work on Mac OS

 NS6: Display a confirm prompt with custom button labels
 Current Solution: nsIPromptService.confirmEx()
 Notes: Used in Tor Launcher for the "Restart Tor?" prompt

 NS7: Compare application version strings
 Current Solution: nsIVersionComparator
 Notes: We could create our own JS implemention or use third party code
 such as https://github.com/linagora/mozilla-version-comparator

 NS8: Check for existence, get, and set environment variables
 Current Solution: nsIEnvironment

 NS9: Log to stderr
 Current Solution: window.dump()

 NS10: TCP communication to the Tor control port
 Current Solution: nsISocketTransportService.createTransport()
 Notes: Tor Launcher uses non-blocking sockets as well as
 nsIInputStream.asyncWait(). Also, in the future we want to be able to use
 UNIX domain sockets.

 NS11: Modal interaction before browser completely starts up
 Current Solution: Modal dialogs opened from a "profile-after-change"
 observer
 Notes: The first time Tor Browser starts up, Tor Launcher displays a
 configuration wizard. Every time Tor Browser starts up, a modal progress
 dialog is displayed while a Tor network connection is established. It is
 important that browser windows and menus are not shown until the startup
 dialogs have closed.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/17248#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tbb-bugs mailing list