Commit Graph

289 Commits

Author SHA1 Message Date
Jim Chen
650ea22b30 Bug 1446729 - 2. Rename TextInputController to SessionTextInput; r=esawin
Following the naming scheme "SessionFoo" for GeckoSession sub-objects,
and "getFoo()" for getters of GeckoSession sub-objects, rename
TextInputController to SessionTextInput and getTextInputController() to
getTextInput().

MozReview-Commit-ID: 6GtgCjCLKhg
2018-03-18 05:38:55 -04:00
James Willcox
e51d3b14f0 Bug 1422137 - Rename NativePanZoomController to PanZoomController r=rbarker
MozReview-Commit-ID: DUdekq4OV2e
2018-03-22 12:39:53 -05:00
Eitan Isaacson
f2159927ab Bug 1184142 - Support WebSpeech in GeckoView. r=snorp r=smaug 2018-03-16 12:08:00 +02:00
Nicholas Nethercote
d911a57ece Bug 1438678 - Pass early prefs via shared memory instead of the command line. r=bobowen,jld,glandium.
This patch replaces the large -intPrefs/-boolPrefs/-stringPrefs flags with
a short-lived, anonymous, shared memory segment that is used to pass the early
prefs.

Removing the bloat from the command line is nice, but more important is the
fact that this will let us pass more prefs at content process start-up, which
will allow us to remove the early/late prefs split (bug 1436911).

Although this mechanism is only used for prefs, it's conceivable that it could
be used for other data that must be received very early by children, and for
which the command line isn't ideal.

Notable details:

