Граф коммитов

412 Коммитов

Автор SHA1 Сообщение Дата
Jim Chen 1294cccf48 Bug 1337467 - Convert observers to bundle events; r=rbarker r=sebastian
Bug 1337467 - 1. Convert "Window:Resize" observer to event; r=rbarker

Bug 1337467 - 2. Convert "ScrollTo:FocusedInput" observer to event; r=rbarker

Bug 1337467 - 3. Convert "Update:CheckResult" observer to event; r=sebastian

Also remove notifyCheckUpdateResult from GeckoInterface.

Bug 1337467 - 4. Convert "GeckoView:ImportScript" observer to event; r=sebastian

Bug 1337467 - 5. Convert accessibility observers to events; r=sebastian

Bug 1337467 - 6. Convert media/casting observers to events; r=sebastian

Bug 1337467 - 7. Convert "Sanitize:ClearData" observer to event; r=sebastian

Bug 1337467 - 8. Convert "Notification:Event" observer to event; r=sebastian

Bug 1337467 - 9. Convert BrowserApp observers to events; r=sebastian

Bug 1337467 - 10. Convert Tab observers to events; r=sebastian

Bug 1337467 - 11. Convert "Passwords:Init" and "FormHistory:Init" observers to events; r=sebastian

Bug 1337467 - 12. Convert Reader observers to events; r=sebastian

Bug 1337467 - 13. Convert Distribution observers to events; r=sebastian

Bug 1337467 - 14. Convert "Fonts:Reload" observer to event; r=sebastian

Bug 1337467 - 15. Convert RecentTabsAdapter observers to events; r=sebastian

Bug 1337467 - 16. Convert "Session:Prefetch" observer to event; r=sebastian

Bug 1337467 - 17. Convert "Browser:Quit" and "FullScreen:Exit" observers to events; r=sebastian

Bug 1337467 - 18. Convert SessionStore observers to events; r=sebastian

The "Session:NotifyLocationChange" observer is sent by browser.js and
requires passing a browser reference, so it's left as an observer.

Bug 1337467 - 19. Remove unused "Tab:Screenshot:Cancel" notifyObserver call; r=me

Bug 1337467 - 20. Convert "Session:Navigate" observer to event; r=sebastian

Bug 1337467 - 21. Convert "Locale:*" observers to events; r=sebastian

Bug 1337467 - Add log for unhandled events; r=me

Add back the log indicating no listener for an event, which can be
useful when reading logcat. r=me for trivial change.

Bug 1337467 - Don't return error from EventDispatcher when OnEvent fails; r=me

When a listener's OnEvent method returns an error, continue to dispatch
to other listeners and don't return an error from the dispatch function.
This avoids unexpected errors when dispatching events. r=me for trivial
patch.
2017-03-07 12:34:04 -05:00
Florian Quèze cd762cc83c Bug 1344711 - script-generated patch to remove try blocks around get*Pref calls, r=jaws.
--HG--
extra : rebase_source : c6e20e6e79b0ca5de751c52712d96cbea9432d26
2017-03-07 15:29:48 +01:00
Jan Henning 0c214f050c Bug 1343995 - Wait for sanitizing to really finish before shutting down. r=jchen
BrowserApp's sanitize() function assumed that the Sanitizer would return promises for each sanitization handler, so it could wait for them to resolve before proceeding with shutdown (which was also the assumption behind the patch for bug 1266594). In fact even the Sanitizer expected to do this is well, since it wrapped each of its handling functions within a promise/task/sendRequestForResult. However it turns out that Sanitizer's clearItem function then failed to actually return this promise - apparently ever since this was implemented.

MozReview-Commit-ID: 6hN3UTXUIuV

--HG--
extra : rebase_source : 4971bc02962c817037a565595d3c1cedb0532d76
2017-03-02 21:34:23 +01:00
Sebastian Kaspari 4e6612f2c4 Bug 1330973 - WebsiteMetadata.jsm: Add description length to Metadata JSON. r=Grisha
MozReview-Commit-ID: 4zxaHPLEWJ6

