зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1601067 - Add deprecation notice for registerWebExtension. r=droeh
Differential Revision: https://phabricator.services.mozilla.com/D73514
This commit is contained in:
Родитель
a017477abe
Коммит
82fa9ddcde
|
@ -448,13 +448,13 @@ package org.mozilla.geckoview {
|
|||
method @UiThread public void orientationChanged();
|
||||
method @UiThread public void orientationChanged(int);
|
||||
method @AnyThread public void readFromParcel(@NonNull Parcel);
|
||||
method @UiThread @NonNull public GeckoResult<Void> registerWebExtension(@NonNull WebExtension);
|
||||
method @Deprecated @UiThread @NonNull public GeckoResult<Void> registerWebExtension(@NonNull WebExtension);
|
||||
method @UiThread public void setDelegate(@Nullable GeckoRuntime.Delegate);
|
||||
method @UiThread public void setLoginStorageDelegate(@Nullable LoginStorage.Delegate);
|
||||
method @UiThread public void setServiceWorkerDelegate(@Nullable GeckoRuntime.ServiceWorkerDelegate);
|
||||
method @UiThread public void setWebNotificationDelegate(@Nullable WebNotificationDelegate);
|
||||
method @AnyThread public void shutdown();
|
||||
method @UiThread @NonNull public GeckoResult<Void> unregisterWebExtension(@NonNull WebExtension);
|
||||
method @Deprecated @UiThread @NonNull public GeckoResult<Void> unregisterWebExtension(@NonNull WebExtension);
|
||||
field public static final String ACTION_CRASHED = "org.mozilla.gecko.ACTION_CRASHED";
|
||||
field public static final Parcelable.Creator<GeckoRuntime> CREATOR;
|
||||
field public static final String EXTRA_CRASH_FATAL = "fatal";
|
||||
|
@ -1430,8 +1430,8 @@ package org.mozilla.geckoview {
|
|||
}
|
||||
|
||||
public class WebExtension {
|
||||
ctor public WebExtension(@NonNull String, @NonNull String, long, @NonNull WebExtensionController);
|
||||
ctor public WebExtension(@NonNull String, @NonNull WebExtensionController);
|
||||
ctor @Deprecated public WebExtension(@NonNull String, @NonNull String, long, @NonNull WebExtensionController);
|
||||
ctor @Deprecated public WebExtension(@NonNull String, @NonNull WebExtensionController);
|
||||
method @UiThread @Nullable public WebExtension.TabDelegate getTabDelegate();
|
||||
method @AnyThread public void setActionDelegate(@Nullable WebExtension.ActionDelegate);
|
||||
method @UiThread public void setMessageDelegate(@Nullable WebExtension.MessageDelegate, @NonNull String);
|
||||
|
|
|
@ -485,7 +485,11 @@ public final class GeckoRuntime implements Parcelable {
|
|||
*
|
||||
* @return A {@link GeckoResult} that will complete when the WebExtension
|
||||
* has been installed.
|
||||
*
|
||||
* @deprecated Use {@link WebExtensionController#installBuiltIn} instead. This method will
|
||||
* be removed in GeckoView 81.
|
||||
*/
|
||||
@Deprecated // Bug 1634504
|
||||
@UiThread
|
||||
public @NonNull GeckoResult<Void> registerWebExtension(
|
||||
final @NonNull WebExtension webExtension) {
|
||||
|
@ -518,7 +522,11 @@ public final class GeckoRuntime implements Parcelable {
|
|||
*
|
||||
* @return A {@link GeckoResult} that will complete when the WebExtension
|
||||
* has been unregistered.
|
||||
*
|
||||
* @deprecated Use {@link WebExtensionController#uninstall} instead. This method will
|
||||
* be removed in GeckoView 81.
|
||||
*/
|
||||
@Deprecated // Bug 1634504
|
||||
@UiThread
|
||||
public @NonNull GeckoResult<Void> unregisterWebExtension(
|
||||
final @NonNull WebExtension webExtension) {
|
||||
|
|
|
@ -144,7 +144,11 @@ public class WebExtension {
|
|||
* </ul>
|
||||
* @param flags {@link Flags} for this WebExtension.
|
||||
* @param controller the current {@link WebExtensionController} instance
|
||||
*
|
||||
* @deprecated Use the return value of {@link WebExtensionController#installBuiltIn} instead.
|
||||
* This method will be removed in GeckoView 81.
|
||||
*/
|
||||
@Deprecated
|
||||
public WebExtension(final @NonNull String location, final @NonNull String id,
|
||||
final @WebExtensionFlags long flags,
|
||||
final @NonNull WebExtensionController controller) {
|
||||
|
@ -170,7 +174,11 @@ public class WebExtension {
|
|||
* <code>resource:</code> URI to a folder inside the APK or
|
||||
* a <code>file:</code> URL to a <code>.xpi</code> file.
|
||||
* @param controller the current {@link WebExtensionController} instance
|
||||
*
|
||||
* @deprecated Use the return value of {@link WebExtensionController#installBuiltIn} instead.
|
||||
* This method will be removed in GeckoView 81.
|
||||
*/
|
||||
@Deprecated
|
||||
public WebExtension(final @NonNull String location,
|
||||
final @NonNull WebExtensionController controller) {
|
||||
this(location, "{" + UUID.randomUUID().toString() + "}", Flags.NONE, controller);
|
||||
|
|
|
@ -11,12 +11,13 @@ exclude: true
|
|||
|
||||
# GeckoView API Changelog.
|
||||
|
||||
⚠️ breaking change
|
||||
⚠️ breaking change and deprecation notices
|
||||
|
||||
## v78
|
||||
- Added [`WebExtensionController.installBuiltIn`][78.1] that allows installing an
|
||||
extension that is bundled with the APK. This method is meant as a replacement
|
||||
for [`GeckoRuntime.registerWebExtension`][67.15].
|
||||
for [`GeckoRuntime.registerWebExtension`][67.15], ⚠️ which is now deprecated
|
||||
and will be removed in GeckoView 81.
|
||||
|
||||
[78.1]: {{javadoc_uri}}/WebExtensionController.html#installBuiltIn-java.lang.String-
|
||||
|
||||
|
@ -682,4 +683,4 @@ exclude: true
|
|||
[65.24]: {{javadoc_uri}}/CrashReporter.html#sendCrashReport-android.content.Context-android.os.Bundle-java.lang.String-
|
||||
[65.25]: {{javadoc_uri}}/GeckoResult.html
|
||||
|
||||
[api-version]: 7332ffcb19b3367e8ac43466f7aae13094fbb1fe
|
||||
[api-version]: b4568ed7ee3ee43aa741a01cb4571379d0399299
|
||||
|
|
|
@ -831,6 +831,7 @@ var GeckoViewWebExtension = {
|
|||
this.pageActionClick(aData.extensionId);
|
||||
break;
|
||||
}
|
||||
// TODO: Remove deprecated Bug 1634504
|
||||
case "GeckoView:RegisterWebExtension": {
|
||||
let uri;
|
||||
try {
|
||||
|
@ -880,6 +881,7 @@ var GeckoViewWebExtension = {
|
|||
break;
|
||||
}
|
||||
|
||||
// TODO: Remove deprecated Bug 1634504
|
||||
case "GeckoView:UnregisterWebExtension": {
|
||||
if (!this.extensionScopes.has(aData.id)) {
|
||||
aCallback.onError(
|
||||
|
@ -1074,6 +1076,7 @@ var GeckoViewWebExtension = {
|
|||
},
|
||||
};
|
||||
|
||||
// TODO: Remove deprecated Bug 1634504
|
||||
GeckoViewWebExtension.extensionScopes = new Map();
|
||||
// WeakMap[Extension -> BrowserAction]
|
||||
GeckoViewWebExtension.browserActions = new WeakMap();
|
||||
|
|
Загрузка…
Ссылка в новой задаче