Commit Graph
555 Commits
Author SHA1 Message Date
Daniel Holbert fe6ee9a068 Bug 2043345: Use MakeRefPtr to do allocation for various RefPtr variables in widget/android. r=geckoview-reviewers,hiro
Differential Revision: https://phabricator.services.mozilla.com/D302957
2026-05-29 03:43:06 +00:00
Makoto Kato 452c696e0a Bug 2021365 - Use MessageQueue.isIdle instead of MessageQueue.mMessage. r=geckoview-reviewers,mcarare,jonalmeida
Actually, we use `mMessage` private field of `MessageQueue` object
whether message queue on Gecko thread is idle or not. Next Android
will be that `mMessage` is always null according to Android 17
changes [*].

Android 6 or later has `isIdle` method, so we should use it instead.

* https://developer.android.com/about/versions/17/changes/messagequeue

Differential Revision: https://phabricator.services.mozilla.com/D288145
2026-03-24 01:02:23 +00:00
Sylvestre Ledru 4f6b8b516d Bug 2023419 - Remove Emacs/Vim modelines from widget/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287877
2026-03-16 17:22:02 +00:00
Makoto Kato d70d4d689c Bug 2003417 - Remove AndroidBridge::GetGlobalContextRef. r=jolin,geckoview-reviewers,webrtc-reviewers,pehrsons,ohall
`VideoCaptureAndroid.java` and `video_capture_android.cc` aren't a part of
WebRTC SDK now. So these are maintained by us.

Although `AndroidBridge::GetGlobalContextRef` seems to store the application
context as global reference, it isn't good due to possible leak. We should
simply use `GeckoAppShell.getApplicationContext` instead of JNI.

Differential Revision: https://phabricator.services.mozilla.com/D274710
2025-12-05 06:32:35 +00:00
serge-sans-paille 9b6eb9c7f9 Bug 1996048 - Remove unused inclusion of UniquePtr.h or UniquePtrExtensions.h r=emilio,media-playback-reviewers,profiler-reviewers,win-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,gstoll,mstange,TYLin,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D269782
2025-10-24 06:50:27 +00:00
Nika Layzell 28950da5cb Bug 1953595 - Part 1: Refactor EventDispatcher to be more embedder-agnostic, r=geckoview-reviewers,nalexander
This patch refactors the C++/JS side of EventDispatcher into a new
EventDispatcherBase class, which has no dependencies on jni or Android thanks
to passing around JS::Value. This will allow the iOS implementation in part 2
to be much smaller and share more code with the Android implementation.

When refactoring the EventDispatcher logic, I also noticed some small
simplifications (such as using `nsTObserverArray` rather than the hand-rolled
observer logic from the previous version of the patch), which have been
applied. The code was also updated to use proper thread-safety annotations.

Differential Revision: https://phabricator.services.mozilla.com/D241287
2025-06-24 23:17:17 +00:00
Cristina Horotan 4da7d4ee45 Revert "Bug 1953595 - Part 2: Add EventDispatcher implementation for iOS, r=glandium,geckoview-reviewers,nalexander" for causing gv-junit failures
This reverts commit 23eb1407b7.

Revert "Bug 1953595 - Part 1: Refactor EventDispatcher to be more embedder-agnostic, r=geckoview-reviewers,nalexander"

This reverts commit 13b598fec0.
2025-06-11 02:16:57 +00:00
Nika Layzell 13b598fec0 Bug 1953595 - Part 1: Refactor EventDispatcher to be more embedder-agnostic, r=geckoview-reviewers,nalexander
This patch refactors the C++/JS side of EventDispatcher into a new
EventDispatcherBase class, which has no dependencies on jni or Android thanks
to passing around JS::Value. This will allow the iOS implementation in part 2
to be much smaller and share more code with the Android implementation.

When refactoring the EventDispatcher logic, I also noticed some small
simplifications (such as using `nsTObserverArray` rather than the hand-rolled
observer logic from the previous version of the patch), which have been
applied. The code was also updated to use proper thread-safety annotations.

Differential Revision: https://phabricator.services.mozilla.com/D241287
2025-06-10 19:18:37 +00:00
Atila Butkovits 7709788eac Revert "Bug 1953595 - Part 2: Add EventDispatcher implementation for iOS, r=glandium,geckoview-reviewers,nalexander" for causing Android failures.
This reverts commit 843fc1fc8a.