--HG--
extra : rebase_source : 861de1b6e5f47435963d641aa6a2245f18a77128
2017-02-02 16:21:54 +01:00
Eugen Sawin 585bf70c8b Bug 1342508 - [2.1] Make code style consistent across GeckoView. r=jchen 2017-02-27 20:39:45 +01:00
Eugen Sawin 4df1593760 Bug 1342508 - [1.0] Add GeckoView.reload. r=snorp 2017-02-27 20:39:45 +01:00
Eugen Sawin 9bf1487388 Bug 1322576 - [5.3] Make GeckoView settings accessible through nsIAndroidView. r=jchen 2017-02-22 14:57:42 +01:00
Eugen Sawin 8598247dd1 Bug 1322576 - [3.3] Add GeckoView settings module. r=snorp 2017-02-22 14:57:40 +01:00
Eugen Sawin a1b696f5ae Bug 1322576 - [2.4] Add GeckoView settings management. r=snorp,jchen 2017-02-22 14:57:38 +01:00
Dylan Roeh cdd384261f Bug 1332463 - Implement ProgressListener. r=jchen 2017-02-10 16:49:42 -06:00
Eugen Sawin 1b0bde87e7 Bug 1322592 - [4.0] Refactor GeckoViewContent to extend GeckoViewModule. r=jchen 2017-02-09 15:44:00 +01:00
Eugen Sawin 7fedfdca7a Bug 1322592 - [3.3] Add GeckoViewModule base class and integrate GeckoViewNavigation. r=snorp,jchen 2017-02-09 15:44:00 +01:00
Eugen Sawin 5ecdbd81b8 Bug 1322592 - [2.2] Add GeckoViewNavigation.jsm. r=snorp,jchen 2017-02-09 15:44:00 +01:00
Dylan Roeh 81892271a5 Bug 1322590 - Add and hook up ContentListener for GeckoView. r=jchen 2017-01-25 15:13:58 -06:00
srivatsav 32dab0d403 Bug 1199752 - Removing all tab mirroring UI code. r=sebastian
MozReview-Commit-ID: GKcqpknJSAD

--HG--
extra : amend_source : cde365c92d4427726b29c80c9ea7619ccc629561
2017-02-02 11:27:28 +05:30
Jim Chen f45b77cea8 Bug 1334728 - 1. Add missing argument to dispatch call in HelperApps.jsm; r=sebastian
Add the missing "type" argument to the EventDispatcher.instance.dispatch call.
2017-02-01 17:35:45 -05:00
Jim Chen c9a4e01072 Bug 1333590 - 6. Remove GeckoEventListener and NativeEventListener; r=snorp r=sebastian
Remove GeckoEventListener and NativeEventListener now that we uniformly
use BundleEventListener. Also remove related classes NativeJSContainer,
NativeJSObject, and GeckoRequest, as well as related tests and C++
code.

