Commit Graph

73 Commits

Author SHA1 Message Date
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
53b3d1a71f [components] Update repository information in README files. 2018-10-25 15:37:46 +02: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
Sebastian Kaspari
9e17b84339 [components] Simplify build configuration. 2018-10-24 10:21:12 +02:00
Johan Lorenzo
0ca864a1bf [components] Stop Bintray. Update {group,artifact}Ids. Remove massage task 2018-10-22 14:35:51 +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
Wajahat Karim
ed0729232c [components] Closes https://github.com/mozilla-mobile/android-components/issues/922: Update READMEs to point to maven.mozilla.org and use new artifact names. 2018-10-03 09:20:43 +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
Sebastian Kaspari
38a9e260d4 [components] Issue https://github.com/mozilla-mobile/android-components/issues/679: Add first iteration of documentation for engine components. 2018-09-07 18:23:32 +02: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