Commit Graph
271 Commits
Author SHA1 Message Date
Ryan VanderMeulen 9dc4c4933a Backed out changeset 16f21b8add66 (bug 1367069) for about:home bustage. 2017-09-28 12:16:20 -04:00
Jim Chen 0ba2056c24 Bug 1396951 - 4. Pass in GeckoView instance when sending a11y event; r=snorp
Pass in a `GeckoView` instance when sending a11y events so we're not
dependent on `GeckoAppShell.getLayerView()`. However, there's likely
more work to be done to make a11y work for any GeckoView.

MozReview-Commit-ID: DBeDOX5c3qY
2017-09-22 14:35:23 -04:00
Sebastian Hengst 20866f0d0f Backed out changeset e9bc6e08091b (bug 1396951)
MozReview-Commit-ID: 1vPPNL6uovN
2017-09-22 11:48:30 +02:00
Jim Chen 0d7df73804 Bug 1396951 - 4. Pass in GeckoView instance when sending a11y event; r=snorp
Pass in a `GeckoView` instance when sending a11y events so we're not
dependent on `GeckoAppShell.getLayerView()`. However, there's likely
more work to be done to make a11y work for any GeckoView.

MozReview-Commit-ID: DBeDOX5c3qY
2017-09-21 17:36:07 -04:00
Jan Henning 6ef225fc7c Bug 1401279 - Ensure that the menu itself is initialised as well when returning the menu panel. r=nechen
MozReview-Commit-ID: 9FI7ebPJ16a
2017-09-19 21:45:58 +02:00
friedger a772a50297 Bug 1367069 - "New tab" in the search widget doesn't open a custom homepage even when "Also use for new tabs" is set r=maliu
add check for external url in onNewIntent, use Tab.addTabs() for no url or about:home

MozReview-Commit-ID: AX5pj52lC8i
2017-06-08 13:31:05 +02:00
Jim Chen 948efaa0b5 Bug 1367079 - 2. Move Share:Text listener to GeckoApplication; r=snorp
Move the "Share:Text" event listener from GeckoApp to GeckoApplication,
so ActionBarHandler.js can use it for the Share action from any window.

MozReview-Commit-ID: 8w1llJy4pwy
2017-09-14 17:50:58 -04:00
Jim Chen ac6788618c Bug 1367079 - 1. Update TextSelection implementations for GeckoView; r=snorp
Make TextSelection implementations not depend on GeckoApp. Instead, make
them use GeckoView's EventDispatcher directly for communicating with
Gecko.

MozReview-Commit-ID: EygAt3D9HMI
2017-09-14 17:50:58 -04:00
Jim Chen 72191f0c41 Bug 1398409 - 2. Use event callback to communicate FormAssistPopup actions; r=sebastian
Use event callbacks instead of separate events to deliver
FormAssistPopup replies back to FormAssistant. This lets us better
handle having multiple FormAssistPopup instances across Fennec, custom
tabs, and PWAs.

FormAssistant._currentInputElement is removed because it does not allow
us to have multiple concurrent popups. Instead, we track the current
element through the event callback closure.
FormAssistant._currentInputValue is also removed for similar reasons,
and I don't think it was really necessary.

MozReview-Commit-ID: DdeMBGCxDou
2017-09-14 17:50:57 -04:00
Jan Henning 94c01e5fca Bug 1398599 - Use default network access StrictMode policy on developer builds, too. r=snorp
Our user-facing builds crash if we manage to slip in some main thread network access by mistake (which is the default Android StrictMode policy since Honeycomb), so our developer builds shouldn't be more forgiving here.

MozReview-Commit-ID: 6bZwwwrSb3q
2017-09-12 22:07:14 +02:00
Michael Comella 830480e8b4 Bug 1391413: Add comment clarifying use of PREFS_IS_FIRST_RUN. r=sebastian
MozReview-Commit-ID: 465V6Q8Ig1D
2017-09-07 17:11:16 -07:00
Jan Henning 5abee4f830 Bug 1396292 - Part 2 - Explicitly run permissions callback on background thread where applicable. r=sebastian
Currently, this only concerns setImageAs, where not running on the UI thread after a permissions prompt triggers a network-related strict mode violation and interestingly enough results in a crash (as opposed to a logcat complaint) on release builds.

There's also a permissions check in the UpdateService which runs on a (but not *the*) background thread, but since we don't prompt in that case there's no action necessary.

MozReview-Commit-ID: KKxW96AyDWH
2017-09-02 21:55:40 +02:00
Jan Henning 2de6c25fbb Bug 1396292 - Part 0 - Clean up imports. r=JanH
MozReview-Commit-ID: 12CjJ2zZ2Qr
2017-09-02 21:44:55 +02:00
Jim Chen c65b21747c Bug 1393128 - 2. Support showing Snackbars globally; r=sebastian
Right now we have two Snackbar handlers in GeckoApp and
GeckoPreferences, respectively. This patch combines the two handlers
into one inside GeckoApplication, and lets us display Snackbars in other
Activities like custom tabs and PWA.