- Much of the patch deals with the various platform-specific ways of passing
  handles/fds to children.

  - Linux and Mac: we use a fixed fd (8) in combination with the new
    GeckoChildProcessHost::AddFdToRemap() function (which ensures the child
    won't close the fd).

  - Android: like Linux and Mac, but the handles get passed via "parcels" and
    we use the new SetPrefsFd() function instead of the fixed fd.

  - Windows: there is no need to duplicate the handle because Windows handles
    are system-wide. But we do use the new
    GeckoChildProcessHost::AddHandleToShare() function to add it to the list of
    inheritable handles. We also ensure that list is processed on all paths
    (MOZ_SANDBOX with sandbox, MOZ_SANDBOX without sandbox, non-MOZ_SANDBOX) so
    that the handles are marked as inheritable. The handle is passed via the
    -prefsHandle flag.

  The -prefsLen flag is used on all platforms to indicate the size of the
  shared memory segment.

- The patch also moves the serialization/deserialization of the prefs in/out of
  the shared memory into libpref, which is a better spot for it. (This means
  Preferences::MustSendToContentProcesses() can be removed.)

MozReview-Commit-ID: 8fREEBiYFvc
2018-02-16 17:54:16 +11:00
Jim Chen
c394d91b71 Bug 1442250 - 5. Reset native queue early when transferring; r=esawin
When we reset the old native queue when transferring to another session,
perform the reset right after the transfer() call, instead of in
onTransfer(), which is too late for clearing stale pending calls.

Then, after transferring to a new queue, let Gecko call Window.onReady
to set the new queue's state if needed. That way the Java queue state is
consistent with the Gecko state.

MozReview-Commit-ID: CUXGrhR4FCD
2018-03-09 12:34:38 -05:00
Eugen Sawin
0478424983 Bug 1432235 - [1.2] Move GeckoView API classes to org.mozilla.geckoview. r=snorp,jchen 2018-02-22 00:46:26 +01:00
Alex Gaynor
e8ab01e333 Bug 1407693 - Part 2 - when a child process crashes, write extra annotation data to a pre-opened file descriptor instead of creating a new file; r=gsvelto,rbarker
This removes the need for the content process to have permissions to create new
files on macOS, allowing more aggressive sandboxing.

MozReview-Commit-ID: 8agL5jwxDSL
2017-11-27 14:37:34 -06:00
Jim Chen
c11b631bbb Bug 1416918 - 5. Update generated bindings; r=jchen
MozReview-Commit-ID: JF2T2i1xyGy
2017-12-13 22:57:22 -05:00
Jim Chen
6ed64ab584 Bug 1423010 - 3. Clean up o.m.g.gfx package; r=rbarker
Remove unused classes and make classes that are not used outside of the
package package-private.

MozReview-Commit-ID: 9FxcL5QsM1Q
2017-12-05 11:40:10 -05:00
Jim Chen
b3858683b1 Bug 1416330 - 6. Update bindings; r=jchen
MozReview-Commit-ID: FjpC2Tlu2OF
2017-12-04 11:50:21 -05:00
Jim Chen
c995d47ab2 Bug 1416330 - 3. Update Fennec code to not use LayerView; r=rbarker
Use GeckoSession/LayerSession or GeckoView in Fennec code instead of
using LayerView.

MozReview-Commit-ID: Iod7XsqKy1e
2017-12-04 11:50:20 -05:00
Jim Chen
f05e083594 Bug 1416316 - 4. Update comments and bindings; r=jchen
MozReview-Commit-ID: 9CBe7Iej1D8
2017-11-30 13:25:51 -05:00
shindli
45abba1982 Merge mozilla-central to mozilla-autoland. r=merge a=merge CLOSED TREE 2017-11-22 23:42:02 +02:00
James Willcox
7b6f06fbf5 Bug 1416015 - Ensure SurfaceTexture desctruction happens correctly r=jnicol
MozReview-Commit-ID: I4X1jQQC7ry
2017-11-21 12:43:31 -06:00
Jim Chen
3681507e9f Bug 1416319 - 1. Move content-document-is-displayed flag to native code; r=rbarker
One fix I forgot to make in bug 1416310 is to change the code to reset
the flag in LayerView. I think it's better if we just moved the whole
thing to native code, since we don't really use the flag in Java.

MozReview-Commit-ID: 9cbcYb89LhC
2017-11-22 14:12:22 -05:00
Jim Chen
e2121f8ff2 Bug 1416310 - 5. Remove GeckoLayerClient.java and update generated bindings; r=jchen
Remove GeckoLayerClient.java since it's no longer used, and update
auto-generated JNI bindings. r=me for trivial patch.

MozReview-Commit-ID: CiNPLLkh3VJ
2017-11-20 17:17:02 -05:00
Jim Chen
98420b52da Bug 1415994 - 8. Update auto-generated bindings; r=jchen
MozReview-Commit-ID: 2r1V6Hvl5Pb
2017-11-14 18:18:36 -05:00
Dylan Roeh
b0fb61ff67 Bug 1337078 - Improve the use of Android API in OSPreferences r=snorp
Add BrowserLocaleManager.refreshLocales, a native function which calls OSPreferences::Refresh, and BrowserLocaleManager.getLocale, which returns the current locale string. Use these in place of observing modification of the intl.locale.os pref.
2017-11-10 09:20:04 -06:00
Randall Barker
5922e04a77 Bug 1413362 - part 1: Add GeckoVRManager to support GVR WebVR implementation on Android r=jchen,snorp
MozReview-Commit-ID: C7XTF8N1W9a
2017-11-07 10:50:14 -08:00
Jim Chen
e806245b7a Bug 1415074 - Fix unresponsiveness after restoring GeckoView states; r=jchen
Fix a bug where GeckoView becomes unresponsive to dispatched events
after restoring states, due to the native queue not being restored.
r=me for small, tested patch.

MozReview-Commit-ID: K1cVjjNaZK1
2017-11-07 01:53:11 -05:00
Jim Chen
f5a0854900 Bug 1413698 - 2. Move GeckoView to GeckoSession; r=snorp
Rename GeckoView to GeckoSession. Strip out parts of it that depended on
being a subclass of View. Also strip out parts of it that dealt with
switching EventDispatcher and NativeQueue, because now there's only one
copy of each for each GeckoSession.

MozReview-Commit-ID: J699twtpmTS
2017-11-06 14:54:09 -05:00
Jim Chen
676da58b5d Bug 1413698 - 1. Separate out attach() from open() in GeckoView.Window; r=snorp
Right now, `GeckoView.Window.open()` consists of opening a new Gecko
nsWindow and attaching it to the opening GeckoView. This patch separates
the attaching step into an `Window.attach()` function that was renamed
from `Window.reattach()`. Going forward, `Window.open()` and
`Window.close()` will correspond to opening and closing a session, which
`Window.attach()` will correspond to attaching a display to a session.

MozReview-Commit-ID: 94Un74pwizY
2017-11-06 14:54:08 -05:00
Jim Chen
eb5d426210 Bug 1412872 - 8. Remove GeckoAppShell dependency in gecko-view; r=snorp
In the future, GeckoAppShell will only be part of the service process
library, and will not be part of the app process library. Therefore, we
should minimize GeckoAppShell usage in any GeckoView code that will
likely end up in the app process library.

In particular, AndroidGamepadManager and Clipboard are made to accept
Context as arguments, instead of using
GeckoAppShell.getApplicationContext() for getting the Context.

MozReview-Commit-ID: G9SC815H5Ku
2017-11-01 14:54:04 -04:00
Jim Chen
9276b259cd Bug 1412872 - 3. Remove native GeckoView loadUri call; r=snorp
Remove the native GeckoView loadUri call because it's Fennec-only.
Replace the call with a Fennec-only "Tab:OpenUri" event.

MozReview-Commit-ID: 7xZW9aceoPL
2017-11-01 14:54:03 -04:00
James Willcox
f1df2e190f Bug 1395497 - Regenerate JNI binding r=me
MozReview-Commit-ID: D1zqIMsH1fH
2017-10-30 10:58:56 -05:00
Sebastian Hengst
5a50c5cb42 merge autoland to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 7Ez95T2ivfR
2017-10-07 10:37:39 +02:00
John Lin
fad2013e53 Bug 1403849 - p2: add JNI method for native code to query tunneled playback support. r=esawin
MozReview-Commit-ID: 29HgjCanjGP
2017-09-29 18:04:20 +08:00
Jim Chen
ce77f82e0f Bug 1404144 - 2. Move start child process JNI call to GeckoProcessManager; r=rbarker
Avoid going through GeckoAppShell and move the start child process JNI
call directly to GeckoProcessManager.

MozReview-Commit-ID: KU62TiHVQJX
2017-10-04 22:28:43 -04:00
Eugen Sawin
0d5b12c7be Bug 1316934 - [3.1] Add JNI for AudioManager properties. r=snorp 2017-10-02 17:56:17 +02:00
Jim Chen
5e880673b5 Bug 1401737 - 2. Add GeckoAppShell.appendAppNotesToCrashReport; r=snorp
Add a way to append app notes to the crash report from Java, so we can
associate additional crash data with the crash.

MozReview-Commit-ID: 6I6pGOWb1sZ
2017-10-05 14:59:32 -04:00
James Willcox
09dc487526 Bug 1400878 - Don't show keyboard on Android unless the user caused it r=jchen
MozReview-Commit-ID: KURh08X4Q4U
2017-09-20 14:48:00 -05:00
Jim Chen
a750eb17bf Bug 1378410 - 3. Update generated bindings; r=jchen
MozReview-Commit-ID: fKCoCqFmZk
2017-09-01 14:02:44 -04:00
Eugen Sawin
988776f9a9 Bug 1386240 - [1.3] Check success status when enabling or disabling geolocation events. r=jchen 2017-08-08 18:15:54 +02:00
Jan Henning
ade2408f66 Bug 1266683 - Part 3 - Update notifyIMEContext JNI bindings to include private mode info. r=jchen
MozReview-Commit-ID: Gl2iRWxo9lE
2017-07-31 22:45:54 +02:00
Jim Chen
4214cd347c Bug 1384828 - Use tid for UI thread detection; r=esawin
Use the UI thread's tid for checking if we're on the UI thread in Gecko.
This lets us get rid of `GeckoThread.registerUiThread`, in order to
avoid a race where we check for UI thread before `registerUiThread` is
called.

MozReview-Commit-ID: 11gAWgx4UZo
2017-08-03 13:06:16 -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
James Cheng
e0d347d7b7 Bug 1382151 - Pause Exoplayer when mediaelement is paused. r=kikuo
MozReview-Commit-ID: 5MDBBP5vfpa
2017-07-20 17:47:54 +08:00
James Cheng
595276d781 Bug 1379866 - Implement MediaResource Suspend and Resume in HLSResource. r=jolin
1. Pause the Exoplayer when navigating to another page and resume playback when navigating back.

2. Fix the OOM issue.

MozReview-Commit-ID: 5UGmBzpObsb
2017-07-14 01:29:00 +08:00
Kartikaya Gupta
43b4241f6f Bug 1379252 - Remove unused argument. r=rbarker
MozReview-Commit-ID: 7G8i0G9LyvZ
2017-07-07 14:56:10 -04:00
Kartikaya Gupta
497bb6de74 Bug 1379252 - Remove a bunch of unused fields from ImmutableViewportMetrics. r=rbarker
Also propagate the removal outwards to remove other unused functions.

MozReview-Commit-ID: 9aqcbBA0Mf1
2017-07-07 14:56:07 -04: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
Kilik Kuo
7ccb59c8ff Bug 1368954 - [Part1] Use reflection to avoid build bustage when source code is only included in Nightly. r=jolin,nalexander
1) Provide a BaseHlsPlayer as the interface used in related java wrappers.
2) Create and get the player instance from factory via reflection to decouple the source code dependency.