Revert "Bug 1953595 - Part 1: Refactor EventDispatcher to be more embedder-agnostic, r=geckoview-reviewers,nalexander"

This reverts commit 3582db2329.
2025-06-07 01:15:03 +00:00
Nika Layzell 3582db2329 Bug 1953595 - Part 1: Refactor EventDispatcher to be more embedder-agnostic, r=geckoview-reviewers,nalexander
This patch refactors the C++/JS side of EventDispatcher into a new
EventDispatcherBase class, which has no dependencies on jni or Android thanks
to passing around JS::Value. This will allow the iOS implementation in part 2
to be much smaller and share more code with the Android implementation.

When refactoring the EventDispatcher logic, I also noticed some small
simplifications (such as using `nsTObserverArray` rather than the hand-rolled
observer logic from the previous version of the patch), which have been
applied. The code was also updated to use proper thread-safety annotations.

Differential Revision: https://phabricator.services.mozilla.com/D241287
2025-06-06 23:47:37 +00:00
Makoto Kato 082ddfc960 Bug 1924684 - Remove unused old code in AndroidBridge. r=geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D225628
2024-10-23 14:21:03 +00:00
Mike Hommey 1b562adf6d Bug 1922437 - Rename nsIAndroid* classes to nsIGeckoView*. r=geckoview-reviewers,nika,frontend-codestyle-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D224429
2024-10-03 22:21:51 +00:00
Gregory Pappas 53b8148c7b Bug 1914578 - Remove EventTracer r=perftest-reviewers,geckoview-reviewers,win-reviewers,profiler-reviewers,mstange,sparky,gstoll,owlish
Differential Revision: https://phabricator.services.mozilla.com/D219955
2024-08-31 03:39:50 +00:00
Makoto Kato 8955f35b22 Bug 1805127 - Don't use AndroidBridge to get release version. r=geckoview-reviewers,calu
Actually, we can get Android release version from JNI generator, so it is
unnecessary to use `AndroidBridge` to get it.

Also, this cleans up unused AndroidBridge functions.

Differential Revision: https://phabricator.services.mozilla.com/D164431
2022-12-13 11:57:06 +00:00
Emilio Cobos Álvarez 2d7e089508 Bug 1754813 - Make Hal::ScreenOrientation an enum class. r=gsvelto,m_kato,geckoview-reviewers
This adds proper IPC validation too.

Differential Revision: https://phabricator.services.mozilla.com/D138461
2022-02-14 07:51:06 +00:00
Makoto Kato 436481d014 Bug 1753139 - Clean up AndroidBridge.h. r=geckoview-reviewers,emilio,agi
- AndroidBridge inclues a lot of unused headers.
- Remove unused enum.
- Move AndroidSystemColor to nsLookAndFeel.h since this struct is used in it.

Differential Revision: https://phabricator.services.mozilla.com/D137595
2022-02-03 01:42:51 +00:00
Makoto Kato ab395a19a7 Bug 1748955 - Remove AndroidBridge dependencies from GfxInfo. r=geckoview-reviewers,calu
As historical reason, AndroidBridge has a lot of JNI wrappers. But we have
auto-generation JNI wrappers now, so it is unnecessary to keep wrappers in
AndroidBridge for GfxInfo.

So I would like to remove AndroidBridge dependencies from GfxInfo.

Differential Revision: https://phabricator.services.mozilla.com/D135324
2022-01-13 12:09:47 +00:00
Makoto Kato a63568a9b1 Bug 1701148 - Remove unused variables in AndroidBridge. r=geckoview-reviewers,agi
Depends on D109857

Differential Revision: https://phabricator.services.mozilla.com/D109858
2021-03-29 01:21:28 +00:00
Makoto Kato 2b0cbfba25 Bug 1701148 - Get rid of AndroidBridge::GetAPIVersion(). r=geckoview-reviewers,agi
Use `mozilla::jni::GetAPIVersion` instead.