MozReview-Commit-ID: Iu6p2VNnVVC
2017-08-28 23:56:43 -04:00
Jim Chen 20aafbe443 Bug 1393128 - 1. Make IntentHelper available globally; r=nechen,sebastian
Instead of initializing IntentHelper in GeckoApp, initialize it in
GeckoApplication, and make it available globally. This will let custom
tabs / PWA use IntentHelper-provided services.

MozReview-Commit-ID: Icedph6KG4u
2017-08-28 23:56:43 -04:00
Nevin Chen 5f68b6864b Bug 1356596 - Add warning when entering full screen mode. r=sebastian
MozReview-Commit-ID: 2QZFylS2Ry3
2017-08-24 08:39:19 -04:00
Jim Chen 8fa323d837 Bug 1388724 - 5. Make RuntimePermissions not depend on GeckoApp; r=sebastian
Move the check permission event from `GeckoApp` to `GeckoApplication`,
and use the current activity if possible, so that we can use
`RuntimePermissions` in custom tabs and PWA. Also implement
`onRequestPermissionsResult` for custom tabs and PWA, in order to
forward the result back to `RuntimePermissions`.

MozReview-Commit-ID: Bg4BoXAUCz6
2017-08-18 14:27:31 -04:00
Jim Chen c420129c06 Bug 1388724 - 1. Support non-GeckoApp context in DoorHangerPopup; r=nechen
Make DoorHangerPopup support being used from non-GeckoApp contexts, so
we can reuse it from custom tabs and PWA.

MozReview-Commit-ID: BedxR92G7Vj
2017-08-18 14:27:30 -04:00
James Willcox 8692a70cf1 Bug 1381916 - Remove frontend support for plugins in Fennec r=nechen
MozReview-Commit-ID: Gkqe8Y5AMPV
2017-07-31 12:25:16 -05:00
friedger e634ebc091 Bug 1366993 - With "Don't keep activities" on, search activity's 'New tab' doesn't work r=maliu
add handling of about:home in intent.data  explicitly.

MozReview-Commit-ID: D46VVQaR0Z1
2017-06-08 15:12:10 +02:00
Jan Henning 4f75315ab4 Bug 1378253 - Request necessary permissions to "Set Image" from context menu. r=sebastian
We temporarily insert the image in question into the MediaStore in order to display the corresponding chooser, which requires the WRITE_EXTERNAL_STORAGE permission.

MozReview-Commit-ID: FAf9tE5h3c8
2017-07-13 20:55:10 +02:00
Jan Henning 5e72a2ed31 Bug 1366098 - Part 1 - Remove Fennec tab type infrastructure. r=walkingice
The new, preferred solution for displaying additional web content outside of our normal tab infrastructure and UI is to use a separate GeckoView instance. Therefore, the support for different having additional "tab" types that aren't displayed in the normal UI, as well as for multiple GeckoApp instances displaying different tabs is no longer needed and can be removed.

MozReview-Commit-ID: FNx0gJIKybr
2017-06-27 14:13:40 -07:00
Eugen Sawin 7f54493527 Bug 1368701 - [3.0] Guard shutdown intent action via Gecko pref on Fennec. r=snorp,bc 2017-07-06 19:20:43 +02:00
Eugen Sawin b65b184c69 Bug 1368701 - [1.2] Add shutdown intent action to shutdown Fennec. r=snorp,bc 2017-07-06 19:20:43 +02:00
Nevin Chen 272ed1a7e9 Bug 1375931 - Align event name format r=nechen
MozReview-Commit-ID: 2Af1z7dYnsC
2017-06-28 18:23:47 -07:00
Dylan Roeh 3c40b42348 Bug 1365599 - Make Tabs use the window event dispatcher rather than global in some instances. r=jchen 2017-06-16 13:40:48 -05:00
maliu a47c9a5638 Bug 1369281 - Simplify Locale setting string without variant/script which is from Locale.toString(), r=nechen
MozReview-Commit-ID: CKdYTkHn9Z9
2017-06-08 18:17:27 +08:00
Jim Chen 19937ab159 Bug 1369107 - 4. Remove GeckoAppShell.ContextGetter; r=snorp
Remove ContextGetter and all implementations now that it's no longer
being used.

MozReview-Commit-ID: G5jWFsQPfWw
2017-06-02 16:13:42 -04:00
Jim Chen a6d0008c10 Bug 1369107 - 3. Don't use GeckoAppShell.getContext for plugin code; r=snorp
Use getApplicationContext or GeckoApp.getPluginContext instead of
getContext so we can get rid of ContextGetter.

