diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /mobile/android/geckoview/src/main/aidl/org | |
parent | Initial commit. (diff) | |
download | firefox-esr-upstream.tar.xz firefox-esr-upstream.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mobile/android/geckoview/src/main/aidl/org')
18 files changed, 347 insertions, 0 deletions
diff --git a/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/IGeckoEditableChild.aidl b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/IGeckoEditableChild.aidl new file mode 100644 index 0000000000..2f40a9ae9a --- /dev/null +++ b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/IGeckoEditableChild.aidl @@ -0,0 +1,44 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko; + +import org.mozilla.gecko.IGeckoEditableParent; + +import android.view.KeyEvent; + +// Interface for GeckoEditable calls from parent to child +interface IGeckoEditableChild { + // Transfer this child to a new parent. + void transferParent(in IGeckoEditableParent parent); + + // Process a key event. + void onKeyEvent(int action, int keyCode, int scanCode, int metaState, + int keyPressMetaState, long time, int domPrintableKeyValue, + int repeatCount, int flags, boolean isSynthesizedImeKey, + in KeyEvent event); + + // Request a callback to parent after performing any pending operations. + void onImeSynchronize(); + + // Replace part of current text. + void onImeReplaceText(int start, int end, String text); + + // Store a composition range. + void onImeAddCompositionRange(int start, int end, int rangeType, int rangeStyles, + int rangeLineStyle, boolean rangeBoldLine, + int rangeForeColor, int rangeBackColor, int rangeLineColor); + + // Change to a new composition using previously added ranges. + void onImeUpdateComposition(int start, int end, int flags); + + // Request cursor updates from the child. + void onImeRequestCursorUpdates(int requestMode); + + // Commit current composition. + void onImeRequestCommit(); + + // Insert requested image. + void onImeInsertImage(in byte[] data, in String mimeType); +} diff --git a/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/IGeckoEditableParent.aidl b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/IGeckoEditableParent.aidl new file mode 100644 index 0000000000..8b0ec3dbb6 --- /dev/null +++ b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/IGeckoEditableParent.aidl @@ -0,0 +1,37 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko; + +import android.os.IBinder; +import android.view.KeyEvent; + +import org.mozilla.gecko.IGeckoEditableChild; + +// Interface for GeckoEditable calls from child to parent +interface IGeckoEditableParent { + // Set the default child to forward events to, when there is no focused child. + void setDefaultChild(IGeckoEditableChild child); + + // Notify an IME event of a type defined in GeckoEditableListener. + void notifyIME(IGeckoEditableChild child, int type); + + // Notify a change in editor state or type. + void notifyIMEContext(IBinder token, int state, String typeHint, String modeHint, + String actionHint, String autocapitalize, int flags); + + // Notify a change in editor selection. + void onSelectionChange(IBinder token, int start, int end, boolean causedOnlyByComposition); + + // Notify a change in editor text. + void onTextChange(IBinder token, in CharSequence text, + int start, int unboundedOldEnd, + boolean causedOnlyByComposition); + + // Perform the default action associated with a key event. + void onDefaultKeyEvent(IBinder token, in KeyEvent event); + + // Update the screen location of current composition. + void updateCompositionRects(IBinder token, in RectF[] rects, in RectF caretRect); +} diff --git a/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/gfx/GeckoSurface.aidl b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/gfx/GeckoSurface.aidl new file mode 100644 index 0000000000..3fe35450fc --- /dev/null +++ b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/gfx/GeckoSurface.aidl @@ -0,0 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.gfx; + +parcelable GeckoSurface;
\ No newline at end of file diff --git a/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/gfx/ICompositorSurfaceManager.aidl b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/gfx/ICompositorSurfaceManager.aidl new file mode 100644 index 0000000000..f8d399d121 --- /dev/null +++ b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/gfx/ICompositorSurfaceManager.aidl @@ -0,0 +1,11 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.gfx; + +import android.view.Surface; + +interface ICompositorSurfaceManager { + void onSurfaceChanged(int widgetId, in Surface surface); +} diff --git a/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/gfx/ISurfaceAllocator.aidl b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/gfx/ISurfaceAllocator.aidl new file mode 100644 index 0000000000..e9d63c379c --- /dev/null +++ b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/gfx/ISurfaceAllocator.aidl @@ -0,0 +1,15 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.gfx; + +import org.mozilla.gecko.gfx.GeckoSurface; +import org.mozilla.gecko.gfx.SyncConfig; + +interface ISurfaceAllocator { + GeckoSurface acquireSurface(in int width, in int height, in boolean singleBufferMode); + void releaseSurface(in long handle); + void configureSync(in SyncConfig config); + void sync(in long handle); +} diff --git a/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/gfx/SyncConfig.aidl b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/gfx/SyncConfig.aidl new file mode 100644 index 0000000000..59cd09ffdf --- /dev/null +++ b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/gfx/SyncConfig.aidl @@ -0,0 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.gfx; + +parcelable SyncConfig; diff --git a/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/FormatParam.aidl b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/FormatParam.aidl new file mode 100644 index 0000000000..91ce56d463 --- /dev/null +++ b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/FormatParam.aidl @@ -0,0 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.media; + +parcelable FormatParam;
\ No newline at end of file diff --git a/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/ICodec.aidl b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/ICodec.aidl new file mode 100644 index 0000000000..407ffd7ba9 --- /dev/null +++ b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/ICodec.aidl @@ -0,0 +1,33 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.media; + +// Non-default types used in interface. +import android.os.Bundle; +import org.mozilla.gecko.gfx.GeckoSurface; +import org.mozilla.gecko.media.FormatParam; +import org.mozilla.gecko.media.ICodecCallbacks; +import org.mozilla.gecko.media.Sample; +import org.mozilla.gecko.media.SampleBuffer; + +interface ICodec { + void setCallbacks(in ICodecCallbacks callbacks); + boolean configure(inout FormatParam format, in GeckoSurface surface, in int flags, in String drmStubId); + boolean isAdaptivePlaybackSupported(); + boolean isHardwareAccelerated(); + boolean isTunneledPlaybackSupported(); + void start(); + void stop(); + void flush(); + void release(); + + Sample dequeueInput(int size); + oneway void queueInput(in Sample sample); + SampleBuffer getInputBuffer(int id); + SampleBuffer getOutputBuffer(int id); + + void releaseOutput(in Sample sample, in boolean render); + oneway void setBitrate(in int bps); +} diff --git a/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/ICodecCallbacks.aidl b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/ICodecCallbacks.aidl new file mode 100644 index 0000000000..58ee1e2b1b --- /dev/null +++ b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/ICodecCallbacks.aidl @@ -0,0 +1,17 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.media; + +// Non-default types used in interface. +import org.mozilla.gecko.media.FormatParam; +import org.mozilla.gecko.media.Sample; + +interface ICodecCallbacks { + oneway void onInputQueued(long timestamp); + oneway void onInputPending(long timestamp); + oneway void onOutputFormatChanged(in FormatParam format); + oneway void onOutput(in Sample sample); + oneway void onError(boolean fatal); +}
\ No newline at end of file diff --git a/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/IMediaDrmBridge.aidl b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/IMediaDrmBridge.aidl new file mode 100644 index 0000000000..f5f5e06b08 --- /dev/null +++ b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/IMediaDrmBridge.aidl @@ -0,0 +1,27 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.media; + +// Non-default types used in interface. +import org.mozilla.gecko.media.IMediaDrmBridgeCallbacks; + +interface IMediaDrmBridge { + void setCallbacks(in IMediaDrmBridgeCallbacks callbacks); + + oneway void createSession(int createSessionToken, + int promiseId, + String initDataType, + in byte[] initData); + + oneway void updateSession(int promiseId, + String sessionId, + in byte[] response); + + oneway void closeSession(int promiseId, String sessionId); + + oneway void release(); + + void setServerCertificate(in byte[] cert); +} diff --git a/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/IMediaDrmBridgeCallbacks.aidl b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/IMediaDrmBridgeCallbacks.aidl new file mode 100644 index 0000000000..b3918417e6 --- /dev/null +++ b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/IMediaDrmBridgeCallbacks.aidl @@ -0,0 +1,31 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.media; + +// Non-default types used in interface. +import org.mozilla.gecko.media.SessionKeyInfo; + +interface IMediaDrmBridgeCallbacks { + + oneway void onSessionCreated(int createSessionToken, + int promiseId, + in byte[] sessionId, + in byte[] request); + + oneway void onSessionUpdated(int promiseId, in byte[] sessionId); + + oneway void onSessionClosed(int promiseId, in byte[] sessionId); + + oneway void onSessionMessage(in byte[] sessionId, + int sessionMessageType, + in byte[] request); + + oneway void onSessionError(in byte[] sessionId, String message); + + oneway void onSessionBatchedKeyChanged(in byte[] sessionId, + in SessionKeyInfo[] keyInfos); + + oneway void onRejectPromise(int promiseId, String message); +} diff --git a/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/IMediaManager.aidl b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/IMediaManager.aidl new file mode 100644 index 0000000000..2cc6d56945 --- /dev/null +++ b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/IMediaManager.aidl @@ -0,0 +1,21 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.media; + +// Non-default types used in interface. +import org.mozilla.gecko.media.ICodec; +import org.mozilla.gecko.media.IMediaDrmBridge; + +interface IMediaManager { + /** Creates a remote ICodec object. */ + ICodec createCodec(); + + /** Creates a remote IMediaDrmBridge object. */ + IMediaDrmBridge createRemoteMediaDrmBridge(in String keySystem, + in String stubId); + + /** Called by client to indicate it no longer needs a requested codec or DRM bridge. */ + oneway void endRequest(); +} diff --git a/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/Sample.aidl b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/Sample.aidl new file mode 100644 index 0000000000..0d55c76fc6 --- /dev/null +++ b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/Sample.aidl @@ -0,0 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.media; + +parcelable Sample;
\ No newline at end of file diff --git a/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/SampleBuffer.aidl b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/SampleBuffer.aidl new file mode 100644 index 0000000000..a124c73721 --- /dev/null +++ b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/SampleBuffer.aidl @@ -0,0 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.media; + +parcelable SampleBuffer; diff --git a/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/SessionKeyInfo.aidl b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/SessionKeyInfo.aidl new file mode 100644 index 0000000000..1ec8f63c73 --- /dev/null +++ b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/media/SessionKeyInfo.aidl @@ -0,0 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.media; + +parcelable SessionKeyInfo;
\ No newline at end of file diff --git a/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/process/IChildProcess.aidl b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/process/IChildProcess.aidl new file mode 100644 index 0000000000..0ae346e3b8 --- /dev/null +++ b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/process/IChildProcess.aidl @@ -0,0 +1,48 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.process; + +import org.mozilla.gecko.gfx.ICompositorSurfaceManager; +import org.mozilla.gecko.gfx.ISurfaceAllocator; +import org.mozilla.gecko.process.IProcessManager; + +import android.os.Bundle; +import android.os.ParcelFileDescriptor; + +interface IChildProcess { + /** The process started correctly. */ + const int STARTED_OK = 0; + /** An error occurred when trying to start this process. */ + const int STARTED_FAIL = 1; + /** This process is being used elsewhere and cannot start. */ + const int STARTED_BUSY = 2; + + int getPid(); + int start(in IProcessManager procMan, + in String mainProcessId, + in String[] args, + in Bundle extras, + int flags, + in String userSerialNumber, + in String crashHandlerService, + in ParcelFileDescriptor prefsPfd, + in ParcelFileDescriptor prefMapPfd, + in ParcelFileDescriptor ipcPfd, + in ParcelFileDescriptor crashReporterPfd, + in ParcelFileDescriptor crashAnnotationPfd); + + void crash(); + + /** Must only be called for a GPU child process type. */ + ICompositorSurfaceManager getCompositorSurfaceManager(); + + /** + * Returns the interface that other processes should use to allocate Surfaces to be + * consumed by the GPU process. Must only be called for a GPU child process type. + * @param allocatorId A unique ID used to identify the GPU process instance the allocator + * belongs to. + */ + ISurfaceAllocator getSurfaceAllocator(int allocatorId); +} diff --git a/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/process/IProcessManager.aidl b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/process/IProcessManager.aidl new file mode 100644 index 0000000000..b75f317124 --- /dev/null +++ b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/process/IProcessManager.aidl @@ -0,0 +1,14 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.process; + +import org.mozilla.gecko.IGeckoEditableChild; +import org.mozilla.gecko.gfx.ISurfaceAllocator; + +interface IProcessManager { + void getEditableParent(in IGeckoEditableChild child, long contentId, long tabId); + // Returns the interface that child processes should use to allocate Surfaces. + ISurfaceAllocator getSurfaceAllocator(); +} diff --git a/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/util/GeckoBundle.aidl b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/util/GeckoBundle.aidl new file mode 100644 index 0000000000..f4c87dafb3 --- /dev/null +++ b/mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/util/GeckoBundle.aidl @@ -0,0 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.util; + +parcelable GeckoBundle; |