Differential Revision: https://phabricator.services.mozilla.com/D109857
2021-03-29 01:21:27 +00:00
Agi Sferro 3972a51977 Bug 1694481 - Remove unused code from exthandler/android. r=droeh,esawin
Differential Revision: https://phabricator.services.mozilla.com/D106182
2021-03-10 22:43:08 +00:00
Agi Sferro c0a88ca6b8 Bug 1694481 - Remove unused DirectBufferAllocator. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D106179
2021-03-10 22:43:07 +00:00
Agi Sferro 3060fc06f4 Bug 1694481 - Remove unused android:// protocol handler r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D106178
2021-03-10 22:43:06 +00:00
Agi Sferro d2a9f6496a Bug 1694481 - Remove Fennec code in nsIAndroidBridge. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D106177
2021-03-10 22:43:06 +00:00
Simon Giesecke c7a36b5d58 Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Makoto Kato 452b0d1e7e Bug 1685031 - Remove unused shutdown observer in nsAndroidBridge. r=geckoview-reviewers,agi
Shutdown observer in nsAndroidBridge does nothing. So let's remove this.

Differential Revision: https://phabricator.services.mozilla.com/D100760
2021-01-05 20:14:12 +00:00
Simon Giesecke ab6f0a7137 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Agi Sferro b84397f63d Bug 1648149 - Add named EventDispatcher's. r=snorp
This patch adds a "named" EventDispatcher that can be accessed on both java and
javascript by calling

```
EventDispatcher.byName(...)
```

A named EventDispatcher will receive messages only from it's counterpart with
the same name and can be used to implement bidirectional communication like
WebExtension ports.

Differential Revision: https://phabricator.services.mozilla.com/D84260
2020-08-14 05:44:24 +00:00
Mihai Alexandru Michis 8c029c2424 Backed out 5 changesets (bug 1648149) for causing android wpt failures in closed-attribute.window.html
CLOSED TREE

Backed out changeset 470b0fa401ab (bug 1648149)
Backed out changeset 938bf3fab3ee (bug 1648149)
Backed out changeset a41e4158e960 (bug 1648149)
Backed out changeset 700f8e53ed10 (bug 1648149)
Backed out changeset 3f74337b160e (bug 1648149)
2020-08-14 08:40:29 +03:00
Agi Sferro 1aa9dfa5d9 Bug 1648149 - Add named EventDispatcher's. r=snorp
This patch adds a "named" EventDispatcher that can be accessed on both java and
javascript by calling

```
EventDispatcher.byName(...)
```

A named EventDispatcher will receive messages only from it's counterpart with
the same name and can be used to implement bidirectional communication like
WebExtension ports.

Differential Revision: https://phabricator.services.mozilla.com/D84260
2020-08-13 20:25:05 +00:00
Aaron Klotz 383ce64df3 Bug 1637452: Part 1 - Fix JNI includes in widget/android; r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D75364
2020-05-15 17:04:10 +00:00
Nick Alexander faf23c931c Bug 1448428 - Part 2: Transition "HardwareCodecCapabilityUtils" away from "unified" GeneratedJNI{Natives,Wrappers}.h header. r=snorp,geckoview-reviewers
Depends on D58574

Differential Revision: https://phabricator.services.mozilla.com/D58575
2020-05-13 18:11:06 +00:00
Razvan Maries 80127d93ec Backed out 5 changesets (bug 1448428) for build bustages at SocketProcessParent.cpp. CLOSED TREE
Backed out changeset 192294c1413a (bug 1448428)
Backed out changeset da732f0c37d5 (bug 1448428)
Backed out changeset c48617a975e9 (bug 1448428)
Backed out changeset 92ca5adb7eb3 (bug 1448428)
Backed out changeset 3a3c734343f3 (bug 1448428)
2020-05-13 02:20:24 +03:00
Nick Alexander b0b9f4b85d Bug 1448428 - Part 2: Transition "HardwareCodecCapabilityUtils" away from "unified" GeneratedJNI{Natives,Wrappers}.h header. r=snorp,geckoview-reviewers
Depends on D58574

Differential Revision: https://phabricator.services.mozilla.com/D58575
2020-05-12 23:04:59 +00:00
Alastor Wu 793fa9738d Bug 1577890 - part3 : remove media control related code in AndroidBridge. r=snorp
These attribute and method were added for media control in Fennec and it seems we forgot to clean them.