MozReview-Commit-ID: B8tTPeZ5gvt
2017-06-02 16:13:41 -04:00
Jim Chen 8820665a21 Bug 1367081 - Make PromptService usable from GeckoView custom tabs; r=droeh
Make PromptService and Prompt.jsm not depend as much on BrowserApp and
the main Fennec window, so it can be used from a GeckoView-based custom
tabs Activity. This approach is used because it involves a lot less work
than trying to implement a PromptDelegate for Fennec.

MozReview-Commit-ID: AEH0HgAOx2S
2017-06-01 15:07:16 -04:00
Dylan Roeh 11f96ed230 Bug 1369393 - Backout GV-based custom tabs, PWAs, and Tabs.java changes. r=me 2017-06-01 09:28:31 -05:00
Dylan Roeh 2c114d0964 Bug 1365599 - Make Tabs use the window event dispatcher rather than global in some instances. r=jchen 2017-05-31 16:58:54 -05:00
Jan Henning fd349c8e74 Bug 1367851 - Use ComponentCallbacks to listen for low memory notifications. r=ahunt
At the moment, we forward these from GeckoActivity, which means that they won't work if no GeckoActivity-based activity is active (can happen within our settings for example).

As of API14, we can now register an app-wide ComponentCallbacks(2) class, allowing us to easily receive low memory notifications no matter which activity is currently alive.

MozReview-Commit-ID: 5GjSjsTKxAD
2017-05-25 21:22:24 +02:00
Nevin Chen a110ffbac7 Bug 1361664 - Part2. Create MVP Triggers and Deeplinks for Mobile Marketing Automatin. r=maliu
This patch do 6 things. They are related so I put them in the same patch.
1. Extract MmaEvent Name
2. If MMA is diabled, don't send event.
3. Add check before sending 'Set Default Borwser' deep link
4. Add user attribute for delay messaging focus install status.
5. If the user pref off at runtime, we ask Leanplum to stop and prevent our app sending event to Leanplum.
6. Fix proguard. Only keep necceary files.

MozReview-Commit-ID: APEmr1JXBLH
2017-05-17 01:25:45 +08:00
Sebastian Hengst 3b4b03d8fb Backed out changeset d289ee2c794d (bug 1361664)
MozReview-Commit-ID: gNRtEiyg7W
2017-05-27 14:00:27 +02:00
Nevin Chen 912e74135b Bug 1361664 - Part2. Create MVP Triggers and Deeplinks for Mobile Marketing Automatin. r=maliu
This patch do 5 things. They are related so I put them is the same patch.
1. Extract MmaEvent Name
2. If MMA is diabled, don't send event.
3. Add check before sending 'Set Default Borwser' deep link
4. Add user attribute for delay messaging focus install status.
5. If the user pref off at runtime, we ask Leanplum to stop and prevent our app sending event to Leanplum.

MozReview-Commit-ID: APEmr1JXBLH
2017-05-17 01:25:45 +08:00
Sebastian Hengst 4f36d5e85b Backed out changeset 59dc8710d768 (bug 1361664) 2017-05-26 13:40:51 +02:00
Nevin Chen 592593a928 Bug 1361664 - Part2. Create MVP Triggers and Deeplinks for Mobile Marketing Automatin. r=maliu
This patch do 5 things. They are related so I put them is the same patch.
1. Extract MmaEvent Name
2. If MMA is diabled, don't send event.
3. Add check before sending 'Set Default Borwser' deep link
4. Add user attribute for delay messaging focus install status.
5. If the user pref off at runtime, we ask Leanplum to stop and prevent our app sending event to Leanplum.

MozReview-Commit-ID: APEmr1JXBLH
2017-05-17 01:25:45 +08:00
Jim Chen 060691b2cd Bug 1365711 - Set GeckoInterface from GeckoApplication; r=snorp
Now that GeckoInterface only contains openUriExternal and
getHandlersFor* methods, we can set GeckoInterface from GeckoApplication
only, and not GeckoApp or GeckoView. This also lets us get rid of
BaseGeckoInterface.

MozReview-Commit-ID: KQloIO6ITlK
2017-05-25 18:33:30 -04:00
Jim Chen aa2ff09dec Bug 1363885 - 1. Remove GeckoAppShell.AppStateListener; r=droeh
Remove GeckoAppShell.AppStateListener and its associated methods in
GeckoInterface (orientation listener and app state listener methods).