The "Messaging" object in Messaging.jsm is replaced with a dummy object
that redirect calls to the global and/or window event dispatcher.
2017-02-01 17:35:45 -05:00
Jim Chen 9ad1c54661 Bug 1333590 - 3. Change remaining Messaging calls to EventDispatcher calls; r=sebastian
Convert calls in several places where we still use Messaging.* instead
of EventDispatcher.
2017-02-01 17:35:44 -05:00
Jim Chen 167d8d6ad2 Bug 1333590 - 1. Convert GeckoRequest usages to events; r=sebastian
Convert places where we use GeckoRequest (to get a callback from JS to
Java) to bundle events that use the built-in callback support.
2017-02-01 17:35:44 -05:00
Florian Quèze b11907c7aa Bug 1334156 - script-generated patch to replace .ownerDocument.defaultView with .ownerGlobal, r=jaws. 2017-01-27 10:51:03 +01:00
Jim Chen f6a51590a8 Bug 1333588 - Convert PageActions events to bundle events; r=sebastian
Convert events used in PageActions to bundle events. UI thread events
are used because the listeners require the UI thread. The observer
notifications from Java to Gecko are converted to events as well.
2017-01-25 18:57:31 -05:00
Jim Chen 2e56d7739e Bug 1333586 - Convert AccountsHelper events to bundle events; r=sebastian
Convert events used in AccountsHelper to bundle events. Most events are
kept as Gecko thread events, but a couple events that start activities
are converted to UI thread events.
2017-01-25 18:57:31 -05:00
Jim Chen a396212751 Bug 1333581 - Convert IntentHelper events to bundle events; r=sebastian
Convert events used in IntentHelper to bundle events. UI thread events
are used for most events because the listeners perform operations on
Intent objects, which is best done on the UI thread. For
"Intent:GetHandlers", use a Gecko thread event because it's possible we
want a synchronous callback response.
2017-01-25 18:57:31 -05:00
Jim Chen 296c0b8b43 Bug 1330439 - 4. Convert home panel observers to events; r=sebastian
Convert nsIObserverService observers used in home panels to events that
go through EventDispatcher.
2017-01-25 18:53:58 -05:00
Jim Chen dfcdeb5ce1 Bug 1330439 - 3. Convert HomePanelsManager events to bundle events; r=sebastian
Convert events used in HomePanelsManager to bundle events. Background
thread events are used because HomePanelsManager processes panel changes
in the background thread. Changing to background thread events also lets
us make the change queue a simple ArrayList instead of a
ConcurrentLinkedQueue, because there is no longer multiple threads
involved.
2017-01-25 18:53:58 -05:00
Jim Chen 768eb3905e Bug 1330439 - 2. Convert HomeBanner events to bundle events; r=sebastian
Convert the events in HomeBanner to bundle events. "HomeBanner:Shown" is
removed in favor of using a callback.
2017-01-25 18:53:58 -05:00
Jim Chen 6738ee9866 Bug 1330439 - 1. Convert PanelInfoManager events to bundle events; r=sebastian
Convert the "HomePanels:Data" event to a GeckoBundle/BundleEventListener
event. UI thread event is used because the listener invokes the callback
on the UI thread.
2017-01-25 18:53:58 -05:00
Jim Chen 9a9702cab0 Bug 1330409 - Convert CastingApps events to bundle events; r=sebastian
Convert the events used in MediaCastingBar and ChromeCastPlayer to
GeckoBundle/BundleEventListener events. UI thread events are used
because the listener performs operations on the UI thread.
2017-01-25 18:53:57 -05:00
Jan Henning c90cc004dc Bug 1317079 - Avoid spurious exception when snackbar is dismissed. r=jchen
When a snackbar with a button callback is dismissed, this translates to a rejected promise from sendRequestForResult(). We need to catch this in order to avoid a spurious 'JavaScript Error: "uncaught exception: undefined"' message appearing in the console and possibly causing confusion.

MozReview-Commit-ID: 7hsAOAMTeDP

--HG--
extra : rebase_source : 6c5eb28d2e0dcf39a35b310d1e1c45cfc47f272b
2017-01-21 21:47:08 +01:00
Nevin Chen 790b6fa100 Bug 1275662 - Close all tabs and clean up session files when "Open Tabs" is selected in "Clear private data on exit" or "Clear private data" pref. r=JanH,sebastian
MozReview-Commit-ID: GoUQVDIzYbI

--HG--
extra : rebase_source : 13bbf3477a29cf301df72b521a0e02875bb5ef14
2016-12-29 14:22:45 +08:00
Jim Chen 781d8b92af Bug 1328684 - Convert SharedPreferencesHelper events to bundle events; r=sebastian
Convert events used in SharedPreferencesHelper to
GeckoBundle/BundleEventListener events. Gecko thread events are used
because the listeners are expected to be synchronous, especially for the
SharedPreferences:Get event, which also requires a synchronous callback.
2017-01-10 23:01:28 -05:00
Jim Chen b6b448520d Bug 1328682 - Convert MediaPlayerManager events to bundle events; r=sebastian 2017-01-10 23:01:27 -05:00
Jim Chen 36a6807488 Bug 1325156 - 2. Convert JavaAddonManager events to bundle events; r=sebastian
Convert events used in the two JavaAddonManager implementations to
GeckoBundle/BundleEventListener events. Gecko thread events are used to
keep with previous behavior. The external interface for addons is kept
the same (using Bundle/JSONObject as container objects), in order to
preserve compatibility, while the internal implementation is changed to
use GeckoBundle.
2017-01-10 23:00:57 -05:00
Florian Quèze fc6379e827 Bug 1329182 - remove trailing newURI null parameters in the rest of the tree, r=jaws. 2017-01-09 20:27:26 +01:00
Jim Chen 922fcb61b5 Bug 1325154 - Convert NotificationHelper events to bundle events; r=sebastian
Convert NotificationHelper events to use BundleEventListener and
GeckoBundle. UI events are used to perform notification operations, and
to keep access to mClearableNotifications to the UI thread. Also,
refactor some recently-added code in NotificationHelper.
2016-12-28 17:49:28 -05:00
Sebastian Kaspari bbe7ce58a6 Bug 1311434 - Website Metadata: Get provider name from Open Graph tags. r=Grisha
There's a pull request [1] and issue [2] on GitHub tracking the work to land this
in the page-metadata-parser repository. Multiple potential sources for getting a
'provider name' are considered in the linked issue - however they all have
slightly different semantic meanings. Only 'og:site_name' actually has the same
meaning as "provider name". Therefore it is pretty safe to land this part.