Differential Revision: https://phabricator.services.mozilla.com/D65259
2020-03-05 22:40:55 +00:00
Aaron Klotz c7d67b115e Bug 1608577: Part 3 - Remove |using namespace mozilla::java| from widget/android; r=geckoview-reviewers,esawin
Differential Revision: https://phabricator.services.mozilla.com/D59798
2020-01-14 16:47:59 +00:00
Hiroyuki Ikezoe 4522e60f39 Bug 1607124 - Query system colors in child processes directly. r=geckoview-reviewers,snorp
Using LookAndFeelInt to query system colors is awkward, it's normally used for
eIntID_XX values.

Differential Revision: https://phabricator.services.mozilla.com/D58744
2020-01-07 15:41:07 +00:00
Gabriele Svelto f03cdb2b2d Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55444
2019-12-06 09:17:57 +00:00
Sylvestre Ledru 8f8dfaae6a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
Please note that it is the first reformat with clang-format 9
I only saw a fix in the .mm file

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D49056
2019-10-21 14:13:44 +00:00
John Lin f588ea7219 Bug 1581902 - p3: expose H.264 HW availability to AndroidBridge. r=esawin
Also rename existing utility functions to reflect that they are for VP8 only.

Differential Revision: https://phabricator.services.mozilla.com/D47369
2019-10-08 17:15:35 +00:00
Daniel Varga ccf2aede04 Backed out 6 changesets (bug 1581902) for xpcshell failure at xpcshell/rs-blocklist/test_gfxBlacklist_Equal_DriverNew.js. On a CLOSED TREE
Backed out changeset c900fdf28f82 (bug 1581902)
Backed out changeset 92c9ea70040d (bug 1581902)
Backed out changeset 1f588b5bf019 (bug 1581902)
Backed out changeset f837f2c5224f (bug 1581902)
Backed out changeset 44e248976099 (bug 1581902)
Backed out changeset c7dfff053f71 (bug 1581902)
2019-10-07 23:07:36 +03:00
John Lin 045ce075d6 Bug 1581902 - p3: expose H.264 HW availability to AndroidBridge. r=esawin
Also rename existing utility functions to reflect that they are for VP8 only.

Differential Revision: https://phabricator.services.mozilla.com/D47369
2019-10-01 16:55:01 +00:00
Nick Alexander 997b7d1148 Bug 1580356 - Remove Fennec (Firefox for Android). r=snorp,mshal
This does many things:

1) stops producing (and consuming) `FennecJNI*` JNI wrappers
2) removes the :app and :thirdparty Gradle projects
3) removes relevant pieces of the Gradle target configuration
4) updates lints
5) purges old configurations

After this commit, the `mobile/android` project/application builds
only GeckoView.

Differential Revision: https://phabricator.services.mozilla.com/D46536
2019-10-04 20:55:11 +00:00
Kris Taeleman 820442505c Bug 1578506 - Add better monitor information to about:support. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D47110
2019-10-03 23:43:35 +00:00
Gabriele Svelto 652cb568da Bug 1585156 - Remove useless inclusions of nsIDOMWindow.h and nsIDOMWindowUtils.h r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D47678
2019-09-30 22:06:47 +00:00
Henri Sivonen fa7d5b39bc Bug 1545429 - Avoid passing unsupported Android screen orientation flag combinations to Gecko. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D36351
2019-07-02 17:42:34 +00:00
Makoto Kato 169610b318 Bug 676268 - Part 1. Support text/html on Android clipboard backend. r=geckoview-reviewers,snorp
Summary: Actually, we only support `text/unicode` mime type on Android clipboard backend.  But Android API 16+ supports `text/html`, so we should support this type since Chrome/Blink already supports it.

Reviewers: #geckoview-reviewers, snorp

Reviewed By: #geckoview-reviewers, snorp

Bug #: 676268

Differential Revision: https://phabricator.services.mozilla.com/D22659
2019-03-20 14:47:19 +09:00
Tooru Fujisawa 5ef6d9cc06 Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Sylvestre Ledru e5a134f73a Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Gabriele Svelto e76fa2194a Bug 1509450 - Remove unnecessary inclusions of ContentParent.h and ContentChild.h r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D12728
2018-11-26 14:49:44 +00:00
Lina Cambridge 5974b4ba20 Bug 1494713 - Add nsWindow::From. r=jchen
Differential Revision: https://phabricator.services.mozilla.com/D11289
2018-11-16 17:31:58 +00:00