Commit graph

342 commits

Author SHA1 Message Date
Mozilla L10n Automation Bot
d2893d3b07 [components] Import l10n. 2020-03-18 00:02:10 +00:00
MozLando
2927b1326e [components] Merge https://github.com/mozilla-mobile/android-components/pull/6182 https://github.com/mozilla-mobile/android-components/pull/6197 https://github.com/mozilla-mobile/android-components/pull/6270 https://github.com/mozilla-mobile/android-components/pull/6286 (part 2)
6182: https://github.com/mozilla-mobile/android-components/issues/3832: Add support for additional headers when loading url r=pocmo a=psymoon



6197: Import strings from android-l10n. r=jonalmeida a=mozilla-l10n-automation-bot

n/t

6270: For https://github.com/mozilla-mobile/android-components/issues/6269: Notify active sessions when all exceptions are removed. r=Amejia481 a=ValentinTimisica

I also updated the tests accordingly.
Made this change because the tracking protection icon is not updated after the
exceptions are removed.




6286: Closes https://github.com/mozilla-mobile/android-components/issues/6281: Do not automatically dismiss confirm dialogs r=Amejia481 a=csadilek

The feature to automatically dismiss can maybe be made more robust to not be affected by lifecycle changes (https://github.com/mozilla-mobile/android-components/issues/6281#issuecomment-599739212), but in either case we don't want to automatically dismiss confirmation dialogs, as these require user interaction before the next page load anyway.

Similar fix to: https://github.com/mozilla-mobile/android-components/pull/5704/

Co-authored-by: Simon Chae <chaesmn@gmail.com>
Co-authored-by: Mozilla L10n Automation Bot <release+l10n-automation-bot@mozilla.com>
Co-authored-by: ValentinTimisica <valentin.timisica@softvison.ro>
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
2020-03-17 17:18:11 +00:00
Mozilla L10n Automation Bot
639baa7eeb [components] Import l10n. 2020-03-17 14:44:12 +00:00
Simon Chae
3e0d4de23a [components] Issue https://github.com/mozilla-mobile/android-components/issues/3832: Add support for additional headers when loading url 2020-03-17 10:28:19 -04:00
codrut.topliceanu
e636a49d03 [components] For https://github.com/mozilla-mobile/android-components/pull/7632 - Implement notifyObservers of onNavigateBack in SystemEngineSession 2020-03-11 10:47:38 +02:00
Mozilla L10n Automation Bot
c64f76d84a [components] Import l10n. 2020-03-06 00:25:11 +00:00
Arturo Mejia
4a4d9a4c82 [components] Issue https://github.com/mozilla-mobile/android-components/issues/6163 remove the domain_overrides 2020-03-05 14:49:31 -05:00
Arturo Mejia
acae49f949 [components] Issue https://github.com/mozilla-mobile/android-components/issues/6163 Remove the Disconnect category for the SystemEngine 2020-03-05 14:44:58 -05:00
Arturo Mejia
335e263a79 [components] Closes https://github.com/mozilla-mobile/android-components/issues/6163: Update tracking protection lists
domain_blacklist.json maps to disconnect-blacklist.json
commit(shavar-prod-lists) d5755856f4eeab4ce5e8fb7896600ed7768368e5

domain_whitelist.json maps to disconnect-entitylist.json
commit(shavar-prod-lists) 01dcca911aa7787fd835a1a19cef1012296f4eb7
2020-03-05 14:44:58 -05:00
Mozilla L10n Automation Bot
177b318814 [components] Import l10n. 2020-03-04 00:03:47 +00:00
Simon Chae
100239143b [components] Closes https://github.com/mozilla-mobile/android-components/issues/6018: Do not load url during link if session is restored 2020-03-02 14:28:48 -05:00
Mozilla L10n Automation Bot
64d8390123 [components] Import l10n. 2020-02-24 00:04:07 +00:00
Mozilla L10n Automation Bot
d9d2a27483 [components] Import l10n. 2020-02-21 00:04:28 +00:00
Severin Rudie
5b868c9ca0 [components] For https://github.com/mozilla-mobile/fenix/issues/5695: adds '{app} Search' to text selection context menu 2020-02-14 08:40:46 -08:00
Mozilla L10n Automation Bot
8d4b0c5d27 [components] Import l10n. 2020-02-07 00:05:20 +00:00
Mozilla L10n Automation Bot
8bf1ef2fa8 [components] Import l10n. 2020-01-22 00:04:26 +00:00
Sawyer Blatz
f0f6d47247 [components] For https://github.com/mozilla-mobile/android-components/issues/2689: Refactors Error Pages to allow images
Co-authored-by: James Willcox <snorp@snorp.net>
Co-authored-by: Agi Sferro <agi@sferro.dev>
2020-01-21 11:18:14 -08:00
Mozilla L10n Automation Bot
437b0e4885 [components] Import l10n. 2020-01-20 00:03:35 +00:00
Mozilla L10n Automation Bot
6ef542faa4 [components] Import l10n. 2020-01-15 00:07:29 +00:00
Mozilla L10n Automation Bot
8872798070 [components] Import l10n. 2020-01-09 00:01:43 +00:00
Mozilla L10n Automation Bot
ac58483f3b [components] Import l10n. 2020-01-07 00:02:02 +00:00
Mozilla L10n Automation Bot
2c4948084b [components] Import l10n. 2020-01-06 00:03:46 +00:00
Mozilla L10n Automation Bot
fdee5b8b3e [components] Import l10n. 2020-01-03 00:06:56 +00:00
Mozilla L10n Automation Bot
d591b6bfc8 [components] Import l10n. 2019-12-27 00:08:43 +00:00
Roger Yang
7aca9473f1 [components] Closes https://github.com/mozilla-mobile/android-components/issues/5243: Split AppLinksFeature into feature and interceptor 2019-12-17 15:57:16 -05:00
Mozilla L10n Automation Bot
933e9d5f97 [components] Import l10n. 2019-12-17 18:39:45 +00:00
Gabriel Luong
5a7f12c152 [components] Closes https://github.com/mozilla-mobile/android-components/issues/4240 - Clear the selection on back press
- Adds a reference to the current session's BasicSelectionActionDelegate in GeckoEngineView
2019-12-13 20:39:11 -05:00
Roger Yang
60e1084ff7 [components] For https://github.com/mozilla-mobile/android-components/issues/5127: Add Debugging Code to Help Determine Crash Cause 2019-11-29 14:52:48 -05:00
Sawyer Blatz
191d379ff9 [components] Fixes https://github.com/mozilla-mobile/android-components/issues/5046: Updates guessFileName to use uniqueFileName 2019-11-22 11:40:29 -08:00
MozLando
d09d5c0e09 [components] Merge https://github.com/mozilla-mobile/android-components/pull/5066
5066: Add setDynamicToolbarMaxHeight API r=pocmo a=hiikezoe



Co-authored-by: Hiroyuki Ikezoe <hiroyuki.ikezoe@gmail.com>
2019-11-20 10:00:39 +00:00
Roger Yang
ac7d92a5f9 [components] Closes https://github.com/mozilla-mobile/android-components/issues/4950: Enable Launching URL in Third Party Application 2019-11-16 22:12:58 -05:00
Hiroyuki Ikezoe
97f3a75121 [components] Add setDynamicToolbarMaxHeight API 2019-11-15 07:31:54 +09:00
Christian Sadilek
8777fc0c62 [components] Closes https://github.com/mozilla-mobile/android-components/issues/4553: Migrate WindowFeature to browser-state 2019-10-31 15:31:50 -04:00
Christian Sadilek
a5cc73dd18 [components] Closes https://github.com/mozilla-mobile/android-components/issues/4749: Fix for bug 1522829 2019-10-17 18:44:40 -04:00
Lina Cambridge
c64f248f76 [components] Pass redirect source and target flags to history tracking delegates.
There's some confusion in `GeckoEngineSession` about redirect flags.
The `VISIT_REDIRECT_SOURCE` and `VISIT_REDIRECT_SOURCE_PERMANENT` flags
that we get from GeckoView's history delegate are for the redirect
_source_, not the visit type. They indicate if the URL passed to
`onVisited` is redirecting _to_ another URL, most likely because the
server returned an HTTP 3xy status code with a `Location` header.
Rust Places decides whether to mark the URL as hidden based on
these flags.

`VISIT_REDIRECT_{PERMANENT, TEMPORARY}`, however, indicate if the
URL passed to `onVisited` is the _target_ of a redirect (in other
words, the page that's _in_ the `Location` header). These get
translated into `VisitType` flags, which Rust Places stores as the
visit transition type. These two flags don't affect whether a URL
is hidden.

Note that, in a redirect chain, the middle links are both sources and
targets. For example, in "mozilla.org" -> "www.mozilla.org" ->
"www.mozilla.org/en-US", "www.mozilla.org" is both a redirect target
(since "mozilla.org" redirected to it), and a source (it redirected
to "www.mozilla.org/en-US").

See https://github.com/mozilla-mobile/fenix/issues/3526.
2019-10-11 21:41:40 -07:00
Axel Hecht
600937dc4a [components] Import strings from android-l10n
State: mozilla-l10n/android-l10n@97355ffcdc
2019-09-25 13:58:27 +02:00
Denys M
b95c932f81 [components] For https://github.com/mozilla-mobile/android-components/issues/4460. Fix detekt warning about license in project files. 2019-09-24 01:01:03 +04:00
Daniela Arcese
b3d5a23ee8 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1388: Update tracking protection lists
domain_blacklist.json commit(shavar-prod-lists)
ba54e81585a68ec7662629b69e7ebd805f0bda78

domain_whitelist.json commit(shavar-prod-lists)
ba54e81585a68ec7662629b69e7ebd805f0bda78
2019-09-17 08:41:09 -04:00
Axel Hecht
1b48aa9e31 [components] Import strings from android-l10n
State: mozilla-l10n/android-l10n@e78d5868c7
2019-09-13 14:42:51 +02:00
Arturo Mejia
f90f380cbc [components] Closes https://github.com/mozilla-mobile/android-components/issues/4349: Align default tracking protection policies with
Firefox Desktop policies.
2019-09-10 01:45:14 -04:00
Arturo Mejia
6e7ef89243 [components] Closes https://github.com/mozilla-mobile/android-components/issues/4190: Decouple safe browsing api from the tracking protection. 2019-08-26 21:44:53 -04:00
Arturo Mejia
a618ea15ec [components] Closes https://github.com/mozilla-mobile/android-components/issues/4191: Fixed the recommended() tracking category on SystemEngine 2019-08-24 02:16:25 -04:00
Axel Hecht
a893d1f5e7 [components] Import strings from android-l10n
State: mozilla-l10n/android-l10n@90a28fd458
2019-08-23 12:33:53 +02:00
Arturo Mejia
044628b17d [components] Closes https://github.com/mozilla-mobile/android-components/issues/4098, https://github.com/mozilla-mobile/android-components/issues/4110: Exposing new categories of content blocking. 2019-08-14 12:28:25 -04:00
Arturo Mejia
b14d8b5bd2 [components] Closes https://github.com/mozilla-mobile/android-components/issues/4079: Manually updating GeckoView nightly 70.0.20190809095611. 2019-08-13 00:12:32 -04:00
Axel Hecht
222835e01b [components] Import strings from android-l10n
State: mozilla-l10n/android-l10n@ab580f757c
2019-08-12 12:45:49 +02:00
Christian Sadilek
ce24bae766 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1503: Add support for window requests to engine-gecko 2019-07-30 13:49:51 -04:00
Axel Hecht
e9e8e4a440 [components] Import strings from android-l10n
State: mozilla-l10n/android-l10n@1412258878
2019-07-30 15:09:47 +02:00
Tiger Oakes
708e1dd908 [components] Fixes https://github.com/mozilla-mobile/android-components/issues/3516 - Use response to determine file name 2019-07-19 14:09:49 -04:00
Arturo Mejia
773f9e92a2 [components] Closes https://github.com/mozilla-mobile/android-components/issues/3788: Expose to which category a blocked tracker belongs. 2019-07-19 08:31:31 -07:00
Axel Hecht
96447ce446 [components] Import strings from android-l10n
State: mozilla-l10n/android-l10n@e521a2aab2
2019-07-17 17:37:25 +02:00
Tiger Oakes
0099bac510 [components] Turn on MagicNumber ignoreEnums rule 2019-07-15 11:41:43 -04:00
Simon Chae
46cb134dd8 [components] Closes https://github.com/mozilla-mobile/android-components/issues/3666: Add useWideView=false desktopMode test case 2019-07-12 13:57:26 -04:00
Simon Chae
27cc28bd6c [components] Issue https://github.com/mozilla-mobile/android-components/issues/3666: Set desktopMode toggle against settings.useWideViewPort
For toggleDesktopMode()
2019-07-12 13:57:26 -04:00
Simon Chae
d0e8cbc06e [components] Issue https://github.com/mozilla-mobile/android-components/issues/3666: Make Settings.useWideViewPort nullable 2019-07-12 13:57:26 -04:00
Simon Chae
f0e777c486 [components] Issue https://github.com/mozilla-mobile/android-components/issues/3666: Apply useWideViewPort to WebSetting 2019-07-12 13:57:26 -04:00
Simon Chae
03fe096b30 [components] Issue https://github.com/mozilla-mobile/android-components/issues/3666: Add useWideViewPort setting and SystemEngineSession 2019-07-12 13:57:26 -04:00
Tiger Oakes
967bc87a29 [components] Replace String.toUri with Android KTX 2019-07-08 14:25:18 -04:00
Tiger Oakes
241c0462c7 [components] Fixes https://github.com/mozilla-mobile/android-components/pull/2587 - Show camera inside file prompt 2019-07-08 10:28:23 -04:00
Sebastian Kaspari
18af01ecbe [components] Issue https://github.com/mozilla-mobile/android-components/pull/3602: Add EngineView.release() for manually releasing session from view. 2019-07-03 14:44:40 +02:00
Tiger Oakes
d97e53bc16 [components] Reduce refs to Context in browser-engine-system 2019-07-02 16:19:31 -04:00
Christian Sadilek
8e73284828 [components] Closes https://github.com/mozilla-mobile/android-components/issues/3521: Expose GeckoView load flags for loadUrl calls 2019-07-01 13:54:56 +02:00
Tiger Oakes
b248451666 [components] Issue https://github.com/mozilla-mobile/android-components/issues/3481 - Fix null checks before Android Q 2019-06-25 10:38:03 +02:00
Axel Hecht
0483091029 [components] Import strings from android-l10n
State: mozilla-l10n/android-l10n@4c73402212
2019-06-24 07:39:01 -07:00
Sebastian Kaspari
d9cd74ad98 [components] Closes https://github.com/mozilla-mobile/android-components/issues/2349: concept-engine: Add "version" property to Engine. 2019-06-14 14:30:07 +02:00
Denys M
eeab8c137e [components] For https://github.com/mozilla-mobile/android-components/issues/1481. Use androidx runner in browser-engine-system. 2019-06-12 15:19:42 +02:00
James Hugman
8768f56b97 [components] Fix https://github.com/mozilla-mobile/android-components/issues/3293 Feed request URL to session observer from different engines
This allows the slack:// (and other custom schemes).
2019-06-07 18:15:13 +01:00
Tiger Oakes
e7fdd7b70d [components] Turn on ComplexMethod ignore when expression lint 2019-06-07 10:18:31 +02:00
Denis Buzmakov
9f4c8b9e01 [components] Closes https://github.com/mozilla-mobile/android-components/issues/888: Use PixelCopy API on Oreo+ 2019-05-30 14:40:31 -07:00
Denis Buzmakov
0f6aa54106 [components] Closes https://github.com/mozilla-mobile/android-components/issues/888: Draw View on canvas instead of using drawing cache 2019-05-30 14:40:31 -07:00
James Hugman
6a99c552f1 [components] Fixes https://github.com/mozilla-mobile/android-components/issues/2976 Introduce feature-app-links
This includes UI in private tabs.

Squashed commits:
[180e515e8] Connect to Session Observer and thence to AppLinksFeature.
[77922dcc0] browser-engine-system tests passing
[045717868] lint etc
[6f7b44cad] Thread another Boolean through EngineObserver -> Session onLoadRequest
[18693cad0] Start testing the feature.
[5e0a93556] Fixup tests to use shadow package manager, and catch some new bugs.
[3a5976dde] Split use cases up for menu and intercepting cases.
[f7eae96dd] Address reviewer comments re: dead code and docs
[b15ffb88c] Rename triggeredByUserInteraction to loadRequestTriggeredByUserInteraction
[edc49b573] Move session observer into member of feature
[91ed1f5ac] Add changelog entry
[098dc5067] Add boolean flag to prevent interception of links
[f92731a44] Add load request/trigger by user interaction to session.observer
[46385577d] Move opening to another use case, with test
[56da7e7c1] Change into using feature
[643c9f453] Remove duplicate copyright
[6b3f80bbc] Add testing of get and a fragment for open use cases
[669c84567] Add AppLinksRedirectConfig and supporting use cases.

There is a url redirect creation use case, a load URL use case and an interceptor.
[72896a567] AppLinksUseCases detects if a URL can be opened with another non-browser app
[939eb62fa] Initial commit of empty feature-app-links
2019-05-30 16:36:16 +01:00
Tiger Oakes
c9500fd185 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1824 - Pull to Refresh 2019-05-29 13:04:55 -07:00
Christian Sadilek
04de05e949 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1798: Add clear data functionality to Gecko engine 2019-05-29 09:10:00 -04:00
Axel Hecht
a0bfba5cab [components] Import strings from android-l10n
Status: mozilla-l10n/android-l10n@edd6b0e79f
2019-05-21 10:18:16 -04:00
Denys M
82c19e96c7 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1628. Hide built-in WebView zoom controls in engine-system. 2019-05-16 14:31:48 -04:00
Sebastian Kaspari
8bd0491d94 [components] Closes https://github.com/mozilla-mobile/android-components/issues/2675: Add EngineViewBottomBehavior to dynamically update vertical clipping when toolbar scrolls away.
This patch fixes issues with bottom-aligned web content that is drawn behind the toolbar, as described in:
- https://github.com/mozilla-mobile/fenix/issues/552
- https://github.com/mozilla-mobile/reference-browser/issues/464
2019-05-13 18:01:53 -04:00
Axel Hecht
646f870c78 [components] Import strings from android-l10n
State: mozilla-l10n/android-l10n@4e63500774
2019-05-13 16:26:09 -04:00
Axel Hecht
f97de4a835 [components] Import strings from android-l10n
State: mozilla-l10n/android-l10n@5fd2e49ca4
2019-05-08 08:49:54 -04:00
Stas Parshin
86325367a9 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1740: Add support for authentication alerts for SystemEngineView. 2019-05-07 09:08:05 -04:00
Axel Hecht
367c8dded3 [components] Import strings from android-l10n
Status: mozilla-l10n/android-l10n@68b2689e48
2019-05-06 10:15:22 -04:00
Sebastian Kaspari
5c54ec453d [components] Closes https://github.com/mozilla-mobile/android-components/issues/842: Migrate from support libraries to AndroidX. 2019-05-02 16:08:55 +02:00
Grisha Kruglov
66d17ffe07 [components] Update and expand Engine(Session) tests 2019-04-30 13:38:33 -07:00
Grisha Kruglov
b898bb7ef3 [components] Closes https://github.com/mozilla-mobile/android-components/issues/2862: Make VisitType a requirement for HistoryTrackingDelegate's onVisited method
This shifts responsibility of constructing a VisitType for any given visit on the
caller of HistoryTrackingDelegate implementation, which is normally the engine.

This is generally what we want: engine is normally best suited to determine a visit type
for a URI that's currently being opened.
2019-04-30 13:38:33 -07:00
Grisha Kruglov
1afe4410dd [components] Closes https://github.com/mozilla-mobile/android-components/issues/2606: Blacklist URI schemas in the HistoryDelegate 2019-04-30 13:38:33 -07:00
Sebastian Kaspari
f4e9c9cf08 [components] Closes https://github.com/mozilla-mobile/android-components/issues/2428: Update strings after L10N review. 2019-04-22 16:05:32 -04:00
Sebastian Kaspari
feffcaa2b1 [components] Closes https://github.com/mozilla-mobile/android-components/issues/2771: Only clear Session.searchTerms after request initiated by the user. 2019-04-22 11:28:43 -04:00
Axel Hecht
1932da6b13 [components] Import strings from android-l10n
State: mozilla-l10n/android-l10n@3d40a22318
2019-04-16 19:10:28 +02:00
Sebastian Kaspari
a46127d2cc [components] Update ktlint to 0.31.0. 2019-04-15 12:30:52 -04:00
Axel Hecht
b2feda5856 [components] Import strings from android-l10n
Status: mozilla-l10n/android-l10n@55d144eb8e
2019-04-15 10:39:54 +02:00
Axel Hecht
bc83b84756 [components] Import l10n from android-l10n
State: mozilla-l10n/android-l10n@932938a1ca
2019-04-05 10:44:34 +02:00
Axel Hecht
5ba3493451 [components] Import l10n from android-l10n
State: mozilla-l10n/android-l10n@7724298c8c
2019-04-04 10:56:14 +02:00
Sebastian Kaspari
a1aa6eb4b3 [components] Issue https://github.com/mozilla-mobile/android-components/issues/2571: Add option to recover from crashed sessions. 2019-04-01 20:12:25 +02:00
Stas Parshin
77447f27a2 [components] Issue https://github.com/mozilla-mobile/android-components/issues/2346: Fix Kotlin compiler warnings in browser-engine-system. 2019-03-25 13:14:55 +01:00
Axel Hecht
5c24536313 [components] Import localizations from mozilla-l10n/android-l10n 2019-03-22 16:06:44 +01:00
Arturo Mejia
65c64cc989 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1382: Add implementation for capture thumbnail of websites
on GeckoEngineView.
2019-03-13 10:33:47 -04:00
Arturo Mejia
509556dee9 [components] Moving captureThumbnail from EngineSession to EngineView. 2019-03-13 10:33:47 -04:00
Simon Chae
5ed63f3cb8 [components] Closes https://github.com/mozilla-mobile/android-components/issues/2210: Allow setting custom webview instance 2019-02-27 16:58:29 -05:00
Sebastian Kaspari
c5c482eb26 [components] Update Robolectric to 4.2. 2019-02-20 19:20:42 -05:00
Arturo Mejia
c9b6d63781 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1814: Adding support for onJsConfirm dialogs in SystemEngine 2019-02-15 13:16:48 +01:00
Arturo Mejia
a3bf4c2287 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1815: Adding support for JavaScript prompts on SystemEngineView. 2019-02-06 13:33:24 -05:00
Christian Sadilek
1f554cafe5 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1944: Remove unneeded default arg of initWebView 2019-02-04 18:29:13 -05:00
Sebastian Kaspari
6f8df584a2 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1915: Memory leak caused by long-lived WebView instance
Co-authored-by: Sebastian Kaspari <s.kaspari@googlemail.com>
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>

- The WebView instance is long-lived, as it's referenced in
SystemEngineSession, and we want to be able to keep engine
sessions around for the lifespan of the application.

- The WebView instance is created by the engine and using its
context (the application context).

- The EngineView, rendering engine sessions and WebViews,
is created using an activity context.

- The problem was that when the activity and EngineView were
destroyed, the WebView was not being detached and still
referenced the parent which referenced the activity context,
which would then not get gc'ed.

- We now detach the WebView when the EngineView is destroyed
and only destroy the WebView when the session is closed.

- This will allow re-using of engine sessions and their
WebViews in different activities and allow for proper
destruction.
2019-02-04 18:29:13 -05:00
Christian Sadilek
c369af6e2a [components] Issue https://github.com/mozilla-mobile/android-components/issues/1865: Fixes to upgrade to Kotlin 1.3.20 2019-01-28 18:41:13 +01:00
Arturo Mejia
b12ceb3930 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1816: Disable not implemented js prompts in SystemEngine. 2019-01-24 12:17:39 +01:00
Christian Sadilek
3d2ba10d9e [components] Closes https://github.com/mozilla-mobile/android-components/issues/1714: Support enabling tracking protection for session type 2019-01-16 13:26:32 -05:00
Arturo Mejia
d65452df54 [components] Refactoring PromptsFeature 2019-01-16 10:32:29 -05:00
Christian Sadilek
7b657c5e35 [components] Issue 1195: Remove webview if EngineView instance is reused 2019-01-09 16:44:01 -05:00
Arturo Mejia
ce63764f54 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1504: Add support for alert popup in WebView. 2019-01-08 13:39:42 -05:00
Christian Sadilek
9608430ed5 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1195: Move WebView reference to SystemEngineSession 2019-01-08 10:22:37 +01:00
Jonathan Almeida
32271e9935 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1629: System - Notify observers when desktop mode changes 2018-12-31 11:16:07 -05:00
Arturo Mejia
8cc1e37488 [components] Closes https://github.com/mozilla-mobile/android-components/issues/496: Adding support for html input types file for SystemEngine. 2018-12-24 12:45:30 -05:00
Sebastian Kaspari
af3cbeafb0 [components] Issue https://github.com/mozilla-mobile/android-components/issues/1396: CustomTabsService: Implement mayLaunchUrl() 2018-12-20 13:42:53 +01:00
Sebastian Kaspari
7647c16b8f [components] Refactor EngineSessionHolder to keep a reference to an EngineSession or EngineSessionState.
The main change here is that EngineSessionHolder can now hold an EngineState and this state
is used when we need to create an EngineSession (which will clear the state). This has the
following advantages:

* When restoring we can just attach the EngineState and do not need to create the
  EngineSession immediately. With that we do not load all the EngineSessions and everything
  at once. Initially only the selected EngineSession will be created and loaded. That will
  make the restore faster and use less resources when restoring a lot of sessions.

* (Not in this commit, for a follow-up) It allows us to close EngineSession instances and
  just keep the EngineState around until we need the EngineSession again. That's something
  we could do in low memory situations or when there are just too many sessions/tabs open
  to be performant (e.g. only keep the last recently used EngineSession instances around).
2018-12-19 11:30:07 +01:00
Grisha Kruglov
eff111ae9d [components] Closes https://github.com/mozilla-mobile/android-components/issues/1552: Set HistoryTrackingDelegate instance directly on engine's defaultSettings
This patch simplifies how the history tracking delegate is set, and removes unnecessary
complexity around the history tracking feature.

It's important to set the delegate before the first engine session instance is created.
There are multiple points in time when that might happen:
- if we have a SessionSnapshot, we'll restore early on and create bunch of engine sessions
- we'll may create a 'default' engine session via one of the multiple use cases which use
SessionManager
- we may create an engine session at any other point in time, as soon as we have an engine
instance, by manually invoking 'createSession' method.

In short, applications aren't constrained in how they create sessions, and various components
may create sessions at different points in time, depending on their lifecycles, how things
are configured to behave, etc.

If we want to guarantee that our engine sessions always have a history tracking delegate instance
set, simply setting it on the 'defaultSettings' object guarantees that in the most straightforward way.

This also makes problems around lazy initialization of HistoryTrackingFeature irrelevant, since that
feature is now gone.

This patch removes the feature-storage, since the only thing it contained was a delegate implementation.
2018-12-14 11:31:55 -05:00
Lina Cambridge
c4a70391a2 [components] Wire up the history tracking delegate for GeckoView Nightly. 2018-11-30 11:17:36 +01:00
Christian Sadilek
d544a4c854 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1430: Crash caused by saveState on non-UI thread 2018-11-29 09:53:59 +01:00
Christian Sadilek
5f9ebdbebe [components] Closes https://github.com/mozilla-mobile/android-components/issues/1067: Add support for opening/closing windows 2018-11-28 12:20:21 -05:00
Christian Sadilek
9bec09229f [components] Closes https://github.com/mozilla-mobile/android-components/issues/1452: Expose setting to control multiple window support 2018-11-28 12:20:21 -05:00
Alessio Placitelli
8e0568cd3c [components] Closes https://github.com/mozilla-mobile/android-components/issues/1176: Use Robolectric 4.0.2. 2018-11-27 17:16:55 +01:00
Jonathan Almeida
f782083016 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1311: notify observers of navigation change sooner 2018-11-26 16:15:22 +01:00
Arturo Mejia
2ba2c5b4eb [components] Closes https://github.com/mozilla-mobile/android-components/issues/1339: Add scroll behavior support for full screen pages on SystemEngineView. 2018-11-20 10:35:40 -05:00
Sebastian Kaspari
4fcc11ef9b [components] Issue https://github.com/mozilla-mobile/android-components/issues/404: Build with and target SDK 28 (+ update support libraries)
* Build with and target SDK 28.
* Use Robolectric 4.0-alpha-3.
* Update support libraries to 28.0.0.
* .travis.yml: Update platform version.
2018-11-15 18:12:42 +01:00
Christian Sadilek
da071e5cc0 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1252: Webfont blocking is controlled by both policy and setting 2018-11-12 14:41:21 +01:00
Christian Sadilek
e34c22f81b [components] Closes https://github.com/mozilla-mobile/android-components/issues/1305: Upgrade to Kotlin 1.3.0 and Coroutines 1.0.1 2018-11-09 09:26:47 +01:00
Christian Sadilek
e7bc2e35b3 [components] Closes https://github.com/mozilla-mobile/android-components/issues/1157: Add API for permission requests 2018-11-08 20:01:26 +01:00
Grisha Kruglov
782980355f [components] Stop using deprecated versions of async, launch, etc
This switching to using explicit CoroutineScopes and Dispatchers,
trying to inherit context when appropriate.
2018-11-07 13:04:17 -08:00
Grisha Kruglov
1d92f12ebc [components] Switch HistoryStorage to use Deferred results and suspend functions
Underlying HistoryStorage implementations might be blocking on IO (Rust Places, room),
or migth be non-blocking (in-memory). A Deferred return type for get* methods makes
it convenient to wrap both regular and `async` operations. Use of 'suspend' functions
serves the same role for write* methods.

This change makes it obvious at the engine call-site that the underlying implementation
might suspend, at which point we can wrap calls in `runBlocking` or use another coroutine builder.
2018-11-05 17:27:42 -08:00
Arturo Mejia
0cc70eea7d [components] Closes https://github.com/mozilla-mobile/android-components/issues/1205: Adding support for using SystemEngineView and
GeckoEngineView in a CoordinatorLayout
2018-11-05 14:06:51 +01:00
Grisha Kruglov
2d8134bcc9 [components] Add an in-memory implementation of concept-storage 2018-10-26 15:42:19 -07:00
Grisha Kruglov
3898dbaba9 [components] Allow setting of historyTrackingDelegate on an Engine instance 2018-10-26 15:42:19 -07:00
Sebastian Kaspari
1081ba153f [components] Closes https://github.com/mozilla-mobile/android-components/issues/1128: browser-engine-system: Automatically grant playing protected media (EME APIs).
This is a workaround for Firefox for Fire TV to play DRM content automatically.

Eventually we want to implement this API in a way that the app (or another component) can
handle those requests. See: https://github.com/mozilla-mobile/android-components/issues/1157
2018-10-25 14:08:03 +02:00
Christian Sadilek
1b4d44c35e [components] Closes https://github.com/mozilla-mobile/android-components/issues/1106: Enhance RequestInterceptor to load alternative URL 2018-10-25 10:11:23 +02:00
Vadim Semenov
553da63663 [components] Fix typo in documentation 2018-10-24 11:52:48 +02:00
Vadim Semenov
0af6566645 [components] Wrap if-statements in curly brackets 2018-10-24 11:52:48 +02:00
Sebastian Kaspari
95defb3a55 [components] Fix new detekt findings (ObjectPropertyNaming). 2018-10-24 10:21:48 +02:00
Grisha Kruglov
3302d3917a [components] Engine history delegate API
The goal is to provide our engines with ability to query for browser history
and to record visits and page metadata updates (e.g. title changes).

GeckoView's APIs are still being implemented in https://bugzilla.mozilla.org/show_bug.cgi?id=1494713,
so this works from the implementation notes. WebView's APIs are well known.

History delegate is optional. Absence of it in settings when configuring an engine as akin to
disabling history tracking.

This patch explicitly doesn't provide an implementation of a delegate.
2018-10-17 13:50:13 -07:00
Renan Barros
db8ac6893e [components] closes issue https://github.com/mozilla-mobile/android-components/issues/1017 2018-10-17 11:10:47 +08:00
Marco
6e4f04af78 [components] Closes https://github.com/mozilla-mobile/android-components/issues/47: Remove test prefix from method names 2018-10-10 15:59:39 -04:00
Jonathan Almeida
7c078e2350 [components] Chore: Change "mosac" references to "mozac" 2018-10-10 18:19:06 +02:00
Grisha Kruglov
e9b97902cb [components] Minor cleanup: unused variable, deprecated system webview setting calls 2018-10-09 16:00:22 -04:00
Christian Sadilek
229873e8d3 [components] Closes https://github.com/mozilla-mobile/android-components/issues/997: SystemEngine fails to initialize with Robolectric 2018-10-09 16:32:33 +02:00
Jonathan Almeida
632243c964 [components] Closes https://github.com/mozilla-mobile/android-components/issues/923: SystemEngineSession.exitFullScreenMode() is a no-op
This was an error where we weren't calling the WebView's fullscreen view
callback in the EngineSession#exitFullScreenMode.
2018-10-09 15:07:18 +02:00
Jonathan Almeida
b3dc0d1980 [components] Closes https://github.com/mozilla-mobile/android-components/issues/881: Error Page support for both engines
I decided to move the mappings to the respective EngineSession instead
of having them in the Engine, since it wasn't possible to have them
easily accessible from there via the RequestInterceptor. It made more
sense to keep them hidden inside the session as a companion function for
easier testing.

On the same note, tests have also been included.

Added an interceptor the SystemEngine sample app.

Cleaned up the styling of the actual error page HTML to make them more
mobile friendly.
2018-10-05 16:27:28 +02:00
Manuel Martin
7826c54bdc [components] Added support for GeckoView error pages 2018-10-05 16:27:28 +02:00
Christian Sadilek
2f19198bd2 [components] Closes https://github.com/mozilla-mobile/android-components/issues/947: Provide API to enable/disable URL matching categories 2018-10-05 11:30:10 +02:00
Christian Sadilek
8b067d508d [components] Closes https://github.com/mozilla-mobile/android-components/issues/899: Provide access to default WebView user agent 2018-10-02 12:37:49 +02:00
Christian Sadilek
f165a254cd [components] Closes https://github.com/mozilla-mobile/android-components/issues/854: Add setting to enable remote debugging 2018-10-02 12:37:49 +02:00
Sebastian Kaspari
868cd517bf [components] Closes https://github.com/mozilla-mobile/android-components/issues/874: browser-engine-system: Rename strings file.
Background: We are going to reserve the name "strings.xml" for translatable strings. This avoids that
our L10N tools need to be able to parse and process all kinds of resources that are not strings.
2018-09-27 18:07:07 +02:00
Severin Rudie
310b647d5c [components] Fixes https://github.com/mozilla-mobile/android-components/issues/883: Fixes NPE in SystemEngineSession#captureThumbnail 2018-09-27 11:35:34 +02:00
Jonathan Almeida
b8bcdaf2cd [components] Issue https://github.com/mozilla-mobile/android-components/issues/865: Add optional url to ssl error handling
Also increased code coverage in tests.
2018-09-26 20:53:08 +02:00
Jonathan Almeida
dface57afd [components] Closes https://github.com/mozilla-mobile/android-components/issues/865: Add ErrorResult for RequestInterceptor
If we want to load an error page, we can return it to the interceptor,
along with a custom URL to show on the screen.

Tests for the GeckoView implementation will follow up. This change
should unblock SystemEngine clients for now.
2018-09-26 19:31:03 +02:00
Jonathan Almeida
58815aaa96 [components] Closes https://github.com/mozilla-mobile/android-components/issues/828: Fullscreen mode doesn't use entire screen
When we add the fullscreen view into the FrameLayout, we were taking the
original WebView and hiding it with View.GONE which doesn't take up any
layout space. View.INVISIBLE doesn't show the view, but continues to
use the space that it would if it did exist (drawing in the background).

For websites like YouTube and BBC.com/ideas, the video provided to us
was of a smaller size and resolution so it didn't take the fullscreen
and ended up shrinking to it's original size view size. 🤦
2018-09-26 14:10:25 +02:00
Christian Sadilek
0f5ebbb279 [components] Closes https://github.com/mozilla-mobile/android-components/issues/863: URISyntaxException: Expected scheme-specific part at index 2018-09-26 13:50:09 +02:00
Arturo Mejia
a4c1e8c218 [components] Closes https://github.com/mozilla-mobile/android-components/issues/825: Session.url is not updated until page has nearly finished
loading
2018-09-26 10:21:51 +02:00
Arturo Mejia
5bc1ca7173 [components] Closes https://github.com/mozilla-mobile/android-components/issues/495: Provide thumbnail of websites
* Adding captureThumbnail to EngineSession

* Updating TabViewHolder to add thumbnail

* Adding thumbnail to Session

* Adding a new product flavor for systemEngine
2018-09-20 12:51:00 -04:00
Christian Sadilek
5ed6c62799 [components] Closes https://github.com/mozilla-mobile/android-components/issues/688: Extend engine settings for WebView 2018-09-20 12:01:41 -04:00
Jonathan Almeida
c430d8d8fe [components] Closes https://github.com/mozilla-mobile/android-components/issues/718: Extend RequestInterceptor to support error pages 2018-09-12 20:55:04 -04:00
Christian Sadilek
742a0d2011 [components] Closes https://github.com/mozilla-mobile/android-components/issues/750: UrlMatcher incorrectly uses Java 8 Map.forEach 2018-09-11 18:26:11 -04:00
Jonathan Almeida
4e44d0c890 [components] Closes https://github.com/mozilla-mobile/android-components/issues/728: Invoke onNavigationStateChange sooner
We're only waiting until the page is fully loaded until we call
onNavigationStateChange, which causes the UI components to seem slow.

Now, we make the call when we receive a title from the SystemEngine.
2018-09-11 17:30:49 -04:00
Jonathan Almeida
da6f4a83e2 [components] Closes https://github.com/mozilla-mobile/android-components/issues/644: Clear Data (WebView only)
This only includes the implementation for the SystemWebView that's based
off of what we currently do in Focus/Fire TV. Since this is needed for
those apps now, we can work with this implementation until GeckoView
provides us with a nicer API to do the equivalent for it. (Bug 1489669)

We also don't notify any observers since there isn't any
confirmation/information available that we can propagate to cients.
2018-09-11 16:30:30 -04:00
Christian Sadilek
d5265f0a46 [components] Closes https://github.com/mozilla-mobile/android-components/issues/742: Settings may cause WebView method call on wrong thread 2018-09-11 15:32:17 -04:00
Jonathan Almeida
69563c770e [components] Closes https://github.com/mozilla-mobile/android-components/issues/643: FullScreen mode support 2018-09-11 14:37:57 -04:00
Arturo Mejia
8ced4b7828 [components] Closes https://github.com/mozilla-mobile/android-components/issues/701: Exposing browser-session Desktop mode
* Adding desktopMode property to Session

* Adding onDesktopModeChanged in Session

* Renaming RequestDesktopSite to RequestDesktopSiteUseCase to follow
  the convention

* Implementing onDesktopModeChange in EngineObserver

Renaming:

On EngineSession.Observer
    from onDesktopModeEnabled to onDesktopModeChange
    from setDesktopMode to toggleDesktopMode

On Session
    from onDesktopModeEnabledChanged to onDesktopModeChanged
2018-09-06 18:17:44 -04:00
Christian Sadilek
f992f8aef9 [components] Closes https://github.com/mozilla-mobile/android-components/issues/689: Add setting for blocking web fonts 2018-09-05 16:25:01 +02:00
Sebastian Kaspari
8196bec4e3 [components] Issue https://github.com/mozilla-mobile/android-components/issues/696: browser-engine-system: Clear "X-Requested-With" header when loading URLs. 2018-09-04 16:58:11 +02:00
Christian Sadilek
2d6335c65a [components] Closes https://github.com/mozilla-mobile/android-components/issues/657: Forward lifecycle events to EngineView 2018-09-03 14:51:26 -04:00
Christian Sadilek
25d2dfc396 [components] Closes https://github.com/mozilla-mobile/android-components/issues/656: Add find in page functionality to engine/session 2018-08-30 14:06:39 -04:00
Sebastian Kaspari
d7a0e0d65a [components] Issue https://github.com/mozilla-mobile/android-components/issues/673: Engine: Allow consumers to intercept requests and inject content. 2018-08-30 16:49:05 +02:00
Jonathan Almeida
be422f354a [components] Issue https://github.com/mozilla-mobile/android-components/issues/647: Desktop mode support
Closes https://github.com/mozilla-mobile/android-components/issues/647
2018-08-29 11:36:07 -04:00
Christian Sadilek
1988de71e0 [components] Closes https://github.com/mozilla-mobile/android-components/issues/662: Provide API to set engine/session defaults 2018-08-28 18:13:34 -04:00
Jonathan Almeida
2ff709d589 [components] Issue https://github.com/mozilla-mobile/android-components/issues/476: Add long press support as observable
Fixes https://github.com/mozilla-mobile/android-components/issues/476
2018-08-27 13:44:11 -04:00
Christian Sadilek
85e4d8ab77 [components] Issue https://github.com/mozilla-mobile/android-components/issues/521: Add support for modifying engine session settings 2018-08-24 10:53:14 -04:00
Christian Sadilek
536775b259 [components] Issue https://github.com/mozilla-mobile/android-components/issues/499: Support private browsing mode 2018-08-23 18:36:28 +02:00
Christian Sadilek
f24db14b77 [components] Issue https://github.com/mozilla-mobile/android-components/issues/508: Move URL matching functionality to system engine 2018-08-21 12:30:56 -04:00
Christian Sadilek
80a7b5da03 [components] Issue https://github.com/mozilla-mobile/android-components/issues/508: Implement tracking protection in SystemEngine 2018-08-21 12:30:56 -04:00
Jonathan Almeida
7086b9c595 [components] Issue https://github.com/mozilla-mobile/android-components/issues/605: Include base64 support + review comments 2018-08-17 17:59:00 -04:00
Jonathan Almeida
3210ec6f11 [components] Closes https://github.com/mozilla-mobile/android-components/issues/605: Add loadData to Engine 2018-08-17 17:59:00 -04:00
Jonathan Almeida
0ab0fbe341 [components] Issue https://github.com/mozilla-mobile/android-components/issues/604: Add Engine ability to stop loading
Adds the ability to stop loading a session that would have already
started.

Some considerations were made about whether
`EngineSession.Observer#onLoaingStateChanged` should be called. In our
current `SystemEngine` and `GeckoEngine` there isn't any explicit
callback for handling a stop loading event so there wouldn't be any way
to do this.
2018-08-14 22:24:35 -04:00
Sebastian Kaspari
ddd3809922 [components] Issue https://github.com/mozilla-mobile/android-components/issues/431: Receive website title from engine implementations and update Session. 2018-07-24 15:42:46 +02:00
Sebastian Kaspari
831fdbfa8f [components] Issue https://github.com/mozilla-mobile/android-components/issues/424: Expose Downloads in Engine component and make them consumable from a Session. 2018-07-18 18:48:02 +02:00
Christian Sadilek
d724c95ec0 [components] Closes https://github.com/mozilla-mobile/android-components/issues/334: Storage should not restore state from different engine 2018-06-26 13:51:54 -04:00
Christian Sadilek
c98f32cbdc [components] Issue https://github.com/mozilla-mobile/android-components/issues/248: Save/Restore engine session state 2018-06-06 12:25:03 -04:00
Christian Sadilek
d9bad1a75a [components] Closes https://github.com/mozilla-mobile/android-components/issues/216: Add SSL info to session 2018-05-30 12:20:33 -04:00
Christian Sadilek
79aa746f7b [components] Closes https://github.com/mozilla-mobile/android-components/issues/176: Add use case for reloading 2018-05-17 14:39:49 -04:00
Christian Sadilek
da9fa6ee06 [components] Issue https://github.com/mozilla-mobile/android-components/issues/93: Add use cases for back/forward navigation 2018-04-25 13:10:11 -04:00
Christian Sadilek
ae78b1dbd2 [components] Issue https://github.com/mozilla-mobile/android-components/issues/93: Make navigation state (canGoBack/canGoForward) observable 2018-04-25 12:32:48 -04:00
Christian Sadilek
bc431772da [components] Issue https://github.com/mozilla-mobile/android-components/issues/91: Make loading progress available and observable 2018-04-23 15:09:06 -04:00
Sebastian Kaspari
50392be7e0 [components] Issue https://github.com/mozilla-mobile/android-components/issues/60: Use consistent package names for code and in manifests. 2018-04-13 18:01:54 -04:00
Sebastian Kaspari
abf84c1216 [components] Issue https://github.com/mozilla-mobile/android-components/issues/49: Update package name of feature-toolbar and browser-engine-system modules. 2018-04-13 17:28:57 +02:00
Sebastian Kaspari
958da9a010 [components] Issue https://github.com/mozilla-mobile/android-components/issues/49: Rename package of browser-engine-gecko module to mozilla.components.engine.gecko. 2018-04-13 17:28:57 +02:00
Sebastian Kaspari
e992d4abf6 [components] Issue https://github.com/mozilla-mobile/android-components/issues/49: Updatesystem-engine module to implement concept-engine interfaces. 2018-04-13 17:28:57 +02:00
Sebastian Kaspari
4371ded289 [components] Issue https://github.com/mozilla-mobile/android-components/issues/49: New module engine-system: Engine implementation based on the system's WebView. 2018-04-13 17:28:57 +02:00