[1] https://github.com/mozilla/page-metadata-parser/pull/81
[2] https://github.com/mozilla/page-metadata-parser/issues/79

MozReview-Commit-ID: KQFSLo85JoS

--HG--
extra : rebase_source : ba86e5c3785cda500a1e8f5a8887228c72f6d00f
2016-12-20 14:21:32 +01:00
Jim Chen 23c3c2e325 Bug 1323576 - Convert GeckoNetworkManager events to bundle events; r=sebastian
Convert "Wifi:Enable" and "Wifi:GetIPAddress" events to GeckoBundle
events. Use the UI thread because we do things like starting activities
and using system services, which are best done on the UI thread.
2016-12-18 08:10:18 -05:00
Tooru Fujisawa 25ecae81fc Bug 1321226 - Remove legacy generator from mobile/. r=sebastian 2016-12-15 16:54:46 +09:00
Jim Chen cc4198ee1a Bug 1322711 - 3. Convert JavascriptBridge to use Bundle events; r=gbrown
Convert JavascriptBridge, JavascriptTest, and other relevant code to use
the new Bundle events. We used the same "Robocop:JS" event for
communicating both ways before, but now that we have a unified bus, we
need two different events, "Robocop:JS" and "Robocop:Java" for two-way
communication.
2016-12-13 03:21:47 -05:00
Jim Chen e9532b9a3f Bug 1321418 - Use GekcoBundle events in GeckoApp/BrowserApp; r=snorp r=sebastian r=gbrown
Bug 1321418 - 1. Use GekcoBundle events in GeckoApp; r=snorp r=sebastian

Switch GeckoApp to using GeckoBundle events everywhere. UI or Gecko
events are used if the event requires the UI or Gecko thread,
respectively, and background events are used for all other events.

There are changes to some other Java classes, such as SnackbarBuilder
and GeckoAccessibility, due to the switch to GeckoBundle.

For "Snackbar:Show", we need the global EventDispatcher because the
event can be sent to both GeckoApp and GeckoPreferences. Howveer, we
only want one listener registered at the same time, so we register and
unregister in GeckoApp's and GeckoPreferences's onPause and onResume
methods.

Bug 1321418 - 2. Use appropriate JS EventDispatcher to send GeckoApp events; r=snorp r=sebastian

Change JS code that sends events to GeckoApp to use either the global
EventDispatcher or the per-window EventDispatcher.

"Session:StatePurged" is not used so it's removed. "Gecko:Ready" in
geckoview.js is not necessary because it's only used for GeckoApp, so
it's removed from geckoview.js.

Bug 1321418 - 3. Use GeckoBundle events in BrowserApp; r=snorp r=sebastian

Switch BrowserApp to using GeckoBundle events, in a similar vein as
GeckoApp. UI or Gecko events are used if the event handlers required UI
or Gecko thread, respectively, and background events are used for all
other events.

Some other Java classes also have to be modified as a result of
switching to GeckoBundle.

Bug 1321418 - 4. Use global EventDispatcher to send BrowserApp events; r=snorp r=sebastian

Change JS code that sends events to BrowserApp to use the global
EventDispatcher instead of "Messaging".

Bug 1321418 - 5. Update usages of events in tests; r=gbrown

Update cases where we use or wait for events in tests.
2016-12-09 12:32:45 -05:00
Jim Chen edb09e5551 Bug 1319496 - 3. Convert prompts to BundleEventListener; r=sebastian
Convert prompts to use BundleEventListener and GeckoBundle.