MozReview-Commit-ID: 4BCrTysSEHZ
2017-05-25 18:33:30 -04:00
Jan Henning 965b3701a6 Bug 1346413 - Part 2 - Remove GeckoActivityMonitor onNewIntent handling. r=jchen
We no longer use the activity monitor for tab type activity switching (which could happen in response to onNewIntent, so in the original implementation the GAM's current activity had to be up-to-date at that point as well) and only track the current activity via onStop/onStart, so there's no longer any need to manually monitor onNewIntent.

MozReview-Commit-ID: AawXbII29qE
2017-05-23 21:00:07 +02:00
Jan Henning bcb0309ec6 Bug 1346413 - Part 0 - Remove unneeded imports. r=jchen
MozReview-Commit-ID: 4JwHRdI4JGy
2017-05-23 21:15:01 +02:00
Jan Henning a97852e746 Bug 869225 - Move decision whether to restore session or not onto background thread. r=sebastian
This involves accessing the file system to check whether our last session crashed or not (as well as reading some shared preferences), so moving this onto the background thread as well avoids some strict mode warnings.

With the exception of loadStartupTab(), mShouldRestore and mLastSessionCrashed are always accessed from the background thread. loadStartupTab() can potentially run on the main thread, however this is okay, because as far as I can see it is only called after the main and background thread have synchronised with each other during initialize().

mPrivateBrowsingSession in turn is now initially only accessed from the background thread for storing the data from the savedInstanceState and the passing it on to session restore. Afterwards, we pass through the synchronisation in initialize() and then all further accesses - receiving private tab data from Gecko and saving it during onSaveInstanceState - happen only on the main thread. Additionally, all data updates from Gecko will completely overwrite the previous state, so the initial value set during onCreate() will soon become irrelevant, anyway.

MozReview-Commit-ID: L5hMFCXLcIf
2017-05-11 22:19:18 +02:00
Jan Henning fcc41940fb Bug 1359531 - Part 8 - Handle tabs selected while all GeckoApps were in background. r=sebastian,walkingice
Activity switching is now handled by the currently active GeckoApp instance, which obviously doesn't work if all of them are currently backgrounded.

To fix this, we track for each tab whether its selection was handled by a foregrounded GeckoApp instance. If it wasn't, we catch up with any possibly necessary activity switches during the next resume.

MozReview-Commit-ID: JEjQUuDJw5Q
2017-05-05 21:07:29 +02:00
Jan Henning 9e8e1e752e Bug 1359531 - Part 7 - Don't ignore last selected tab for Intent.ACTION_MAIN. r=sebastian,walkingice
Normally, receiving a new intent means we want to switch tabs/open a new tab, so we need to turn off our "last selected tab in this activity" logic, however this is not true when we receive a simple Intent.ACTION_MAIN, e.g. when we're being brought into the foreground from a launcher icon (as opposed to the activity/task switcher).

MozReview-Commit-ID: ExiM3c8iaEA
2017-05-05 20:31:15 +02:00
Jan Henning a36b9a932d Bug 1359531 - Part 5 - Trigger activity switching from GeckoApp. r=sebastian,walkingice
To avoid the need for tracking the currently active activity, we just respond from the activity itself by using GeckoApp's tab event listener.

As replacement for the "closeTabNoActivitySwitch()" function, we set a flag on the activity instead before closing the tab.

MozReview-Commit-ID: LdmyJ5i10jZ
2017-04-29 15:20:19 +02:00
Jan Henning 720a80fe5f Bug 1359531 - Part 4 - Import Tab intent extra key definitions. r=sebastian,walkingice
MozReview-Commit-ID: DXZGscSpRtd
2017-04-28 22:58:51 +02:00
Jim Chen 4c6bfb07c5 Bug 1365485 - Remove GeckoInterface.getDefaultChromeURI; r=droeh
Add getChromeUri/setChromeUri APIs to GeckoView, to allow each
GeckoView's chrome URI to be set individually. This lets us remove
GeckoInterface.getDefaultChromeURI. This patch also changes the default
chrome URI to the GeckoView default, and let Fennec specify its chrome
URI (browser.xul) inside GeckoApp.

MozReview-Commit-ID: Gkwbp8VyLcu
2017-05-18 18:09:20 -04:00
Jim Chen b42c3eb58c Bug 1365360 - Remove GeckoInterface.setAccessibilityEnabled; r=snorp
Instead of calling GeckoInterface.setAccessibilityEnabled, let
GeckoAccessibility dispatch an "Accessibility:Enabled" event to let
BrowserApp know whether accessibility is enabled or not.

MozReview-Commit-ID: 9ntRP5Pc3lX
2017-05-18 18:09:20 -04:00
Jim Chen 338365274d Bug 1365127 - Move history accessors from GeckoAppShell to GlobalHistory; r=droeh
Move checkUriVisited, markUriVisited, and setUriTitle from
GeckoApp/GeckoAppShell to GlobalHistory. Make them static and directly
accessible from native code, so that we can remove those methods from
GeckoInterface.

MozReview-Commit-ID: JrmlfeKibaW
2017-05-18 18:09:16 -04:00