MozReview-Commit-ID: 5wsHSOjSeXV
2017-06-15 11:16:21 +08:00
James Cheng
8239df4638 Bug 1368907 - Part5 - Regenerate the JNI glue codes after renaming the java files. r=jolin
MozReview-Commit-ID: 88A44j5vmGv
2017-06-12 16:30:57 +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
James Willcox
ff0480f091 Bug 1367287 - Reference count GeckoSurfaceTexture r=jchen
MozReview-Commit-ID: 1JJVzCmANyH
2017-06-02 10:14:20 -05:00
James Cheng
f07251a01d Bug 1350250 - Add a GeckoHlsResourceWrapper java glue. r=jolin,jya
MozReview-Commit-ID: KMAqkJSk2tT
2017-05-17 17:05:42 +08:00
Kilik Kuo
f51d682e5a Bug 1350253 - Provide GeckoHlsDemuxerWrapper & corresponding generated JNI files as the glue for HLSDemuxer and GeckoHlsPlayer. r=jolin,jya
MozReview-Commit-ID: 62cnGQsmdNS
2017-05-25 20:48:03 +08:00
Kilik Kuo
a0c9a13b3c Bug 1350241 -Part1: Provide data structure of {Audio,Video}Info and demuxed sample for the use of HLS on Fennec. r=jolin,jya
MozReview-Commit-ID: 11triLS84Gq
2017-05-25 12:46:06 +08: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
Jim Chen
ae86dd6998 Bug 1365126 - Move shortcut creation to static methods in GeckoApplication; r=droeh
Move shortcut creation code in GeckoApp to GeckoApplication, and make
the methods static so that we can call them without a GeckoInterface
instance. This lets us remove GeckoInterface.createShortcut.

MozReview-Commit-ID: AUnQGI02Bk
2017-05-18 18:09:05 -04:00