DefaultDoorHanger.setOptions accepts a JSONObject argument, but if we
converted it to GeckoBundle, it would involve a lot of extra changes in
the other doorhanger code. So this patch adds GeckoBundle.fromJSONObject
and converts JSONObject to GeckoBundle within
DefaultDoorHanger.setOptions. In the future, another patch would convert
all doorhanger code to use GeckoBundle instead of JSONObject.
2016-11-29 12:25:53 -05:00
Jim Chen 347c3ce21e Bug 1317604 - 1. Add EventDispatcher to Messaging.jsm; r=snorp r=sebastian
Add a new EventDispatcher interface to Messaging.jsm, and provide means
to access either the global EventDispatcher through
EventDispatcher.instance or a per-window EventDispatcher through
EventDispatcher.for(window). The old Messaging object is retained until
we can convert all existing uses of it in Fennec to use EventDispatcher,
at which point `Messaging` will be made to point to
`EventDispatcher.instance`.
2016-11-21 10:01:30 -05:00
Grisha Kruglov 085d762095 Bug 1301717 - Limit what we extract, store incoming page metadata r=sebastian
We only extract metadata that we'd want to store. For now this is just image_url.

In case we try to store page metadata before corresponding history record has been inserted,
we queue up metadata and wait for an event from GlobalHistory letting us know that history
record is now available, at which point we try inserting metadata again.

MozReview-Commit-ID: 2FpIqc6uHMb

--HG--
extra : rebase_source : 5839e04f82e174f50a61c107d271b4bda3f748c8
2016-11-04 13:39:50 -07:00
Sebastian Kaspari 63a89783cc Bug 1301715 - Extract website metadata and make it available. r=ahunt
This patch introduces WebsiteMetadata.jsm which imports fathom and page-metadata-parser.
The code has been slightly modified to not depend on more node libraries.

On DOMContentLoaded the module will extract the metadata asynchronously and send it with
a 'Website:Metadata' event.

MozReview-Commit-ID: LxhYOTvvdsF

--HG--
extra : rebase_source : e31286bd7268ad62d55f1a5318cde79442e9acba
2016-09-08 10:20:24 +02:00
Matthew Noorenberghe 3803d21cec Bug 1297905 - Remove usage of getAllDisabledHosts in sanitize implementations. r=liuche,markh
Bug 1058438 moved disabled hosts to the permission manager which are already cleared by these modules.

MozReview-Commit-ID: InprrYLvjMR

--HG--
extra : rebase_source : 806c2542cbab953b74ad82611501ecac32400930
2016-08-24 17:41:10 -07:00
Makoto Kato 9a8b60ffca Bug 1284283 - Remove MozContact API Android backend. r=sebastian
MozReview-Commit-ID: GLhrA1cc1Rq

--HG--
extra : rebase_source : 73efab6d9468388a6ba0be489250d8dd3d185cd6
2016-08-08 15:40:19 +09:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Grigory Kruglov af2a097cb4 Bug 1245795 - Pre: Purge OrderedBroadcast r=nalexander
MozReview-Commit-ID: Ad1ENG0XJX1

--HG--
extra : rebase_source : dea0a39f6340e84f1fabee5abf8b861b26c92b2e
2016-07-04 17:51:15 -07:00
Kit Cambridge 22e7cd6527 Bug 1278689 - Remove push subscriptions when clearing site settings on Android. r=margaret
MozReview-Commit-ID: BrOjKzswY1F

--HG--
extra : rebase_source : 8230eecf5fd5caaaceb1784c4a61967c46430a3a
2016-06-07 14:02:55 -07:00
Jan Henning 222df1171c Bug 1270543 - Part 1: Enable double tapping to select an action in the prompt dialog. r=liuche
On newer Android versions, double tapping an entry in the app chooser is equivalent to tapping it once and selecting "Just once". To enable this functionality for our own app chooser when downloading a file, this patch enables passing a button index to the prompt dialog which will be chosen by default if a double tap has been detected.

To do this, we track the input value we receive in onChange. If we receive the same value twice in a row and a button has been configured, we close the dialogue and pass the result with that button back to the caller.

MozReview-Commit-ID: EVs2x3OtHmB

--HG--
extra : transplant_source : %85Td%83%0D%DD%D0%1D%F48a%5D%A0%CF%B4%A5%CE%5E%22%7E
extra : histedit_source : 190cf52e481b637172ea3b49ccec606f31dc86cf
2016-05-17 22:52:59 +02:00