├── .github
├── labeler.yml
└── workflows
│ ├── deploy.yml
│ └── triage.yml
├── .gitignore
├── .pr-preview.json
├── CONTRIBUTING.md
├── LICENSE.md
├── Makefile
├── README.md
├── _minutes
├── 2021-06-24-wecg.md
├── 2021-07-08-wecg.md
├── 2021-07-22-wecg.md
├── 2021-08-05-wecg.md
├── 2021-08-19-wecg.md
├── 2021-09-02-wecg.md
├── 2021-09-16-wecg.md
├── 2021-09-30-wecg.md
├── 2021-10-14-wecg.md
├── 2021-10-28-wecg.md
├── 2021-11-11-wecg.md
├── 2021-12-09-wecg.md
├── 2022-01-06-wecg.md
├── 2022-01-20-wecg.md
├── 2022-02-03-wecg.md
├── 2022-02-17-wecg.md
├── 2022-03-03-wecg.md
├── 2022-03-17-wecg.md
├── 2022-03-31-wecg.md
├── 2022-04-14-wecg.md
├── 2022-04-28-wecg.md
├── 2022-05-12-wecg.md
├── 2022-05-26-wecg.md
├── 2022-06-09-wecg.md
├── 2022-06-23-wecg.md
├── 2022-07-07-wecg.md
├── 2022-07-21-wecg.md
├── 2022-08-04-wecg.md
├── 2022-08-18-wecg.md
├── 2022-09-01-wecg.md
├── 2022-09-15-wecg-tpac.md
├── 2022-09-15-wecg.md
├── 2022-09-29-wecg.md
├── 2022-10-13-wecg.md
├── 2022-10-27-wecg.md
├── 2022-11-10-wecg.md
├── 2022-11-15-wecg-userscripts.md
├── 2022-11-24-wecg.md
├── 2022-12-08-wecg.md
├── 2023-01-05-wecg.md
├── 2023-01-19-wecg.md
├── 2023-02-02-wecg.md
├── 2023-02-16-wecg.md
├── 2023-03-02-wecg.md
├── 2023-03-16-wecg.md
├── 2023-03-30-wecg.md
├── 2023-04-13-wecg.md
├── 2023-04-27-wecg.md
├── 2023-05-11-wecg.md
├── 2023-05-25-wecg.md
├── 2023-06-08-wecg.md
├── 2023-06-22-wecg.md
├── 2023-07-06-wecg.md
├── 2023-07-20-wecg.md
├── 2023-08-03-wecg.md
├── 2023-08-17-wecg.md
├── 2023-08-31-wecg.md
├── 2023-09-11-2023-09-14-tpac-extra.md
├── 2023-09-11-wecg-tpac.md
├── 2023-09-12-wecg-tpac.md
├── 2023-09-14-wecg.md
├── 2023-09-28-wecg.md
├── 2023-10-12-wecg.md
├── 2023-10-26-wecg.md
├── 2023-11-09-wecg.md
├── 2023-11-23-wecg.md
├── 2023-12-07-wecg.md
├── 2024-01-04-wecg.md
├── 2024-01-18-wecg.md
├── 2024-02-01-wecg.md
├── 2024-02-15-wecg.md
├── 2024-02-29-wecg.md
├── 2024-03-14-wecg.md
├── 2024-03-18-san-diego-meetup.md
├── 2024-03-19-san-diego-meetup.md
├── 2024-03-20-san-diego-meetup.md
├── 2024-03-28-wecg.md
├── 2024-04-11-wecg.md
├── 2024-04-25-wecg.md
├── 2024-05-09-wecg.md
├── 2024-05-23-wecg.md
├── 2024-06-06-wecg.md
├── 2024-06-20-wecg.md
├── 2024-07-04-wecg.md
├── 2024-07-18-wecg.md
├── 2024-08-01-wecg.md
├── 2024-08-15-wecg.md
├── 2024-08-29-wecg.md
├── 2024-09-12-wecg.md
├── 2024-09-23-wecg-tpac.md
├── 2024-09-24-wecg-tpac.md
├── 2024-09-26-wecg-tpac.md
├── 2024-09-26-wecg.md
├── 2024-09-27-wecg-tpac.md
├── 2024-10-10-wecg.md
├── 2024-10-24-wecg.md
├── 2024-11-07-wecg.md
├── 2024-11-21-wecg.md
├── 2024-12-05-wecg.md
├── 2024-12-19-wecg.md
├── 2025-01-16-wecg.md
├── 2025-01-30-wecg.md
├── 2025-02-13-wecg.md
├── 2025-02-27-wecg.md
├── 2025-03-13-wecg.md
├── 2025-03-25-berlin-f2f.md
├── 2025-03-26-berlin-f2f.md
├── 2025-03-27-berlin-f2f.md
├── 2025-03-27-wecg.md
├── 2025-03-28-berlin-f2f.md
├── 2025-04-10-wecg.md
├── 2025-04-24-wecg.md
├── 2025-05-08-wecg.md
├── 2025-05-22-wecg.md
├── 2025-06-05-wecg.md
├── README.md
└── export-minutes.html
├── charter.md
├── interfaces
├── chromium
│ ├── README.md
│ ├── chrome-common-extensions-api
│ │ ├── _api_features.json
│ │ ├── _manifest_features.json
│ │ ├── _permission_features.json
│ │ ├── accessibility_features.json
│ │ ├── action.json
│ │ ├── app.json
│ │ ├── appview_tag.idl
│ │ ├── bookmarks.json
│ │ ├── browser_action.json
│ │ ├── browsing_data.json
│ │ ├── certificate_provider.idl
│ │ ├── chrome_url_overrides.idl
│ │ ├── commands.json
│ │ ├── content_settings.json
│ │ ├── context_menus.json
│ │ ├── cookies.json
│ │ ├── debugger.json
│ │ ├── declarative_content.json
│ │ ├── desktop_capture.json
│ │ ├── devtools
│ │ │ ├── inspected_window.json
│ │ │ ├── network.json
│ │ │ ├── panels.json
│ │ │ └── recorder.json
│ │ ├── document_scan.idl
│ │ ├── dom.json
│ │ ├── downloads.idl
│ │ ├── enterprise_device_attributes.idl
│ │ ├── enterprise_hardware_platform.idl
│ │ ├── enterprise_networking_attributes.idl
│ │ ├── enterprise_platform_keys.idl
│ │ ├── extension.json
│ │ ├── file_browser_handler.json
│ │ ├── file_system_provider.idl
│ │ ├── font_settings.json
│ │ ├── gcm.json
│ │ ├── history.json
│ │ ├── identity.idl
│ │ ├── idltest.idl
│ │ ├── input_ime.json
│ │ ├── instance_id.json
│ │ ├── login.idl
│ │ ├── login_screen_storage.idl
│ │ ├── login_screen_ui.idl
│ │ ├── login_state.idl
│ │ ├── manifest_types.json
│ │ ├── mdns.idl
│ │ ├── notifications.idl
│ │ ├── omnibox.json
│ │ ├── page_action.json
│ │ ├── page_capture.json
│ │ ├── permissions.json
│ │ ├── platform_keys.idl
│ │ ├── printing.idl
│ │ ├── printing_metrics.idl
│ │ ├── privacy.json
│ │ ├── processes.idl
│ │ ├── proxy.json
│ │ ├── scripting.idl
│ │ ├── search.idl
│ │ ├── sessions.json
│ │ ├── side_panel.idl
│ │ ├── system_indicator.idl
│ │ ├── system_log.idl
│ │ ├── tab_capture.idl
│ │ ├── tab_groups.json
│ │ ├── tabs.json
│ │ ├── top_sites.json
│ │ ├── tts.json
│ │ ├── tts_engine.json
│ │ ├── types.json
│ │ ├── vpn_provider.idl
│ │ ├── wallpaper.json
│ │ ├── web_authentication_proxy.idl
│ │ ├── web_navigation.json
│ │ ├── webview_tag.json
│ │ └── windows.json
│ └── extensions-common-api
│ │ ├── _api_features.json
│ │ ├── _behavior_features.json
│ │ ├── _manifest_features.json
│ │ ├── _permission_features.json
│ │ ├── alarms.idl
│ │ ├── app_runtime.idl
│ │ ├── app_window.idl
│ │ ├── audio.idl
│ │ ├── automation.idl
│ │ ├── bluetooth.idl
│ │ ├── bluetooth_low_energy.idl
│ │ ├── bluetooth_socket.idl
│ │ ├── clipboard.idl
│ │ ├── content_scripts.idl
│ │ ├── cross_origin_isolation.idl
│ │ ├── declarative_net_request.idl
│ │ ├── declarative_web_request.json
│ │ ├── diagnostics.idl
│ │ ├── dns.idl
│ │ ├── events.json
│ │ ├── extension_types.json
│ │ ├── extensions_manifest_types.json
│ │ ├── file_handlers.idl
│ │ ├── file_system.idl
│ │ ├── hid.idl
│ │ ├── i18n.json
│ │ ├── idle.json
│ │ ├── incognito.json
│ │ ├── lock_screen_data.idl
│ │ ├── management.json
│ │ ├── networking_onc.idl
│ │ ├── oauth2.idl
│ │ ├── offscreen.idl
│ │ ├── power.idl
│ │ ├── printer_provider.idl
│ │ ├── requirements.json
│ │ ├── runtime.json
│ │ ├── serial.idl
│ │ ├── shared_module.idl
│ │ ├── socket.idl
│ │ ├── sockets_tcp.idl
│ │ ├── sockets_tcp_server.idl
│ │ ├── sockets_udp.idl
│ │ ├── storage.json
│ │ ├── system_cpu.idl
│ │ ├── system_display.idl
│ │ ├── system_memory.idl
│ │ ├── system_network.idl
│ │ ├── system_storage.idl
│ │ ├── test.json
│ │ ├── usb.idl
│ │ ├── virtual_keyboard.idl
│ │ ├── web_accessible_resources.idl
│ │ ├── web_accessible_resources_mv2.idl
│ │ ├── web_request.json
│ │ └── web_view_request.json
└── safari
│ ├── WebExtensionAPIAction.idl
│ ├── WebExtensionAPIAlarms.idl
│ ├── WebExtensionAPICommands.idl
│ ├── WebExtensionAPIContextMenus.idl
│ ├── WebExtensionAPICookies.idl
│ ├── WebExtensionAPIDeclarativeNetRequest.idl
│ ├── WebExtensionAPIDevTools.idl
│ ├── WebExtensionAPIDevToolsElementsPanel.idl
│ ├── WebExtensionAPIDevToolsExtensionPanel.idl
│ ├── WebExtensionAPIDevToolsExtensionSidebarPane.idl
│ ├── WebExtensionAPIDevToolsInspectedWindow.idl
│ ├── WebExtensionAPIDevToolsNetwork.idl
│ ├── WebExtensionAPIDevToolsPanels.idl
│ ├── WebExtensionAPIEvent.idl
│ ├── WebExtensionAPIExtension.idl
│ ├── WebExtensionAPILocalization.idl
│ ├── WebExtensionAPINamespace.idl
│ ├── WebExtensionAPINotifications.idl
│ ├── WebExtensionAPIPermissions.idl
│ ├── WebExtensionAPIPort.idl
│ ├── WebExtensionAPIRuntime.idl
│ ├── WebExtensionAPIScripting.idl
│ ├── WebExtensionAPIStorage.idl
│ ├── WebExtensionAPIStorageArea.idl
│ ├── WebExtensionAPITabs.idl
│ ├── WebExtensionAPIWebNavigation.idl
│ ├── WebExtensionAPIWebNavigationEvent.idl
│ ├── WebExtensionAPIWebPageNamespace.idl
│ ├── WebExtensionAPIWebPageRuntime.idl
│ ├── WebExtensionAPIWebRequest.idl
│ ├── WebExtensionAPIWebRequestEvent.idl
│ ├── WebExtensionAPIWindows.idl
│ └── WebExtensionAPIWindowsEvent.idl
├── memo
└── persistence-of-states.md
├── proposals
├── README.md
├── action-on-user-settings-changed-api.md
├── assets
│ ├── permissions-addHostAccessRequest-chrome-menu.png
│ └── permissions-addHostAccessRequest-chrome-toolbar.png
├── dark_mode_extension_icons.md
├── hasCrossSiteAncestor.md
├── i18n-system-languages.md
├── manifest_trial_tokens.md
├── multiple_user_script_worlds.md
├── permissions-addHostAccessRequest-api.md
├── proposal_process.md
├── proposal_template.md
├── reading_list.md
├── runtime_get_contexts.md
├── runtime_on_invalidated.md
├── runtime_on_load_on_enabled_events.md
├── secure-storage-mock.js
├── secure-storage.md
├── storage-get-keys.md
├── user-scripts-api.md
└── user-scripts-execute-api.md
├── specification
├── index.bs
├── webdriver-classic.bs
└── window.browser.bs
└── w3c.json
/.github/labeler.yml:
--------------------------------------------------------------------------------
1 | # Add a 'needs triage' label for each browser engine to all new issues
2 | "needs-triage: chrome":
3 | - ""
4 |
5 | "needs-triage: safari":
6 | - ""
7 |
8 | "needs-triage: firefox":
9 | - ""
10 |
11 |
--------------------------------------------------------------------------------
/.github/workflows/deploy.yml:
--------------------------------------------------------------------------------
1 | # This is a basic workflow to help you get started with Actions
2 |
3 | name: CI
4 |
5 | # Controls when the workflow will run
6 | on:
7 | # Triggers the workflow on push or pull request events but only for the main branch
8 | push:
9 | branches: [ main ]
10 | paths-ignore:
11 | - '_minutes/**'
12 | pull_request:
13 | branches: [ main ]
14 | paths-ignore:
15 | - '_minutes/**'
16 |
17 | # Allows you to run this workflow manually from the Actions tab
18 | workflow_dispatch:
19 |
20 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel
21 | jobs:
22 | # This workflow contains a single job called "main"
23 | main:
24 | name: Build, Validate, and Deploy
25 | # The type of runner that the job will run on
26 | runs-on: ubuntu-latest
27 |
28 | strategy:
29 | matrix:
30 | include:
31 | - name: specification
32 | source: ./specification/index.bs
33 | - name: webdriver-classic
34 | source: ./specification/webdriver-classic.bs
35 | - name: window-browser
36 | source: ./specification/window.browser.bs
37 |
38 | # Steps represent a sequence of tasks that will be executed as part of the job
39 | steps:
40 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
41 | - uses: actions/checkout@v4
42 |
43 | # Runs a set of commands using the spec-prod (https://w3c.github.io/spec-prod/)
44 | # the document is built and validated as a check in the pull request.
45 | # the document is built and validated, and then deployed to gh-pages branch, when a commit is pushed to the main branch.
46 | - uses: w3c/spec-prod@v2
47 | with:
48 | GH_PAGES_BRANCH: gh-pages
49 | # Deployment will be available at: https://w3c.github.io/webextensions/specification
50 | SOURCE: ${{ matrix.source }}
51 | TOOLCHAIN: 'bikeshed'
52 | ARTIFACT_NAME: ${{ matrix.name }}
53 |
--------------------------------------------------------------------------------
/.github/workflows/triage.yml:
--------------------------------------------------------------------------------
1 | name: "Needs Triage"
2 | on:
3 | issues:
4 | types: [opened]
5 |
6 | jobs:
7 | triage:
8 | if: github.event.issue.labels[0] == null
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: github/issue-labeler@v3.4
12 | with:
13 | repo-token: "${{ secrets.GITHUB_TOKEN }}"
14 | configuration-path: .github/labeler.yml
15 | enable-versioned-regex: 0
16 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | index.html
2 |
--------------------------------------------------------------------------------
/.pr-preview.json:
--------------------------------------------------------------------------------
1 | {
2 | "src_file": "specification/index.bs",
3 | "type": "bikeshed"
4 | }
5 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to the W3C WebExtensions Community Group
2 |
3 | This document describes how the WebExtensions Community Group (WECG) works and how interested parties can contribute.
4 |
5 | ## Code of Conduct
6 |
7 | As a W3C Community Group, the WECG operates under the W3C's [Code of Ethics and Professional Conduct][w3c-code-of-conduct].
8 |
9 | ## Getting started
10 |
11 | Interested in participating? We suggest you start by:
12 |
13 | 1. Familiarizing yourself with the [Code of Ethics and Professional Conduct][w3c-code-of-conduct].
14 | 2. [Joining the group][wecg-join] (you will need a [W3C account][w3c-new-account]).
15 | 3. Looking through the [open issues][wecg-issues].
16 | 4. Joining the [WECG chat room][join-chat].
17 |
18 | W3C membership is required because it provides the legal framework that protects the work in this repository.
19 |
20 | ## Joining Chat
21 |
22 | This group uses a [Matrix][matrix-site] room hosted by Mozilla for chat. If you're new to Matrix, we recommend reading Mozilla's [wiki entry on Matrix][moz-wiki-matrix] to get started.
23 |
24 | Once you have a Matrix client set up, you can join our room using the below address in your client.
25 |
26 | ```
27 | #wecg:mozilla.org
28 | ```
29 |
30 | ## How we work
31 |
32 | All WECG-related work currently takes place in the [web-extensions repository][wecg-repo] on GitHub.
33 |
34 | The issue tracker tracks specific issues and long-running discussions for topics of interest to the members of the WECG.
35 |
36 | We meet virtually every other week, with the schedule and past meeting notes listed in [`_minutes/README.md`](_minutes/README.md).
37 | During these meetings, we check in on newly reported issues, existing issues and any other open discussion topics that have been added to the agenda.
38 | After the end of each meeting, its minutes are submitted via a pull request that also links the discussed issues for visibility.
39 |
40 | Outside the live meetings, [the chat][join-chat] is available to continue discussions.
41 |
42 | We are still working on establishing a process on creating the deliverables as stated in [the charter document](charter.md). Once that process matures, it will be documented here.
43 |
44 | ## Reporting
45 |
46 | Beyond posts needing moderator attention in chat, if you experience any violations to the Code of Conduct by any participant, please contact the Chairs or the W3C Head of Communications ([Coralie Mercier][email-coralie]).
47 |
48 | ## Proposing an API Change
49 |
50 | If you would like to file a feature request or propose an API change, the first
51 | step is likely to [file a new issue](https://github.com/w3c/webextensions/issues/new)
52 | to solicit feedback. If there is general support on the issue, the next step is
53 | to write up a full API proposal following the process documented
54 | [here](proposals/proposal_process.md).
55 |
56 | [email-coralie]: mailto:coralie@w3.org
57 | [join-chat]: #joining-chat
58 | [matrix-site]: https://matrix.org/
59 | [moz-wiki-matrix]: https://wiki.mozilla.org/Matrix
60 | [w3c-code-of-conduct]: https://www.w3.org/Consortium/cepc/
61 | [w3c-new-account]: https://www.w3.org/accounts/request
62 | [wecg-issues]: https://github.com/w3c/web-extensions/issues
63 | [wecg-join]: https://www.w3.org/community/webextensions/join
64 | [wecg-repo]: https://github.com/w3c/webextensions
65 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | All Reports in this Repository are licensed by Contributors
2 | under the
3 | [W3C Software and Document License](http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document).
4 |
5 | Contributions to Specifications are made under the
6 | [W3C CLA](https://www.w3.org/community/about/agreements/cla/).
7 |
8 | Contributions to Test Suites are made under the
9 | [W3C 3-clause BSD License](https://www.w3.org/Consortium/Legal/2008/03-bsd-license.html)
10 |
11 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: clean update-charter-toc
2 |
3 | update-charter-toc: charter.md
4 | doctoc --title "## Table of Contents" $<
5 |
6 | clean:
7 | rm -f *~
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | The charter of the WebExtensions Community Group (WECG).
2 |
3 | 🏅 Charter: https://github.com/w3c/webextensions/blob/main/charter.md
4 |
5 | 🌐 WECG at W3C: https://www.w3.org/community/webextensions/
6 |
7 | 📆 WECG calendar: https://www.w3.org/groups/cg/webextensions/calendar/
8 |
9 | 📝 Minutes of meetings: https://github.com/w3c/webextensions/tree/main/_minutes
10 |
11 | 💪 Contributing guidelines: [CONTRIBUTING.md](CONTRIBUTING.md)
12 |
--------------------------------------------------------------------------------
/_minutes/2024-10-24-wecg.md:
--------------------------------------------------------------------------------
1 | # WECG Meetings 2024, Public Notes, Oct 24
2 |
3 | * Chair: Simeon Vincent
4 | * Scribes: Rob Wu
5 |
6 | Time: 8 AM PDT = https://everytimezone.com/?t=67198e00,384
7 | Call-in details: [WebExtensions CG, 24th October 2024](https://www.w3.org/events/meetings/a97adab8-e1ae-4a2b-85cf-e6b6d3d35f00/20241024T080000/)
8 | Zoom issues? Ping @zombie (Tomislav Jovanovic) in [chat](https://github.com/w3c/webextensions/blob/main/CONTRIBUTING.md#joining-chat)
9 |
10 |
11 | ## Agenda: [discussion in #709](https://github.com/w3c/webextensions/issues/709), [github issues](https://github.com/w3c/webextensions/issues)
12 |
13 | The meeting will start at 3 minutes after the hour.
14 |
15 | See [issue 531](https://github.com/w3c/webextensions/issues/531) for an explanation of this agenda format.
16 |
17 | * **Announcements** (2 minutes)
18 | * MEETING CANCELED, MOST FOLKS ARE OUT (AD-FILTERING DEV SUMMIT)
19 | * **Triage** (15 minutes)
20 | * (topics will move to the 7 nov meeting)
21 | * [Issue 708](https://github.com/w3c/webextensions/issues/708): Cache Partitioning, HTTP Cache Management, and Conditional DNR Rule Application
22 | * [Issue 711](https://github.com/w3c/webextensions/issues/711): Proposal: Enable changing the permissions for only new user
23 | * **Timely issues** (10 minutes)
24 | * **Check-in on existing issues** (20 minutes)
25 |
26 |
27 | ## Attendees (sign yourself in)
28 |
29 | 1. Rob Wu (Mozilla)
30 | 2. Tomislav Jovanovic (Mozilla)
31 |
32 |
33 | ## Meeting notes
34 |
35 | Meeting canceled
36 |
37 | * [rob] Many of the usual Google and Mozilla representatives are currently absent because they are at the [Ad Filtering Dev Summit](https://adfilteringdevsummit.com/). At this exact time, Google folks are presenting “What's new in Chrome”. These sessions are recorded and will be published to Eyeo's YouTube channel.
38 | * [tomislav] Canceled due to most folks being out.
39 |
40 | The next meeting will be on [Thursday, November 7th, 8 AM PST (4 PM UTC)](https://everytimezone.com/?t=672c0300,3c0). Warning: daylight saving time changes between today and the next meeting. Still 5 PM in Europe.
41 |
--------------------------------------------------------------------------------
/interfaces/chromium/README.md:
--------------------------------------------------------------------------------
1 | Chromium extension interface data was collected at 2023-03-03T19:05:00.000Z.
2 |
3 | | Subdirectory | Chromium source view | Directory archive |
4 | | --- | --- | --- |
5 | [extensions-common-api](extensions-common-api) | [common/apps/platform_apps/api](https://source.chromium.org/chromium/chromium/src/+/main:extensions/common/api/) | [download](https://chromium.googlesource.com/chromium/src/+archive/HEAD/extensions/common/api.tar.gz) |
6 | [chrome-common-extensions-api](chrome-common-extensions-api) | [chrome/common/extensions/api](https://source.chromium.org/chromium/chromium/src/+/main:chrome/common/extensions/api) | [download](https://chromium.googlesource.com/chromium/src/+archive/HEAD/chrome/common/extensions/api.tar.gz) |
7 |
8 | Subdirectories of this folder contain the JSON and IDL files the Chromium project uses to define the extension platform APIs it exposes to developers. The names of these directories are based on where these files were located in the Chromium repository, where path separators (`/`) are replaced by dashes (`-`).
9 |
10 | 1. Download the `.tar.giz` archive for each directory.
11 | 2. Extract each `.tar.gz` file to the `interfaces/chromium` directory in this repo.
12 | 3. CD into the `interfaces/chromium` directory
13 | 4. Remove all files except those with a `json` or `idl` extension.
14 | * Use the following Bash command or appropriate equivalent
15 |
16 | ```bash
17 | find -E . -type f -not -iregex ".*\.(json|idl)" -exec rm {} \;
18 | ```
19 | 5. Remove all private and internal files.
20 | * Use the following Bash command or appropriate equivalent.
21 |
22 | ```bash
23 | find -E . -type f -iregex ".*_(private|internal)\.(json|idl)" -exec rm {} \;
24 | ```
25 |
26 | For information on the Chromium project's extension interface definitions, see https://source.chromium.org/chromium/chromium/src/+/main:chrome/common/extensions/api/_features.md
27 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/app.json:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | [
6 | {
7 | "namespace": "app",
8 | "description": "none",
9 | "types": [
10 | {
11 | "id": "Details",
12 | "description": "TODO (it's a manifest)",
13 | "type": "object",
14 | "properties": {},
15 | "additionalProperties": { "type": "any" }
16 | },
17 | {
18 | "id": "DOMWindow",
19 | "type": "object",
20 | "properties": {},
21 | "additionalProperties": { "type": "any" }
22 | },
23 | {
24 | "id": "InstallState",
25 | "type": "string",
26 | "enum": ["not_installed", "installed", "disabled"]
27 | },
28 | {
29 | "id": "RunningState",
30 | "type": "string",
31 | "enum": ["running", "cannot_run", "ready_to_run"]
32 | }
33 | ],
34 | "functions": [
35 | {
36 | "name": "getIsInstalled",
37 | "description": "TODO",
38 | "type": "function",
39 | "parameters": [],
40 | "returns": {
41 | "name": "isInstalled",
42 | "description": "TODO",
43 | "type": "boolean"
44 | }
45 | },
46 | {
47 | "name": "installState",
48 | "description": "TODO",
49 | "type": "function",
50 | "parameters": [],
51 | "returns_async": {
52 | "name": "callback",
53 | "parameters": [
54 | {
55 | "$ref": "InstallState",
56 | "name": "state"
57 | }
58 | ]
59 | }
60 | },
61 | {
62 | "name": "runningState",
63 | "description": "TODO",
64 | "type": "function",
65 | "parameters": [],
66 | "returns": {
67 | "$ref": "RunningState"
68 | }
69 | },
70 | {
71 | "name": "getDetails",
72 | "description": "TODO",
73 | "type": "function",
74 | "parameters": [],
75 | "returns": {
76 | "$ref": "Details",
77 | "optional": true,
78 | "description": "TODO"
79 | }
80 | }
81 | ]
82 | }
83 | ]
84 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/appview_tag.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Use the
6 | // The API that can be used by an app to create and manage data on the
7 | // Chrome OS lock screen.
8 | //
10 | // The API usability will depend on the user session state:
11 | // appview
tag to embed other Chrome Apps within your
6 | // Chrome App. (see Usage).
7 | [documentation_title="chrome.devtools.network
API to retrieve the information about network requests displayed by the Developer Tools in the Network panel.",
9 | "nocompile": true,
10 | "types": [
11 | {
12 | "id": "Request",
13 | "type": "object",
14 | "description": "Represents a network request for a document resource (script, image and so on). See HAR Specification for reference.",
15 | "functions": [
16 | {
17 | "name": "getContent",
18 | "type": "function",
19 | "description": "Returns content of the response body.",
20 | "parameters": [
21 | {
22 | "name": "callback",
23 | "type": "function",
24 | "description": "A function that receives the response body when the request completes.",
25 | "parameters": [
26 | {
27 | "name": "content",
28 | "type": "string",
29 | "description": "Content of the response body (potentially encoded)."
30 | },
31 | {
32 | "name": "encoding",
33 | "type": "string",
34 | "description": "Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported."
35 | }
36 | ]
37 | }
38 | ]
39 | }
40 | ]
41 | }
42 | ],
43 | "functions": [
44 | {
45 | "name": "getHAR",
46 | "type": "function",
47 | "description": "Returns HAR log that contains all known network requests.",
48 | "parameters": [
49 | {
50 | "name": "callback",
51 | "type": "function",
52 | "description": "A function that receives the HAR log when the request completes.",
53 | "parameters": [
54 | {
55 | "name": "harLog",
56 | "type": "object",
57 | "additionalProperties": {"type": "any"},
58 | "description": "A HAR log. See HAR specification for details."
59 | }
60 | ]
61 | }
62 | ]
63 | }
64 | ],
65 | "events": [
66 | {
67 | "name": "onRequestFinished",
68 | "type": "function",
69 | "description": "Fired when a network request is finished and all request data are available.",
70 | "parameters": [
71 | { "name": "request", "$ref": "Request", "description": "Description of a network request in the form of a HAR entry. See HAR specification for details." }
72 | ]
73 | },
74 | {
75 | "name": "onNavigated",
76 | "type": "function",
77 | "description": "Fired when the inspected window navigates to a new page.",
78 | "parameters": [
79 | {
80 | "name": "url",
81 | "type": "string",
82 | "description": "URL of the new page."
83 | }
84 | ]
85 | }
86 | ]
87 | }
88 | ]
89 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/devtools/recorder.json:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | [
6 | {
7 | "namespace": "devtools.recorder",
8 | "description": "Use the chrome.devtools.recorder
API to customize the Recorder panel in DevTools.",
9 | "nocompile": true,
10 | "types": [
11 | {
12 | "id": "RecorderExtensionPlugin",
13 | "type": "object",
14 | "description": "A plugin interface that the Recorder panel invokes to customize the Recorder panel.",
15 | "functions": [
16 | {
17 | "name": "stringify",
18 | "type": "function",
19 | "optional": true,
20 | "description": "Converts a recording from the Recorder panel format into a string.",
21 | "parameters": [
22 | {
23 | "name": "recording",
24 | "type": "object",
25 | "description": "A recording of the user interaction with the page. This should match Puppeteer's recording schema."
26 | }
27 | ]
28 | },
29 | {
30 | "name": "stringifyStep",
31 | "type": "function",
32 | "optional": true,
33 | "description": "Converts a step of the recording from the Recorder panel format into a string.",
34 | "parameters": [
35 | {
36 | "name": "step",
37 | "type": "object",
38 | "description": "A step of the recording of a user interaction with the page. This should match Puppeteer's step schema."
39 | }
40 | ]
41 | },
42 | {
43 | "name": "replay",
44 | "type": "function",
45 | "optional": true,
46 | "description": "Allows the extension to implement custom replay functionality.",
47 | "parameters": [
48 | {
49 | "name": "recording",
50 | "type": "object",
51 | "description": "A recording of the user interaction with the page. This should match Puppeteer's recording schema."
52 | }
53 | ]
54 | }
55 | ]
56 | },
57 | {
58 | "id": "RecorderView",
59 | "type": "object",
60 | "description": "Represents a view created by extension to be embedded inside the Recorder panel.",
61 | "functions": [
62 | {
63 | "name": "show",
64 | "description": "Indicates that the extension wants to show this view in the Recorder panel.",
65 | "parameters": []
66 | }
67 | ],
68 | "events": [
69 | {
70 | "name": "onShown",
71 | "type": "function",
72 | "description": "Fired when the view is shown."
73 | },
74 | {
75 | "name": "onHidden",
76 | "type": "function",
77 | "description": "Fired when the view is hidden."
78 | }
79 | ]
80 | }
81 | ],
82 | "functions": [
83 | {
84 | "name": "registerRecorderExtensionPlugin",
85 | "type": "function",
86 | "description": "Registers a Recorder extension plugin.",
87 | "parameters": [
88 | {
89 | "name": "plugin",
90 | "$ref": "RecorderExtensionPlugin",
91 | "description": "An instance implementing the RecorderExtensionPlugin interface."
92 | },
93 | {
94 | "name": "name",
95 | "type": "string",
96 | "description": "The name of the plugin."
97 | },
98 | {
99 | "name": "mediaType",
100 | "type": "string",
101 | "description": "The media type of the string content that the plugin produces."
102 | }
103 | ]
104 | },
105 | {
106 | "name": "createView",
107 | "type": "function",
108 | "description": "Creates a view that can handle the replay. This view will be embedded inside the Recorder panel.",
109 | "parameters": [
110 | {
111 | "name": "title",
112 | "type": "string",
113 | "description": "Title that is displayed next to the extension icon in the Developer Tools toolbar."
114 | },
115 | {
116 | "name": "pagePath",
117 | "type": "string",
118 | "description": "Path of the panel's HTML page relative to the extension directory."
119 | }
120 | ],
121 | "returns": { "$ref": "RecorderView" }
122 | }
123 | ]
124 | }
125 | ]
126 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/document_scan.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Use the chrome.documentScan
API to discover and retrieve
6 | // images from attached paper document scanners.
7 | [platforms=("chromeos", "lacros"),
8 | implemented_in="chrome/browser/extensions/api/document_scan/document_scan_api.h"]
9 | namespace documentScan {
10 | dictionary ScanOptions {
11 | // The MIME types that are accepted by the caller.
12 | DOMString[]? mimeTypes;
13 |
14 | // The number of scanned images allowed (defaults to 1).
15 | long? maxImages;
16 | };
17 |
18 | dictionary ScanResults {
19 | // The data image URLs in a form that can be passed as the "src" value to
20 | // an image tag.
21 | DOMString[] dataUrls;
22 |
23 | // The MIME type of dataUrls
.
24 | DOMString mimeType;
25 | };
26 |
27 | // Callback from the scan
method.
28 | // |result| The results from the scan, if successful.
29 | // Otherwise will return null and set runtime.lastError.
30 | callback ScanCallback = void (ScanResults result);
31 |
32 | interface Functions {
33 | // Performs a document scan. On success, the PNG data will be
34 | // sent to the callback.
35 | // |options| : Object containing scan parameters.
36 | // |callback| : Called with the result and data from the scan.
37 | [supportsPromises] static void scan(ScanOptions options,
38 | ScanCallback callback);
39 | };
40 | };
41 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/dom.json:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | [
6 | {
7 | "namespace": "dom",
8 | "description": "Use the chrome.dom
API to access special DOM APIs for Extensions",
9 | "functions": [
10 | {
11 | "name": "openOrClosedShadowRoot",
12 | "description": "Gets the open shadow root or the closed shadow root hosted by the specified element. If the element doesn't attach the shadow root, it will return null.",
13 | "type": "function",
14 | "parameters": [
15 | {
16 | "name": "element",
17 | "type": "object",
18 | "isInstanceOf": "HTMLElement",
19 | "additionalProperties": { "type": "any" }
20 | }
21 | ],
22 | "returns": {
23 | "name": "shadowRoot",
24 | "description": "See https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot",
25 | "type": "object",
26 | "additionalProperties": { "type": "any" }
27 | }
28 | }
29 | ]
30 | }
31 | ]
32 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/enterprise_device_attributes.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Use the chrome.enterprise.deviceAttributes
API to read device
6 | // attributes.
7 | // Note: This API is only available to extensions force-installed by enterprise
8 | // policy.
9 | namespace enterprise.deviceAttributes {
10 | callback GetDirectoryDeviceIdCallback = void (DOMString deviceId);
11 |
12 | callback GetDeviceSerialNumberCallback = void (DOMString serialNumber);
13 |
14 | callback GetDeviceAssetIdCallback = void (DOMString assetId);
15 |
16 | callback GetDeviceAnnotatedLocationCallback = void (DOMString annotatedLocation);
17 |
18 | callback GetDeviceHostnameCallback = void (DOMString hostname);
19 |
20 | interface Functions {
21 | // Fetches the value of
22 | // the device identifier of the directory API,
23 | // that is generated by the server and identifies the cloud record of the
24 | // device for querying in the cloud directory API.
25 | // If the current user is not affiliated, returns an empty string.
26 | // |callback| : Called with the device identifier of the directory API when
27 | // received.
28 | [supportsPromises] void getDirectoryDeviceId(
29 | GetDirectoryDeviceIdCallback callback);
30 |
31 | // Fetches the device's serial number. Please note the purpose of this API
32 | // is to administrate the device (e.g. generating Certificate Sign Requests
33 | // for device-wide certificates). This API may not be used for tracking
34 | // devices without the consent of the device's administrator.
35 | // If the current user is not affiliated, returns an empty string.
36 | // |callback| : Called with the serial number of the device.
37 | [supportsPromises] void getDeviceSerialNumber(
38 | GetDeviceSerialNumberCallback callback);
39 |
40 | // Fetches the administrator-annotated Asset Id.
41 | // If the current user is not affiliated or no Asset Id has been set by the
42 | // administrator, returns an empty string.
43 | // |callback| : Called with the Asset ID of the device.
44 | [supportsPromises] void getDeviceAssetId(GetDeviceAssetIdCallback callback);
45 |
46 | // Fetches the administrator-annotated Location.
47 | // If the current user is not affiliated or no Annotated Location has been
48 | // set by the administrator, returns an empty string.
49 | // |callback| : Called with the Annotated Location of the device.
50 | [supportsPromises] void getDeviceAnnotatedLocation(
51 | GetDeviceAnnotatedLocationCallback callback);
52 |
53 | // Fetches the device's hostname as set by DeviceHostnameTemplate policy.
54 | // If the current user is not affiliated or no hostname has been set by the
55 | // enterprise policy, returns an empty string.
56 | // |callback| : Called with hostname of the device.
57 | [supportsPromises] void getDeviceHostname(
58 | GetDeviceHostnameCallback callback);
59 | };
60 |
61 | };
62 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/enterprise_hardware_platform.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Use the chrome.enterprise.hardwarePlatform
API to get the
6 | // manufacturer and model of the hardware platform where the browser runs.
7 | // Note: This API is only available to extensions installed by enterprise
8 | // policy.
9 | namespace enterprise.hardwarePlatform {
10 | dictionary HardwarePlatformInfo {
11 | DOMString model;
12 | DOMString manufacturer;
13 | };
14 |
15 | callback HardwarePlatformInfoCallback = void(HardwarePlatformInfo info);
16 |
17 | interface Functions {
18 | // Obtains the manufacturer and model for the hardware platform and, if
19 | // the extension is authorized, returns it via |callback|.
20 | // |callback|: Called with the hardware platform info.
21 | [supportsPromises] static void getHardwarePlatformInfo(
22 | HardwarePlatformInfoCallback callback);
23 | };
24 | };
25 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/enterprise_networking_attributes.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Use the chrome.enterprise.networkingAttributes
API to read
6 | // information about your current network.
7 | // Note: This API is only available to extensions force-installed by enterprise
8 | // policy.
9 | [platforms = ("chromeos", "lacros"),
10 | implemented_in = "chrome/browser/extensions/api/enterprise_networking_attributes/enterprise_networking_attributes_api.h"]
11 | namespace enterprise.networkingAttributes {
12 | [noinline_doc] dictionary NetworkDetails {
13 | // The device's MAC address.
14 | DOMString macAddress;
15 |
16 | // The device's local IPv4 address (undefined if not configured).
17 | DOMString? ipv4;
18 |
19 | // The device's local IPv6 address (undefined if not configured).
20 | DOMString? ipv6;
21 | };
22 |
23 | callback GetNetworkDetailsCallback = void(NetworkDetails networkAddresses);
24 |
25 | interface Functions {
26 | // Retrieves the network details of the device's default network.
27 | // If the user is not affiliated or the device is not connected to a
28 | // network, $(ref:runtime.lastError) will be set with a failure reason.
29 | // |callback| : Called with the device's default network's
30 | // $(ref:NetworkDetails).
31 | [supportsPromises] void getNetworkDetails(
32 | GetNetworkDetailsCallback callback);
33 | };
34 | };
35 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/file_browser_handler.json:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | [
6 | {
7 | "namespace":"fileBrowserHandler",
8 | "description": "Use the chrome.fileBrowserHandler
API to extend the Chrome OS file browser. For example, you can use this API to enable users to upload files to your website.",
9 | "types": [
10 | {
11 | "id": "FileHandlerExecuteEventDetails",
12 | "type": "object",
13 | "description": "Event details payload for fileBrowserHandler.onExecute event.",
14 | "properties": {
15 | "entries": {
16 | "type": "array",
17 | "items": { "type": "any" },
18 | "description": "Array of Entry instances representing files that are targets of this action (selected in ChromeOS file browser)."
19 | },
20 | "tab_id" : {
21 | "type": "integer",
22 | "optional": true,
23 | "description": "The ID of the tab that raised this event. Tab IDs are unique within a browser session."
24 | }
25 | }
26 | }
27 | ],
28 |
29 | "events": [
30 | {
31 | "name": "onExecute",
32 | "type": "function",
33 | "description": "Fired when file system action is executed from ChromeOS file browser.",
34 | "parameters": [
35 | {
36 | "name": "id",
37 | "type": "string",
38 | "description": "File browser action id as specified in the listener component's manifest."
39 | },
40 | {
41 | "name": "details",
42 | "$ref": "FileHandlerExecuteEventDetails",
43 | "description": "File handler execute event details."
44 | }
45 | ]
46 | }
47 | ]
48 | }
49 | ]
50 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/idltest.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // An API to test IDL schema specifications.
6 | namespace idltest {
7 |
8 | callback LongArrayCallback = void(long[] array);
9 | callback ArrayBufferCallback = void(ArrayBuffer buffer);
10 |
11 | interface Functions {
12 | // Functions for testing binary data request/response parameters. The first
13 | // two just return back the bytes they were passed in an array.
14 | [supportsPromises] static void sendArrayBuffer(ArrayBuffer input,
15 | LongArrayCallback callback);
16 |
17 | // TODO(asargent) - we currently can't have [instanceOf=ArrayBufferView],
18 | // I think because ArrayBufferView isn't an instantiable type. The best
19 | // we might be able to do is have a 'choices' list including all the
20 | // typed array subclasses like Uint8Array, Uint16Array, Float32Array, etc.
21 | [supportsPromises] static void sendArrayBufferView(
22 | [instanceOf=Uint8Array] ArrayBufferView input,
23 | LongArrayCallback callback);
24 | [supportsPromises] static void getArrayBuffer(ArrayBufferCallback callback);
25 |
26 | // This function should not have C++ code autogenerated (the variable name
27 | // |switch| should cause compile errors if it does). But the name should
28 | // get defined and made visible from within extensions/apps code.
29 | [nocompile] static void nocompileFunc(long switch);
30 | };
31 |
32 | };
33 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/login_screen_storage.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Use the chrome.loginScreenStorage
API to store persistent data
6 | // from the login screen or inject data into the session.
7 | [platforms=("chromeos", "lacros"),
8 | implemented_in="chrome/browser/chromeos/extensions/login_screen/login_screen_storage/login_screen_storage_api.h"]
9 | namespace loginScreenStorage {
10 | callback StoreCallback = void ();
11 | callback RetrieveCallback = void (DOMString data);
12 |
13 | interface Functions {
14 | // Stores persistent data from the login screen. This data can be accessed
15 | // later using $(ref:retrievePersistentData) by any extension from the
16 | // specified extension ids. This method will fail if called while a user
17 | // session is active.
18 | // |extensionIds|: IDs of the extensions that should have access to the
19 | // stored data.
20 | // |data|: The data to store.
21 | [supportsPromises] static void storePersistentData(DOMString[] extensionIds,
22 | DOMString data,
23 | StoreCallback callback);
24 |
25 | // Retrieves persistent data that was previously stored using
26 | // $(ref:storePersistentData) for the caller's extension ID.
27 | // |ownerId|: ID of the extension that saved the data that the caller is
28 | // trying to retrieve.
29 | [supportsPromises] static void retrievePersistentData(
30 | DOMString ownerId,
31 | RetrieveCallback callback);
32 |
33 | // Stores credentials for later access from the user session. This method
34 | // will fail if called while a user session is active.
35 | // |extensionId|: ID of the in-session extension that should have access to
36 | // these credentials. Credentials stored using this method are deleted on
37 | // session exit.
38 | // |credentials|: The credentials to store.
39 | [supportsPromises] static void storeCredentials(DOMString extensionId,
40 | DOMString credentials,
41 | StoreCallback callback);
42 |
43 | // Retrieves credentials that were previosly stored using
44 | // $(ref:storeCredentials). The caller's extension ID should be the same as
45 | // the extension id passed to the $(ref:storeCredentials).
46 | [supportsPromises] static void retrieveCredentials(
47 | RetrieveCallback callback);
48 | };
49 | };
50 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/login_screen_ui.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Use the chrome.loginScreenUi
API to show and hide custom
6 | // login UI.
7 | [platforms=("chromeos"),
8 | implemented_in="chrome/browser/ash/extensions/login_screen_ui/login_screen_ui_api.h"]
9 | namespace loginScreenUi {
10 |
11 | dictionary ShowOptions {
12 | // Relative url of the contents to show.
13 | DOMString url;
14 |
15 | // Whether the user can close the window, defaults to false.
16 | boolean? userCanClose;
17 | };
18 |
19 | // Callback that does not take arguments.
20 | callback SimpleCallback = void ();
21 |
22 | interface Functions {
23 | // Opens a window, which is visible on top of the login and lock screen.
24 | // |options|: Options for the custom login UI window.
25 | [supportsPromises] static void show(ShowOptions options,
26 | optional SimpleCallback callback);
27 |
28 | // Closes the login/lock screen UI window previously opened by this
29 | // extension.
30 | [supportsPromises] static void close(optional SimpleCallback callback);
31 | };
32 | };
33 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/login_state.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Use the chrome.loginState
API to read and monitor the login
6 | // state.
7 | [platforms=("chromeos", "lacros"),
8 | implemented_in="chrome/browser/chromeos/extensions/login_screen/login_state/login_state_api.h"]
9 | namespace loginState {
10 | enum ProfileType {
11 | // The extension is in the signin profile.
12 | SIGNIN_PROFILE,
13 |
14 | // The extension is in the user profile.
15 | USER_PROFILE
16 | };
17 |
18 | enum SessionState {
19 | // The session state is unknown.
20 | UNKNOWN,
21 |
22 | // The user is in the out-of-box-experience screen.
23 | IN_OOBE_SCREEN,
24 |
25 | // The user is in the login screen.
26 | IN_LOGIN_SCREEN,
27 |
28 | // The user is in the session.
29 | IN_SESSION,
30 |
31 | // The user is in the lock screen.
32 | IN_LOCK_SCREEN,
33 |
34 | // The device is in RMA mode, finalizing repairs.
35 | IN_RMA_SCREEN
36 | };
37 |
38 | callback ProfileTypeCallback = void (ProfileType result);
39 | callback SessionStateCallback = void (SessionState result);
40 |
41 | interface Functions {
42 | // Gets the type of the profile the extension is in.
43 | [supportsPromises] static void getProfileType(ProfileTypeCallback callback);
44 |
45 | // Gets the current session state.
46 | [supportsPromises] static void getSessionState(
47 | SessionStateCallback callback);
48 | };
49 |
50 | interface Events {
51 | // Dispatched when the session state changes. sessionState
52 | // is the new session state.
53 | static void onSessionStateChanged(SessionState sessionState);
54 | };
55 | };
56 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/mdns.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Use the chrome.mdns
API to discover services over mDNS.
6 | // This comprises a subset of the features of the NSD spec:
7 | // http://www.w3.org/TR/discovery-api/
8 | namespace mdns {
9 |
10 | // Represents a mDNS/DNS-SD service.
11 | dictionary MDnsService {
12 | // The service name of an mDNS advertised service,
13 | // chrome.pageCapture
API to save a tab as MHTML.",
9 | "functions": [
10 | {
11 | "name": "saveAsMHTML",
12 | "type": "function",
13 | "description": "Saves the content of the tab with given id as MHTML.",
14 | "parameters": [
15 | {
16 | "name": "details",
17 | "type": "object",
18 | "properties": {
19 | "tabId": {
20 | "type": "integer",
21 | "minimum": 0,
22 | "description": "The id of the tab to save as MHTML."
23 | }
24 | }
25 | },
26 | {
27 | "name": "callback",
28 | "type": "function",
29 | "description": "Called when the MHTML has been generated.",
30 | "parameters": [
31 | {
32 | "name": "mhtmlData",
33 | "type": "binary",
34 | "optional": true,
35 | "description": "The MHTML data as a Blob."
36 | }
37 | ]
38 | }
39 | ]
40 | }
41 | ]
42 | }
43 | ]
44 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/printing_metrics.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Use the chrome.printingMetrics
API to fetch data about
6 | // printing usage.
7 | [platforms=("chromeos", "lacros"),
8 | implemented_in="chrome/browser/chromeos/extensions/printing_metrics/printing_metrics_api.h"]
9 | namespace printingMetrics {
10 | // The source of the print job.
11 | enum PrintJobSource {
12 | // The job was created from the Print Preview page initiated by the user.
13 | PRINT_PREVIEW,
14 |
15 | // The job was created from an Android App.
16 | ANDROID_APP,
17 |
18 | // The job was created by extension via Chrome API.
19 | EXTENSION
20 | };
21 |
22 | // The final status of the print job.
23 | enum PrintJobStatus {
24 | // Print job was interrupted due to some error.
25 | FAILED,
26 |
27 | // Print job was canceled by the user or via API.
28 | CANCELED,
29 |
30 | // Print job was printed without any errors.
31 | PRINTED
32 | };
33 |
34 | // The source of the printer.
35 | enum PrinterSource {
36 | // Printer was added by user.
37 | USER,
38 |
39 | // Printer was added via policy.
40 | POLICY
41 | };
42 |
43 | enum ColorMode {
44 | // Black and white mode was used.
45 | BLACK_AND_WHITE,
46 |
47 | // Color mode was used.
48 | COLOR
49 | };
50 |
51 | enum DuplexMode {
52 | // One-sided printing was used.
53 | ONE_SIDED,
54 |
55 | // Two-sided printing was used, flipping on long edge.
56 | TWO_SIDED_LONG_EDGE,
57 |
58 | // Two-sided printing was used, flipping on short edge.
59 | TWO_SIDED_SHORT_EDGE
60 | };
61 |
62 | // The size of requested media.
63 | dictionary MediaSize {
64 | // Width (in micrometers) of the media used for printing.
65 | long width;
66 |
67 | // Height (in micrometers) of the media used for printing.
68 | long height;
69 |
70 | // Vendor-provided ID, e.g. "iso_a3_297x420mm" or "na_index-3x5_3x5in".
71 | // Possible values are values of "media" IPP attribute and can be found on
72 | //
73 | // IANA page .
74 | DOMString vendorId;
75 | };
76 |
77 | // The requested settings of print job.
78 | dictionary PrintSettings {
79 | // The requested color mode.
80 | ColorMode color;
81 |
82 | // The requested duplex mode.
83 | DuplexMode duplex;
84 |
85 | // The requested media size.
86 | MediaSize mediaSize;
87 |
88 | // The requested number of copies.
89 | long copies;
90 | };
91 |
92 | // The printer info.
93 | dictionary Printer {
94 | // Displayed name of the printer.
95 | DOMString name;
96 |
97 | // The full path for the printer.
98 | // Contains protocol, hostname, port, and queue.
99 | DOMString uri;
100 |
101 | // The source of the printer.
102 | PrinterSource source;
103 | };
104 |
105 | // Print job information.
106 | dictionary PrintJobInfo {
107 | // The ID of the job.
108 | DOMString id;
109 |
110 | // The title of the document which was printed.
111 | DOMString title;
112 |
113 | // Source showing who initiated the print job.
114 | PrintJobSource source;
115 |
116 | // ID of source. Null if source is PRINT_PREVIEW or ANDROID_APP.
117 | DOMString? sourceId;
118 |
119 | // The final status of the job.
120 | PrintJobStatus status;
121 |
122 | // The job creation time (in milliseconds past the Unix epoch).
123 | double creationTime;
124 |
125 | // The job completion time (in milliseconds past the Unix epoch).
126 | double completionTime;
127 |
128 | // The info about the printer which printed the document.
129 | Printer printer;
130 |
131 | // The settings of the print job.
132 | PrintSettings settings;
133 |
134 | // The number of pages in the document.
135 | long numberOfPages;
136 |
137 | // The status of the printer.
138 | printing.PrinterStatus printer_status;
139 | };
140 |
141 | callback GetPrintJobsCallback = void(PrintJobInfo[] jobs);
142 |
143 | interface Functions {
144 | // Returns the list of the finished print jobs.
145 | [supportsPromises] static void getPrintJobs(GetPrintJobsCallback callback);
146 | };
147 |
148 | interface Events {
149 | // Event fired when the print job is finished.
150 | // This includes any of termination statuses: FAILED, CANCELED and PRINTED.
151 | static void onPrintJobFinished(PrintJobInfo jobInfo);
152 | };
153 | };
154 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/search.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Use the chrome.search
API to search via the default provider.
6 | namespace search {
7 | enum Disposition {
8 | // Display results in the calling tab or the tab from the active browser.
9 | CURRENT_TAB,
10 |
11 | // Display search results in a new tab.
12 | NEW_TAB,
13 |
14 | // Display search results in a new window.
15 | NEW_WINDOW
16 | };
17 |
18 | dictionary QueryInfo {
19 | // String to query with the default search provider.
20 | DOMString text;
21 |
22 | // Location where search results should be displayed.
23 | // CURRENT_TAB
is the default.
24 | Disposition? disposition;
25 |
26 | // Location where search results should be displayed.
27 | // tabId
cannot be used with
disposition
.
28 | long? tabId;
29 | };
30 |
31 | callback QueryCallback = void();
32 |
33 | interface Functions {
34 | // Used to query the default search provider.
35 | // In case of an error,
36 | // $(ref:runtime.lastError) will be set.
37 | [supportsPromises] static void query(QueryInfo queryInfo,
38 | optional QueryCallback callback);
39 | };
40 | };
41 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/sessions.json:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | [
6 | {
7 | "namespace": "sessions",
8 | "description": "Use the chrome.sessions
API to query and restore tabs and windows from a browsing session.",
9 | "types": [
10 | {
11 | "id": "Filter",
12 | "type": "object",
13 | "properties": {
14 | "maxResults": {
15 | "type": "integer",
16 | "minimum": 0,
17 | "maximum": 25,
18 | "optional": true,
19 | "description": "The maximum number of entries to be fetched in the requested list. Omit this parameter to fetch the maximum number of entries ($(ref:sessions.MAX_SESSION_RESULTS))."
20 | }
21 | }
22 | },
23 | {
24 | "id": "Session",
25 | "type": "object",
26 | "properties": {
27 | "lastModified": {"type": "integer", "description": "The time when the window or tab was closed or modified, represented in milliseconds since the epoch."},
28 | "tab": {"$ref": "tabs.Tab", "optional": true, "description": "The $(ref:tabs.Tab), if this entry describes a tab. Either this or $(ref:sessions.Session.window) will be set."},
29 | "window": {"$ref": "windows.Window", "optional": true, "description": "The $(ref:windows.Window), if this entry describes a window. Either this or $(ref:sessions.Session.tab) will be set."}
30 | }
31 | },
32 | {
33 | "id": "Device",
34 | "type": "object",
35 | "properties": {
36 | "info": {"type": "string", "nodoc": true},
37 | "deviceName": {"type": "string", "description": "The name of the foreign device."},
38 | "sessions": {"type": "array", "items": {"$ref": "Session"}, "description": "A list of open window sessions for the foreign device, sorted from most recently to least recently modified session."}
39 | }
40 | }
41 | ],
42 | "functions": [
43 | {
44 | "name": "getRecentlyClosed",
45 | "type": "function",
46 | "description": "Gets the list of recently closed tabs and/or windows.",
47 | "parameters": [
48 | {
49 | "$ref": "Filter",
50 | "name": "filter",
51 | "optional": true
52 | }
53 | ],
54 | "returns_async": {
55 | "name": "callback",
56 | "parameters": [
57 | {
58 | "name": "sessions", "type": "array", "items": { "$ref": "Session" }, "description": "The list of closed entries in reverse order that they were closed (the most recently closed tab or window will be at index 0
). The entries may contain either tabs or windows."
59 | }
60 | ]
61 | }
62 | },
63 | {
64 | "name": "getDevices",
65 | "type": "function",
66 | "description": "Retrieves all devices with synced sessions.",
67 | "parameters": [
68 | {
69 | "$ref": "Filter",
70 | "name": "filter",
71 | "optional": true
72 | }
73 | ],
74 | "returns_async": {
75 | "name": "callback",
76 | "parameters": [
77 | {
78 | "name": "devices", "type": "array", "items": { "$ref": "Device" }, "description": "The list of $(ref:sessions.Device) objects for each synced session, sorted in order from device with most recently modified session to device with least recently modified session. $(ref:tabs.Tab) objects are sorted by recency in the $(ref:windows.Window) of the $(ref:sessions.Session) objects."
79 | }
80 | ]
81 | }
82 | },
83 | {
84 | "name": "restore",
85 | "type": "function",
86 | "description": "Reopens a $(ref:windows.Window) or $(ref:tabs.Tab), with an optional callback to run when the entry has been restored.",
87 | "parameters": [
88 | {
89 | "type": "string",
90 | "name": "sessionId",
91 | "optional": true,
92 | "description": "The $(ref:windows.Window.sessionId), or $(ref:tabs.Tab.sessionId) to restore. If this parameter is not specified, the most recently closed session is restored."
93 | }
94 | ],
95 | "returns_async": {
96 | "name": "callback",
97 | "optional": true,
98 | "parameters": [
99 | {
100 | "$ref": "Session",
101 | "name": "restoredSession",
102 | "description": "A $(ref:sessions.Session) containing the restored $(ref:windows.Window) or $(ref:tabs.Tab) object."
103 | }
104 | ]
105 | }
106 | }
107 | ],
108 | "events": [
109 | {
110 | "name": "onChanged",
111 | "description": "Fired when recently closed tabs and/or windows are changed. This event does not monitor synced sessions changes.",
112 | "type": "function"
113 | }
114 | ],
115 | "properties": {
116 | "MAX_SESSION_RESULTS": {
117 | "value": 25,
118 | "description": "The maximum number of $(ref:sessions.Session) that will be included in a requested list."
119 | }
120 | }
121 | }
122 | ]
123 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/side_panel.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // chrome.sidePanel API
6 | namespace sidePanel {
7 | dictionary SidePanel {
8 | // Developer specified path for side panel display.
9 | DOMString default_path;
10 | };
11 |
12 | dictionary ManifestKeys {
13 | SidePanel side_panel;
14 | };
15 |
16 | // The options used when setting a side panel. Omitted properties are
17 | // unchanged.
18 | dictionary PanelOptions {
19 | // If specified, the side panel options will only apply to the tab with
20 | // this id. If omitted, these options set the default behavior (used for any
21 | // tab that doesn't have specific settings).
22 | long? tabId;
23 | // The path to the side panel HTML file to use. This must be a local
24 | // resource within the extension package.
25 | DOMString? path;
26 | // Whether the side panel should be enabled.
27 | boolean? enabled;
28 | };
29 |
30 | dictionary GetPanelOptions {
31 | // If specified, the side panel options for the given tab will be returned.
32 | // Otherwise, returns the default side panel options (used for any tab that
33 | // doesn't have specific settings).
34 | long? tabId;
35 | };
36 |
37 | callback VoidCallback = void();
38 | callback PanelOptionsCallback = void(PanelOptions options);
39 |
40 | interface Functions {
41 | // Configures the side panel.
42 | // |options|: The configuration options to apply to the panel.
43 | // |callback|: Invoked when the options have been set.
44 | [supportsPromises] static void setOptions(PanelOptions options,
45 | optional VoidCallback callback);
46 |
47 | // Returns the active panel configuration.
48 | // |options|: Specifies the context to return the configuration for.
49 | // |callback|: Called with the active panel configuration.
50 | [supportsPromises] static void getOptions(
51 | GetPanelOptions options,
52 | PanelOptionsCallback callback);
53 | };
54 | };
55 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/system_indicator.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Manages an app's system indicator icon, an image displayed in the system's
6 | // menubar, system tray, or other visible area provided by the OS.
7 | // This is modelled after the other extension action APIs, such as
8 | // chrome.browserAction and chrome.pageAction.
9 | namespace systemIndicator {
10 | dictionary SetIconDetails {
11 | any? path;
12 | any? imageData;
13 | };
14 |
15 | callback DoneCallback = void ();
16 |
17 | interface Functions {
18 | // Set the image to be used as an indicator icon, using a set of ImageData
19 | // objects. These objects should have multiple resolutions so that an
20 | // appropriate size can be selected for the given icon size and DPI scaling
21 | // settings. Only square ImageData objects are accepted.
22 | [supportsPromises] static void setIcon(SetIconDetails details,
23 | optional DoneCallback callback);
24 |
25 | // Show the icon in the status tray.
26 | static void enable();
27 |
28 | // Hide the icon from the status tray.
29 | static void disable();
30 | };
31 |
32 | interface Events {
33 | // Fired only when a click on the icon does not result in a menu being
34 | // shown.
35 | static void onClicked();
36 | };
37 | };
38 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/system_log.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Use the chrome.systemLog
API to record Chrome system logs from
6 | // extensions.
7 | [platforms=("chromeos", "lacros"),
8 | implemented_in="chrome/browser/chromeos/extensions/system_log/system_log_api.h"]
9 | namespace systemLog {
10 | callback VoidCallback = void ();
11 |
12 | // Options for $(ref:add).
13 | // |message|: A log message to record.
14 | dictionary MessageOptions {
15 | DOMString message;
16 | };
17 |
18 | interface Functions {
19 | // Adds a new log record.
20 | // |options|: The logging options.
21 | // |callback|: A callback to invoke once the log has been added.
22 | [supportsPromises] static void add(MessageOptions options,
23 | optional VoidCallback callback);
24 | };
25 | };
26 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/top_sites.json:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | [
6 | {
7 | "namespace": "topSites",
8 | "description": "Use the chrome.topSites
API to access the top sites (i.e. most visited sites) that are displayed on the new tab page. These do not include shortcuts customized by the user.",
9 | "types": [
10 | {
11 | "id": "MostVisitedURL",
12 | "type": "object",
13 | "description": "An object encapsulating a most visited URL, such as the default shortcuts on the new tab page.",
14 | "properties": {
15 | "url": {"type": "string", "description": "The most visited URL."},
16 | "title": {"type": "string", "description": "The title of the page"}
17 | }
18 | }
19 | ],
20 | "functions": [
21 | {
22 | "name": "get",
23 | "type": "function",
24 | "description": "Gets a list of top sites.",
25 | "parameters": [],
26 | "returns_async": {
27 | "name": "callback",
28 | "parameters": [
29 | {
30 | "type": "array",
31 | "name": "data",
32 | "items": {"$ref": "MostVisitedURL"}
33 | }
34 | ]
35 | }
36 | }
37 | ]
38 | }
39 | ]
40 |
--------------------------------------------------------------------------------
/interfaces/chromium/chrome-common-extensions-api/wallpaper.json:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | [
6 | {
7 | "namespace":"wallpaper",
8 | "compiler_options": {
9 | "implemented_in": "chrome/browser/chromeos/extensions/wallpaper_api.h"
10 | },
11 | "description": "Use the chrome.wallpaper
API to change the ChromeOS wallpaper.",
12 | "platforms": ["chromeos", "lacros"],
13 | "types":
14 | [
15 | {
16 | "id": "WallpaperLayout",
17 | "type": "string",
18 | "enum": [ "STRETCH", "CENTER", "CENTER_CROPPED" ],
19 | "description": "The supported wallpaper layouts."
20 | }
21 | ],
22 | "functions": [
23 | {
24 | "name": "setWallpaper",
25 | "type": "function",
26 | "description": "Sets wallpaper to the image at url or wallpaperData with the specified layout",
27 | "platforms": ["chromeos", "lacros"],
28 | "parameters": [
29 | {
30 | "name": "details",
31 | "type": "object",
32 | "properties": {
33 | "data": {
34 | "type": "binary",
35 | "optional": true,
36 | "description": "The jpeg or png encoded wallpaper image as an ArrayBuffer."
37 | },
38 | "url": {
39 | "type": "string",
40 | "optional": true,
41 | "description": "The URL of the wallpaper to be set (can be relative)."
42 | },
43 | "layout": {
44 | "$ref": "WallpaperLayout",
45 | "description": "The supported wallpaper layouts."
46 | },
47 | "filename": {
48 | "type": "string",
49 | "description": "The file name of the saved wallpaper."
50 | },
51 | "thumbnail": {
52 | "type": "boolean",
53 | "optional": true,
54 | "description": "True if a 128x60 thumbnail should be generated. Layout and ratio are not supported yet."
55 | }
56 | }
57 | }
58 | ],
59 | "returns_async": {
60 | "name": "callback",
61 | "parameters": [
62 | {
63 | "type": "binary",
64 | "optional": true,
65 | "name": "thumbnail",
66 | "description": "The jpeg encoded wallpaper thumbnail. It is generated by resizing the wallpaper to 128x60."
67 | }
68 | ]
69 | }
70 | }
71 | ]
72 | }
73 | ]
74 |
75 |
--------------------------------------------------------------------------------
/interfaces/chromium/extensions-common-api/alarms.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Use the chrome.alarms
API to schedule code to run
6 | // periodically or at a specified time in the future.
7 | namespace alarms {
8 | dictionary Alarm {
9 | // Name of this alarm.
10 | DOMString name;
11 |
12 | // Time at which this alarm was scheduled to fire, in milliseconds past the
13 | // epoch (e.g. Date.now() + n
). For performance reasons, the
14 | // alarm may have been delayed an arbitrary amount beyond this.
15 | double scheduledTime;
16 |
17 | // If not null, the alarm is a repeating alarm and will fire again in
18 | // periodInMinutes minutes.
19 | double? periodInMinutes;
20 | };
21 |
22 | // TODO(mpcomplete): rename to CreateInfo when http://crbug.com/123073 is
23 | // fixed.
24 | dictionary AlarmCreateInfo {
25 | // Time at which the alarm should fire, in milliseconds past the epoch
26 | // (e.g. Date.now() + n
).
27 | double? when;
28 |
29 | // Length of time in minutes after which the onAlarm
event
30 | // should fire.
31 | //
32 | //
33 | double? delayInMinutes;
34 |
35 | // If set, the onAlarm event should fire every periodInMinutes
36 | // minutes after the initial event specified by when or
37 | // delayInMinutes. If not set, the alarm will only fire once.
38 | //
39 | //
40 | double? periodInMinutes;
41 | };
42 |
43 | callback VoidCallback = void ();
44 | callback AlarmCallback = void (optional Alarm alarm);
45 | callback AlarmListCallback = void (Alarm[] alarms);
46 | callback ClearCallback = void (boolean wasCleared);
47 |
48 | interface Functions {
49 | // Creates an alarm. Near the time(s) specified by alarmInfo,
50 | // the onAlarm
event is fired. If there is another alarm with
51 | // the same name (or no name if none is specified), it will be cancelled and
52 | // replaced by this alarm.
53 | //
54 | // In order to reduce the load on the user's machine, Chrome limits alarms
55 | // to at most once every 1 minute but may delay them an arbitrary amount
56 | // more. That is, setting delayInMinutes
or
57 | // periodInMinutes
to less than 1
will not be
58 | // honored and will cause a warning. when
can be set to less
59 | // than 1 minute after "now" without warning but won't actually cause the
60 | // alarm to fire for at least 1 minute.
61 | //
62 | // To help you debug your app or extension, when you've loaded it unpacked,
63 | // there's no limit to how often the alarm can fire.
64 | //
65 | // |name|: Optional name to identify this alarm. Defaults to the empty
66 | // string.
67 | // |alarmInfo|: Describes when the alarm should fire. The initial time must
68 | // be specified by either when or delayInMinutes (but
69 | // not both). If periodInMinutes is set, the alarm will repeat
70 | // every periodInMinutes minutes after the initial event. If
71 | // neither when or delayInMinutes is set for a
72 | // repeating alarm, periodInMinutes is used as the default for
73 | // delayInMinutes.
74 | // |callback|: Invoked when the alarm has been created.
75 | [supportsPromises] static void create(
76 | optional DOMString name,
77 | AlarmCreateInfo alarmInfo,
78 | optional VoidCallback callback);
79 |
80 | // Retrieves details about the specified alarm.
81 | // |name|: The name of the alarm to get. Defaults to the empty string.
82 | [supportsPromises] static void get(optional DOMString name,
83 | AlarmCallback callback);
84 |
85 | // Gets an array of all the alarms.
86 | [supportsPromises] static void getAll(AlarmListCallback callback);
87 |
88 | // Clears the alarm with the given name.
89 | // |name|: The name of the alarm to clear. Defaults to the empty string.
90 | [supportsPromises] static void clear(optional DOMString name,
91 | optional ClearCallback callback);
92 |
93 | // Clears all alarms.
94 | [supportsPromises] static void clearAll(optional ClearCallback callback);
95 | };
96 |
97 | interface Events {
98 | // Fired when an alarm has elapsed. Useful for event pages.
99 | // |alarm|: The alarm that has elapsed.
100 | static void onAlarm(Alarm alarm);
101 | };
102 | };
103 |
--------------------------------------------------------------------------------
/interfaces/chromium/extensions-common-api/clipboard.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // The chrome.clipboard
API is provided to allow users to
6 | // access data of the clipboard. This is a temporary solution for
7 | // chromeos platform apps until open-web alternative is available. It will be
8 | // deprecated once open-web solution is available, which could be in 2017 Q4.
9 | [platforms=("chromeos", "lacros"),
10 | implemented_in="extensions/browser/api/clipboard/clipboard_api.h"]
11 | namespace clipboard {
12 | // Supported image types.
13 | enum ImageType {png, jpeg};
14 |
15 | enum DataItemType {textPlain, textHtml};
16 |
17 | // Additional data item to be added along with the |image_data| to describe
18 | // the |image_data|.
19 | dictionary AdditionalDataItem {
20 | // Type of the additional data item.
21 | DataItemType type;
22 |
23 | // Content of the additional data item. Either the plain text string if
24 | // |type| is "textPlain" or markup string if |type| is "textHtml". The
25 | // data can not exceed 2MB.
26 | DOMString data;
27 | };
28 |
29 | interface Events {
30 | // Fired when clipboard data changes.
31 | // Requires clipboard and clipboardRead permissions for adding listener to
32 | // chrome.clipboard.onClipboardDataChanged event.
33 | // After this event fires, the clipboard data is available by calling
34 | // document.execCommand('paste').
35 | static void onClipboardDataChanged();
36 | };
37 |
38 | callback SetImageDataCallback = void();
39 |
40 | interface Functions {
41 | // Sets image data to clipboard.
42 | //
43 | // |imageData|: The encoded image data.
44 | // |type|: The type of image being passed.
45 | // |additionalItems|: Additional data items for describing image data.
46 | // The callback is called with chrome.runtime.lastError
47 | // set to error code if there is an error.
48 | // Requires clipboard and clipboardWrite permissions.
49 | [supportsPromises] static void setImageData(
50 | ArrayBuffer imageData,
51 | ImageType type,
52 | optional AdditionalDataItem[] additionalItems,
53 | optional SetImageDataCallback callback);
54 | };
55 | };
56 |
--------------------------------------------------------------------------------
/interfaces/chromium/extensions-common-api/content_scripts.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Stub namespace for the "content_scripts" manifest key.
6 | [generate_error_messages]
7 | namespace contentScripts {
8 | // The stage in the document lifecycle when the javascript file is injected.
9 | enum RunAt {
10 | // The browser chooses a time to inject scripts between "document_end" and
11 | // immediately after the window.onload event fires. The exact moment of
12 | // injection depends on how complex the document is and how long it is
13 | // taking to load, and is optimized for page load speed.
14 | // Content scripts running at "document_idle" do not need to listen for the
15 | // window.onload event; they are guaranteed to run after the DOM is
16 | // complete. If a script definitely needs to run after window.onload, the
17 | // extension can check if onload has already fired by using the
18 | // document.readyState property.
19 | document_idle,
20 | // Scripts are injected after any files from css, but before any other DOM
21 | // is constructed or any other script is run.
22 | document_start,
23 | // Scripts are injected immediately after the DOM is complete, but before
24 | // subresources like images and frames have loaded.
25 | document_end
26 | };
27 |
28 | // Describes a content script to be injected into a web page.
29 | dictionary ContentScript {
30 | // Specifies which pages this content script will be injected into. See
31 | // Match Patterns for more details on the
32 | // syntax of these strings.
33 | DOMString[] matches;
34 | // Excludes pages that this content script would otherwise be injected into.
35 | // See Match Patterns for more details on the
36 | // syntax of these strings.
37 | DOMString[]? exclude_matches;
38 | // The list of CSS files to be injected into matching pages. These are
39 | // injected in the order they appear in this array, before any DOM is
40 | // constructed or displayed for the page.
41 | DOMString[]? css;
42 | // The list of JavaScript files to be injected into matching pages. These
43 | // are injected in the order they appear in this array.
44 | DOMString[]? js;
45 | // If specified true, it will inject into all frames, even if the frame is
46 | // not the top-most frame in the tab. Each frame is checked independently
47 | // for URL requirements; it will not inject into child frames if the URL
48 | // requirements are not met. Defaults to false, meaning that only the top
49 | // frame is matched.
50 | boolean? all_frames;
51 | // Whether the script should inject into any frames where the URL belongs to
52 | // a scheme that would never match a specified Match Pattern, including
53 | // about:, data:, blob:, and filesystem: schemes. In these cases, in order
54 | // to determine if the script should inject, the origin of the URL is
55 | // checked. If the origin is `null` (as is the case for data: URLs), then
56 | // the "initiator" or "creator" origin is used (i.e., the origin of the
57 | // frame that created or navigated this frame). Note that this may not
58 | // be the parent frame, if the frame was navigated by another frame in the
59 | // document hierarchy.
60 | boolean? match_origin_as_fallback;
61 | // Whether the script should inject into an about:blank frame where the
62 | // parent or opener frame matches one of the patterns declared in matches.
63 | // Defaults to false.
64 | boolean? match_about_blank;
65 | // Applied after matches to include only those URLs that also match this
66 | // glob. Intended to emulate the
67 | // @include
68 | // Greasemonkey keyword.
69 | DOMString[]? include_globs;
70 | // Applied after matches to exclude URLs that match this glob. Intended to
71 | // emulate the
72 | // @exclude
73 | // Greasemonkey keyword.
74 | DOMString[]? exclude_globs;
75 | // Specifies when JavaScript files are injected into the web page. The
76 | // preferred and default value is document_idle
.
77 | RunAt? run_at;
78 | // The JavaScript "world" to run the script in. Defaults to
79 | // ISOLATED
. Only available in Manifest V3 extensions.
80 | [nodoc] extensionTypes.ExecutionWorld? world;
81 | };
82 |
83 | dictionary ManifestKeys {
84 | ContentScript[] content_scripts;
85 | };
86 | };
87 |
--------------------------------------------------------------------------------
/interfaces/chromium/extensions-common-api/cross_origin_isolation.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Stub namespace for manifest keys relating to the cross origin isolation
6 | // response headers.
7 | namespace crossOriginIsolation {
8 | dictionary ResponseHeader {
9 | DOMString? value;
10 | };
11 |
12 | dictionary ManifestKeys {
13 | ResponseHeader? cross_origin_embedder_policy;
14 | ResponseHeader? cross_origin_opener_policy;
15 | };
16 | };
17 |
--------------------------------------------------------------------------------
/interfaces/chromium/extensions-common-api/diagnostics.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Use the chrome.diagnostics
API to query various properties of
6 | // the environment that may be useful for diagnostics.
7 | namespace diagnostics {
8 | dictionary SendPacketOptions {
9 | // Target IP address.
10 | DOMString ip;
11 | // Packet time to live value. If omitted, the system default value will be
12 | // used.
13 | long? ttl;
14 | // Packet timeout in seconds. If omitted, the system default value will be
15 | // used.
16 | long? timeout;
17 | // Size of the payload. If omitted, the system default value will be used.
18 | long? size;
19 | };
20 |
21 | dictionary SendPacketResult {
22 | // The IP of the host which we receives the ICMP reply from.
23 | // The IP may differs from our target IP if the packet's ttl is used up.
24 | DOMString ip;
25 |
26 | // Latency in millisenconds.
27 | double latency;
28 | };
29 |
30 | callback SendPacketCallback = void(SendPacketResult result);
31 |
32 | interface Functions {
33 | // Send a packet of the given type with the given parameters.
34 | [supportsPromises] static void sendPacket(SendPacketOptions options,
35 | SendPacketCallback callback);
36 | };
37 | };
38 |
--------------------------------------------------------------------------------
/interfaces/chromium/extensions-common-api/dns.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Use the chrome.dns
API for dns resolution.
6 | namespace dns {
7 |
8 | dictionary ResolveCallbackResolveInfo {
9 | // The result code. Zero indicates success.
10 | long resultCode;
11 |
12 | // A string representing the IP address literal. Supplied only if resultCode
13 | // indicates success.
14 | DOMString? address;
15 | };
16 |
17 | callback ResolveCallback = void (ResolveCallbackResolveInfo resolveInfo);
18 |
19 | interface Functions {
20 | // Resolves the given hostname or IP address literal.
21 | // |hostname| : The hostname to resolve.
22 | // |callback| : Called when the resolution operation completes.
23 | [supportsPromises] static void resolve(DOMString hostname,
24 | ResolveCallback callback);
25 | };
26 |
27 | };
28 |
--------------------------------------------------------------------------------
/interfaces/chromium/extensions-common-api/file_handlers.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // `file_handlers` manifest key defintion. File Handlers allow developers to
6 | // let extensions interact with files on the operating system. This manifest key
7 | // can be used by developers to register an extension to a given file type.
8 | [generate_error_messages] namespace fileHandlers {
9 |
10 | // Icon specification similar to an ImageResource.
11 | dictionary Icon {
12 | // TODO(crbug.com/1362192) Add `DOMString? label;` for accessibility.
13 |
14 | // URL from which a user agent can fetch image data.
15 | DOMString src;
16 |
17 | // Multiple space-separated size values to also accommodate image formats
18 | // that can act as containers for multiple images of varying dimensions:
19 | // e.g. "16x16", "16x16 32x32".
20 | DOMString? sizes;
21 |
22 | // MIME type is purely advisory with no default value.
23 | DOMString? type;
24 | };
25 |
26 | // A FileHandler registers the ability to read, stream, or edit files of given
27 | // MIME types and/or file extensions.
28 | dictionary FileHandler {
29 | // A mapping of one or more MIME types to one or more file extensions.
30 | // e.g. "accept": {"text/csv": ".csv"} or {"text/csv": [".csv", ".txt"]}.
31 | object accept;
32 |
33 | // Specifies the url after the origin that is the navigation destination for
34 | // file handling launches.
35 | DOMString action;
36 |
37 | // Description of the file type.
38 | DOMString name;
39 |
40 | // Array of ImageResources.
41 | Icon[]? icons;
42 |
43 | // Whether multiple files should be opened in a single client or multiple.
44 | // Defaults to `single-client`.
45 | DOMString? launch_type;
46 | };
47 |
48 | dictionary ManifestKeys {
49 | // File Handlers to register onto the target system.
50 | FileHandler[] file_handlers;
51 | };
52 | };
53 |
--------------------------------------------------------------------------------
/interfaces/chromium/extensions-common-api/idle.json:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 | [
5 | {
6 | "namespace": "idle",
7 | "description": "Use the chrome.idle
API to detect when the machine's idle state changes.",
8 | "types": [
9 | {
10 | "id": "IdleState",
11 | "type": "string",
12 | "enum": [
13 | "active",
14 | "idle",
15 | "locked"
16 | ]
17 | }
18 | ],
19 | "functions": [
20 | {
21 | "name": "queryState",
22 | "type": "function",
23 | "description": "Returns \"locked\" if the system is locked, \"idle\" if the user has not generated any input for a specified number of seconds, or \"active\" otherwise.",
24 | "parameters": [
25 | {
26 | "name": "detectionIntervalInSeconds",
27 | "type": "integer",
28 | "minimum": 15,
29 | "description": "The system is considered idle if detectionIntervalInSeconds seconds have elapsed since the last user input detected."
30 | },
31 | {
32 | "name": "callback",
33 | "type": "function",
34 | "parameters": [
35 | {
36 | "name": "newState",
37 | "$ref": "IdleState"
38 | }
39 | ]
40 | }
41 | ]
42 | },
43 | {
44 | "name": "setDetectionInterval",
45 | "type": "function",
46 | "description": "Sets the interval, in seconds, used to determine when the system is in an idle state for onStateChanged events. The default interval is 60 seconds.",
47 | "parameters": [
48 | {
49 | "name": "intervalInSeconds",
50 | "type": "integer",
51 | "minimum": 15,
52 | "description": "Threshold, in seconds, used to determine when the system is in an idle state."
53 | }
54 | ]
55 | },
56 | {
57 | "name": "getAutoLockDelay",
58 | "type": "function",
59 | "description": "Gets the time, in seconds, it takes until the screen is locked automatically while idle. Returns a zero duration if the screen is never locked automatically. Currently supported on Chrome OS only.",
60 | "parameters": [
61 | {
62 | "name": "callback",
63 | "type": "function",
64 | "parameters": [
65 | {
66 | "name": "delay",
67 | "type": "integer",
68 | "description": "Time, in seconds, until the screen is locked automatically while idle. This is zero if the screen never locks automatically."
69 | }
70 | ]
71 | }
72 | ]
73 | }
74 | ],
75 | "events": [
76 | {
77 | "name": "onStateChanged",
78 | "type": "function",
79 | "description": "Fired when the system changes to an active, idle or locked state. The event fires with \"locked\" if the screen is locked or the screensaver activates, \"idle\" if the system is unlocked and the user has not generated any input for a specified number of seconds, and \"active\" when the user generates input on an idle system.",
80 | "parameters": [
81 | {
82 | "name": "newState",
83 | "$ref": "IdleState"
84 | }
85 | ]
86 | }
87 | ]
88 | }
89 | ]
--------------------------------------------------------------------------------
/interfaces/chromium/extensions-common-api/incognito.json:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | [
6 | {
7 | "namespace": "incognito",
8 | "description": "Dummy namepsace for the incognito manifest key.",
9 | "types": [
10 | {
11 | "id": "IncognitoMode",
12 | "type": "string",
13 | "enum": ["split", "spanning", "not_allowed"]
14 | }
15 | ],
16 | "manifest_keys": {
17 | "incognito": {
18 | "description": "Configures whether and how the extension runs in incognito mode. Default mode is spanning
.",
19 | "$ref": "IncognitoMode",
20 | "optional": true
21 | }
22 | }
23 | }
24 | ]
25 |
--------------------------------------------------------------------------------
/interfaces/chromium/extensions-common-api/lock_screen_data.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | //
12 | //
22 | //
24 | // Note that apps have reduced access to Chrome apps APIs from the lock screen 25 | // context. 26 | //
27 | namespace lockScreen.data { 28 | // The basic information about available data items originating from the lock 29 | // screen. 30 | dictionary DataItemInfo { 31 | // The data item ID that can later be used to retrieve and update the 32 | // associated lock screen data. 33 | DOMString id; 34 | }; 35 | 36 | dictionary DataItemsAvailableEvent { 37 | //Whether the event was dispatched as a result of the user session 38 | // getting unlocked. 39 | //
40 | //For example: 41 | //
true
.
46 | // false
.
51 | // offscreen
API to create and manage offscreen documents.
6 | namespace offscreen {
7 | enum Reason {
8 | // A reason used for testing purposes only.
9 | TESTING,
10 | // The offscreen document is responsible for playing audio.
11 | AUDIO_PLAYBACK,
12 | // The offscreen document needs to embed and script an iframe in order to
13 | // modify the iframe's content.
14 | IFRAME_SCRIPTING,
15 | // The offscreen document needs to embed an iframe and scrape its DOM to
16 | // extract information.
17 | DOM_SCRAPING,
18 | // The offscreen document needs to interact with Blob objects (including
19 | // URL.createObjectURL()
).
20 | BLOBS,
21 | // The offscreen document needs to use the DOMParser
API.
22 | DOM_PARSER,
23 | // The offscreen document needs to interact with media streams from user
24 | // media (e.g. getUserMedia()
).
25 | USER_MEDIA,
26 | // The offscreen document needs to interact with media streams from display
27 | // media (e.g. getDisplayMedia()
Navigator.clipboard).
33 | CLIPBOARD
34 | };
35 |
36 | dictionary CreateParameters {
37 | // The reason(s) the extension is creating the offscreen document.
38 | Reason[] reasons;
39 | // The (relative) URL to load in the document.
40 | DOMString url;
41 | // A developer-provided string that explains, in more detail, the need for
42 | // the background context. The user agent _may_ use this in display to the
43 | // user.
44 | DOMString justification;
45 | };
46 |
47 | callback VoidCallback = void();
48 | callback BooleanCallback = void(boolean result);
49 |
50 | interface Functions {
51 | // Creates a new offscreen document for the extension.
52 | // |parameters|: The parameters describing the offscreen document to create.
53 | // |callback|: Invoked when the offscreen document is created and has
54 | // completed its initial page load.
55 | [supportsPromises] static void createDocument(
56 | CreateParameters parameters,
57 | VoidCallback callback);
58 |
59 | // Closes the currently-open offscreen document for the extension.
60 | // |callback|: Invoked when the offscreen document has been closed.
61 | [supportsPromises] static void closeDocument(VoidCallback callback);
62 |
63 | // Determines whether the extension has an active document.
64 | // TODO(https://crbug.com/1339382): This probably isn't something we want to
65 | // ship in its current form (hence the nodoc). Instead of this, we should
66 | // integrate offscreen documents into a service worker-compatible getViews()
67 | // alternative. But this is pretty useful in testing environments.
68 | // |callback|: Invoked with the result of whether the extension has an
69 | // active offscreen document.
70 | [supportsPromises, nodoc] static void hasDocument(BooleanCallback callback);
71 | };
72 | };
73 |
--------------------------------------------------------------------------------
/interfaces/chromium/extensions-common-api/power.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Use the chrome.power
API to override the system's power
6 | // management features.
7 | namespace power {
8 | [noinline_doc] enum Level {
9 | // Prevent the system from sleeping in response to user inactivity.
10 | system,
11 |
12 | // Prevent the display from being turned off or dimmed or the system
13 | // from sleeping in response to user inactivity.
14 | display
15 | };
16 |
17 | interface Functions {
18 | // Requests that power management be temporarily disabled. |level|
19 | // describes the degree to which power management should be disabled.
20 | // If a request previously made by the same app is still active, it
21 | // will be replaced by the new request.
22 | static void requestKeepAwake(Level level);
23 |
24 | // Releases a request previously made via requestKeepAwake().
25 | static void releaseKeepAwake();
26 | };
27 | };
28 |
--------------------------------------------------------------------------------
/interfaces/chromium/extensions-common-api/printer_provider.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // The chrome.printerProvider
API exposes events used by print
6 | // manager to query printers controlled by extensions, to query their
7 | // capabilities and to submit print jobs to these printers.
8 | namespace printerProvider {
9 | // Error codes returned in response to $(ref:onPrintRequested) event.
10 | enum PrintError {
11 | // Operation completed successfully.
12 | OK,
13 |
14 | // General failure.
15 | FAILED,
16 |
17 | // Print ticket is invalid. For example, ticket is inconsistent with
18 | // capabilities or extension is not able to handle all settings from the
19 | // ticket.
20 | INVALID_TICKET,
21 |
22 | // Document is invalid. For example, data may be corrupted or the format is
23 | // incompatible with the extension.
24 | INVALID_DATA
25 | };
26 |
27 | // Printer description for $(ref:onGetPrintersRequested) event.
28 | dictionary PrinterInfo {
29 | // Unique printer ID.
30 | DOMString id;
31 |
32 | // Printer's human readable name.
33 | DOMString name;
34 |
35 | // Printer's human readable description.
36 | DOMString? description;
37 | };
38 |
39 | // Printing request parameters. Passed to $(ref:onPrintRequested) event.
40 | [noinline_doc] dictionary PrintJob {
41 | // ID of the printer which should handle the job.
42 | DOMString printerId;
43 |
44 | // The print job title.
45 | DOMString title;
46 |
47 | // Print ticket in
48 | //
49 | // CJT format.
50 | object ticket;
51 |
52 | // The document content type. Supported formats are
53 | // "application/pdf"
and "image/pwg-raster"
.
54 | DOMString contentType;
55 |
56 | // Blob containing the document data to print. Format must match
57 | // |contentType|.
58 | [instanceOf=Blob] object document;
59 | };
60 |
61 | callback PrintersCallback = void(PrinterInfo[] printerInfo);
62 |
63 | callback PrinterInfoCallback = void(optional PrinterInfo printerInfo);
64 |
65 | // |capabilities|: Device capabilities in
66 | // CDD
67 | // format.
68 | callback CapabilitiesCallback = void(object capabilities);
69 |
70 | callback PrintCallback = void(PrintError result);
71 |
72 | interface Events {
73 | // Event fired when print manager requests printers provided by extensions.
74 | // |resultCallback|: Callback to return printer list. Every listener must
75 | // call callback exactly once.
76 | static void onGetPrintersRequested(PrintersCallback resultCallback);
77 |
78 | // Event fired when print manager requests information about a USB device
79 | // that may be a printer.
80 | // Note: An application should not rely on this event being 81 | // fired more than once per device. If a connected device is supported it 82 | // should be returned in the $(ref:onGetPrintersRequested) event.
83 | // |device|: The USB device. 84 | // |resultCallback|: Callback to return printer info. The receiving listener 85 | // must call callback exactly once. If the parameter to this callback is 86 | // undefined that indicates that the application has determined that the 87 | // device is not supported. 88 | static void onGetUsbPrinterInfoRequested( 89 | usb.Device device, 90 | PrinterInfoCallback resultCallback); 91 | 92 | // Event fired when print manager requests printer capabilities. 93 | // |printerId|: Unique ID of the printer whose capabilities are requested. 94 | // |resultCallback|: Callback to return device capabilities in 95 | // CDD 96 | // format. 97 | // The receiving listener must call callback exectly once. 98 | static void onGetCapabilityRequested(DOMString printerId, 99 | CapabilitiesCallback resultCallback); 100 | 101 | // Event fired when print manager requests printing. 102 | // |printJob|: The printing request parameters. 103 | // |resultCallback|: Callback that should be called when the printing 104 | // request is completed. 105 | static void onPrintRequested(PrintJob printJob, 106 | PrintCallback resultCallback); 107 | }; 108 | }; 109 | 110 | -------------------------------------------------------------------------------- /interfaces/chromium/extensions-common-api/requirements.json: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | [ 6 | { 7 | "namespace": "requirements", 8 | "description": "Stub namepsace for the 'requirements' manifest key.", 9 | "compiler_options": { 10 | "generate_error_messages": true 11 | }, 12 | "types": [ 13 | { 14 | "id": "3DFeature", 15 | "type": "string", 16 | "enum": ["webgl", "css3d"] 17 | } 18 | ], 19 | "manifest_keys": { 20 | "requirements": { 21 | "type": "object", 22 | "optional": true, 23 | "properties": { 24 | "plugins": { 25 | "type": "object", 26 | "optional": true, 27 | "deprecated": true, 28 | "properties": { 29 | "npapi": { 30 | "type": "boolean", 31 | "optional": true 32 | } 33 | } 34 | }, 35 | "3D": { 36 | "type": "object", 37 | "optional": true, 38 | "properties": { 39 | "features": { 40 | "type": "array", 41 | "items": { "$ref": "3DFeature" } 42 | } 43 | } 44 | }, 45 | "window": { 46 | "type": "object", 47 | "optional": true, 48 | "properties": { 49 | "shape": { 50 | "type": "boolean", 51 | "optional": true 52 | } 53 | } 54 | } 55 | } 56 | } 57 | } 58 | } 59 | ] 60 | -------------------------------------------------------------------------------- /interfaces/chromium/extensions-common-api/shared_module.idl: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // Stub namespace for the "import" and "export" manifest keys. 6 | [generate_error_messages] 7 | namespace sharedModule { 8 | dictionary Import { 9 | // Extension ID of the shared module this extension or app depends on. 10 | DOMString id; 11 | 12 | // Minimum supported version of the shared module. 13 | DOMString? minimum_version; 14 | }; 15 | 16 | dictionary Export { 17 | // Optional list of extension IDs explicitly allowed to import this Shared 18 | // Module's resources. If no allowlist is given, all extensions are allowed 19 | // to import it. 20 | DOMString[]? allowlist; 21 | }; 22 | 23 | dictionary ManifestKeys { 24 | // The import field is used by extensions and apps to declare that they 25 | // depend on the resources from particular Shared Modules. 26 | Import[]? import; 27 | 28 | // The export field indicates an extension is a Shared Module that exports 29 | // its resources. 30 | Export? export; 31 | }; 32 | }; 33 | -------------------------------------------------------------------------------- /interfaces/chromium/extensions-common-api/system_cpu.idl: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Chromium Authors 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // Use thesystem.cpu
API to query CPU metadata.
6 | namespace system.cpu {
7 |
8 | // Counters for assessing CPU utilization. Each field is monotonically
9 | // increasing while the processor is powered on. Values are in milliseconds.
10 | dictionary CpuTime {
11 | // The cumulative time used by userspace programs on this processor.
12 | double user;
13 |
14 | // The cumulative time used by kernel programs on this processor.
15 | double kernel;
16 |
17 | // The cumulative time spent idle by this processor.
18 | double idle;
19 |
20 | // The total cumulative time for this processor. This value is equal to
21 | // user + kernel + idle.
22 | double total;
23 | };
24 |
25 | dictionary ProcessorInfo {
26 | // Cumulative usage info for this logical processor.
27 | CpuTime usage;
28 | };
29 |
30 | dictionary CpuInfo {
31 | // The number of logical processors.
32 | long numOfProcessors;
33 |
34 | // The architecture name of the processors.
35 | DOMString archName;
36 |
37 | // The model name of the processors.
38 | DOMString modelName;
39 |
40 | // A set of feature codes indicating some of the processor's capabilities.
41 | // The currently supported codes are "mmx", "sse", "sse2", "sse3", "ssse3",
42 | // "sse4_1", "sse4_2", and "avx".
43 | DOMString[] features;
44 |
45 | // Information about each logical processor.
46 | ProcessorInfo[] processors;
47 |
48 | // List of CPU temperature readings from each thermal zone of the CPU.
49 | // Temperatures are in degrees Celsius.
50 | //
51 | // Currently supported on Chrome OS only.
52 | double[] temperatures;
53 | };
54 |
55 | callback CpuInfoCallback = void (CpuInfo info);
56 |
57 | interface Functions {
58 | // Queries basic CPU information of the system.
59 | [supportsPromises] static void getInfo(CpuInfoCallback callback);
60 | };
61 | };
62 |
--------------------------------------------------------------------------------
/interfaces/chromium/extensions-common-api/system_memory.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // The chrome.system.memory
API.
6 | namespace system.memory {
7 |
8 | dictionary MemoryInfo {
9 | // The total amount of physical memory capacity, in bytes.
10 | double capacity;
11 | // The amount of available capacity, in bytes.
12 | double availableCapacity;
13 | };
14 |
15 | callback MemoryInfoCallback = void (MemoryInfo info);
16 |
17 | interface Functions {
18 | // Get physical memory information.
19 | [supportsPromises] static void getInfo(MemoryInfoCallback callback);
20 | };
21 | };
22 |
--------------------------------------------------------------------------------
/interfaces/chromium/extensions-common-api/system_network.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Use the chrome.system.network
API.
6 | namespace system.network {
7 | dictionary NetworkInterface {
8 | // The underlying name of the adapter. On *nix, this will typically be
9 | // "eth0", "wlan0", etc.
10 | DOMString name;
11 |
12 | // The available IPv4/6 address.
13 | DOMString address;
14 |
15 | // The prefix length
16 | long prefixLength;
17 | };
18 |
19 | // Callback from the getNetworkInterfaces
method.
20 | // |networkInterfaces| : Array of object containing network interfaces
21 | // information.
22 | callback GetNetworkInterfacesCallback =
23 | void (NetworkInterface[] networkInterfaces);
24 |
25 | interface Functions {
26 | // Retrieves information about local adapters on this system.
27 | // |callback| : Called when local adapter information is available.
28 | [supportsPromises] static void getNetworkInterfaces(
29 | GetNetworkInterfacesCallback callback);
30 | };
31 | };
32 |
--------------------------------------------------------------------------------
/interfaces/chromium/extensions-common-api/system_storage.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Use the chrome.system.storage
API to query storage device
6 | // information and be notified when a removable storage device is attached and
7 | // detached.
8 | namespace system.storage {
9 |
10 | enum StorageUnitType {
11 | // The storage has fixed media, e.g. hard disk or SSD.
12 | fixed,
13 | // The storage is removable, e.g. USB flash drive.
14 | removable,
15 | // The storage type is unknown.
16 | unknown
17 | };
18 |
19 | dictionary StorageUnitInfo {
20 | // The transient ID that uniquely identifies the storage device.
21 | // This ID will be persistent within the same run of a single application.
22 | // It will not be a persistent identifier between different runs of an
23 | // application, or between different applications.
24 | DOMString id;
25 | // The name of the storage unit.
26 | DOMString name;
27 | // The media type of the storage unit.
28 | StorageUnitType type;
29 | // The total amount of the storage space, in bytes.
30 | double capacity;
31 | };
32 |
33 | dictionary StorageAvailableCapacityInfo {
34 | // A copied |id| of getAvailableCapacity function parameter |id|.
35 | DOMString id;
36 | // The available capacity of the storage device, in bytes.
37 | double availableCapacity;
38 | };
39 |
40 | [inline_doc] enum EjectDeviceResultCode {
41 | // The ejection command is successful -- the application can prompt the user
42 | // to remove the device.
43 | success,
44 | // The device is in use by another application. The ejection did not
45 | // succeed; the user should not remove the device until the other
46 | // application is done with the device.
47 | in_use,
48 | // There is no such device known.
49 | no_such_device,
50 | // The ejection command failed.
51 | failure
52 | };
53 |
54 | callback EjectDeviceCallback = void (EjectDeviceResultCode result);
55 |
56 | callback StorageInfoCallback = void (StorageUnitInfo[] info);
57 |
58 | callback GetAvailableCapacityCallback = void (
59 | StorageAvailableCapacityInfo info);
60 |
61 | interface Functions {
62 | // Get the storage information from the system. The argument passed to the
63 | // callback is an array of StorageUnitInfo objects.
64 | [supportsPromises] static void getInfo(StorageInfoCallback callback);
65 |
66 | // Ejects a removable storage device.
67 | [supportsPromises] static void ejectDevice(DOMString id,
68 | EjectDeviceCallback callback);
69 |
70 | // Get the available capacity of a specified |id| storage device.
71 | // The |id| is the transient device ID from StorageUnitInfo.
72 | [supportsPromises] static void getAvailableCapacity(
73 | DOMString id,
74 | GetAvailableCapacityCallback callback);
75 | };
76 |
77 | interface Events {
78 | // Fired when a new removable storage is attached to the system.
79 | static void onAttached(StorageUnitInfo info);
80 |
81 | // Fired when a removable storage is detached from the system.
82 | static void onDetached(DOMString id);
83 | };
84 |
85 | };
86 |
--------------------------------------------------------------------------------
/interfaces/chromium/extensions-common-api/virtual_keyboard.idl:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Chromium Authors
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // The chrome.virtualKeyboard
API is a kiosk only API used to
6 | // configure virtual keyboard layout and behavior in kiosk sessions.
7 | [platforms=("chromeos", "lacros")]
8 | namespace virtualKeyboard {
9 | // Determines whether advanced virtual keyboard features should be enabled 10 | // or not. They are enabled by default.
11 | //On Chrome 58 all properties are expected to have the same value. 12 | //
13 | //From Chrome 63 the properties can be distinct and are optional. 14 | // If omitted, the current value is preserved.
15 | dictionary FeatureRestrictions { 16 | // Whether virtual keyboards can provide auto-complete. 17 | boolean? autoCompleteEnabled; 18 | // Whether virtual keyboards can provide auto-correct. 19 | boolean? autoCorrectEnabled; 20 | // Whether virtual keyboards can provide input via handwriting recognition. 21 | boolean? handwritingEnabled; 22 | // Whether virtual keyboards can provide spell-check. 23 | boolean? spellCheckEnabled; 24 | // Whether virtual keyboards can provide voice input. 25 | boolean? voiceInputEnabled; 26 | }; 27 | 28 | callback RestrictFeaturesCallback = void(FeatureRestrictions update); 29 | 30 | interface Functions { 31 | // Sets restrictions on features provided by the virtual keyboard. 32 | // |restrictions|: the preferences to enabled/disabled virtual keyboard 33 | // features. 34 | // |callback|: Invoked with the values which were updated. 35 | [supportsPromises] void restrictFeatures( 36 | FeatureRestrictions restrictions, 37 | optional RestrictFeaturesCallback callback); 38 | }; 39 | }; 40 | -------------------------------------------------------------------------------- /interfaces/chromium/extensions-common-api/web_accessible_resources.idl: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // Stub namepsace for the "web_accessible_resources" manifest key. 6 | [generate_error_messages] namespace webAccessibleResources { 7 | dictionary WebAccessibleResource { 8 | // Relative paths within the extension package representing web accessible 9 | // resources. 10 | DOMString[] resources; 11 | 12 | // List of match 14 | // patterns to which "resources" are accessible. These patterns should 15 | // have an effective path of "*". Each match will be checked against the 16 | // initiating origin. 17 | DOMString[]? matches; 18 | 19 | // List of extension IDs the "resources" are accessible to. A wildcard can 20 | // be used, denoted by "*". 21 | DOMString[]? extension_ids; 22 | 23 | // If true, the web accessible resources will only be accessible through a 24 | // dynamic ID. This is an identifier that uniquely identifies the extension 25 | // and is generated each session. The corresponding dynamic extension URL 26 | // is available through $(ref:runtime.getURL). 27 | boolean? use_dynamic_url; 28 | }; 29 | 30 | dictionary ManifestKeys { 31 | WebAccessibleResource[] web_accessible_resources; 32 | }; 33 | }; 34 | -------------------------------------------------------------------------------- /interfaces/chromium/extensions-common-api/web_accessible_resources_mv2.idl: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Chromium Authors 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // Stub namepsace for the "web_accessible_resources" manifest key. 6 | [generate_error_messages] namespace webAccessibleResourcesMv2 { 7 | dictionary ManifestKeys { 8 | // Relative paths within the extension package representing web accessible 9 | // resources. 10 | DOMString[] web_accessible_resources; 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /interfaces/chromium/extensions-common-api/web_view_request.json: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | [ 6 | { 7 | "namespace": "webViewRequest", 8 | "description": "Use thechrome.webViewRequest
API to intercept, block, or modify requests in-flight. It is potentially faster than the chrome.webRequest
API because you can register rules that are evaluated in the browser rather than the JavaScript engine, which reduces roundtrip latencies and allows higher efficiency."
9 | }
10 | ]
11 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIAction.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | MainWorldOnly,
28 | NeedsPageWithCallbackHandler,
29 | ReturnsPromiseWhenCallbackIsOmitted,
30 | ] interface WebExtensionAPIAction {
31 |
32 | void getTitle([NSDictionary] any details, [Optional, CallbackHandler] function callback);
33 | void setTitle([NSDictionary] any details, [Optional, CallbackHandler] function callback);
34 |
35 | void getBadgeText([NSDictionary] any details, [Optional, CallbackHandler] function callback);
36 | void setBadgeText([NSDictionary] any details, [Optional, CallbackHandler] function callback);
37 |
38 | void getBadgeBackgroundColor([NSDictionary] any details, [Optional, CallbackHandler] function callback);
39 | void setBadgeBackgroundColor([NSDictionary] any details);
40 |
41 | void enable([Optional] double tabIdentifier, [Optional, CallbackHandler] function callback);
42 | void disable([Optional] double tabIdentifier, [Optional, CallbackHandler] function callback);
43 |
44 | [NeedsScriptContext, RaisesException] void setIcon(any details, [Optional, CallbackHandler] function callback);
45 |
46 | void getPopup([NSDictionary] any details, [Optional, CallbackHandler] function callback);
47 | void setPopup([NSDictionary] any details, [Optional, CallbackHandler] function callback);
48 |
49 | [RaisesException] void openPopup([Optional, NSDictionary] any options, [Optional, CallbackHandler] function callback);
50 |
51 | readonly attribute WebExtensionAPIEvent onClicked;
52 |
53 | };
54 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIAlarms.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | MainWorldOnly,
28 | NeedsPageWithCallbackHandler,
29 | ReturnsPromiseWhenCallbackIsOmitted,
30 | ] interface WebExtensionAPIAlarms {
31 |
32 | [ImplementedAs=createAlarm, NeedsFrame] void create([Optional] DOMString name, [NSDictionary] any alarmInfo);
33 | [ImplementedAs=getAlarm] void get([Optional] DOMString name, [Optional, CallbackHandler] function callback);
34 | [ImplementedAs=getAllAlarms] void getAll([Optional, CallbackHandler] function callback);
35 | [ImplementedAs=clearAlarm] void clear([Optional] DOMString name, [Optional, CallbackHandler] function callback);
36 | [ImplementedAs=clearAllAlarms] void clearAll([Optional, CallbackHandler] function callback);
37 |
38 | readonly attribute WebExtensionAPIEvent onAlarm;
39 |
40 | };
41 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPICommands.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | MainWorldOnly,
28 | ReturnsPromiseWhenCallbackIsOmitted,
29 | ] interface WebExtensionAPICommands {
30 |
31 | void getAll([Optional, CallbackHandler] function callback);
32 |
33 | readonly attribute WebExtensionAPIEvent onCommand;
34 |
35 | };
36 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIContextMenus.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | MainWorldOnly,
28 | NeedsPageWithCallbackHandler,
29 | ] interface WebExtensionAPIContextMenus {
30 |
31 | [RaisesException, NeedsScriptContext] any create(any details, [Optional, CallbackHandler] function callback);
32 | [ImplementedAs=updateItem, RaisesException, NeedsScriptContext, ReturnsPromiseWhenCallbackIsOmitted] void update([NSObject] any identifier, any details, [Optional, CallbackHandler] function callback);
33 | [ImplementedAs=removeItem, RaisesException, ReturnsPromiseWhenCallbackIsOmitted] void remove([NSObject] any identifier, [Optional, CallbackHandler] function callback);
34 | [ReturnsPromiseWhenCallbackIsOmitted] void removeAll([Optional, CallbackHandler] function callback);
35 |
36 | readonly attribute WebExtensionAPIEvent onClicked;
37 |
38 | [ImplementedAs=actionMenuTopLevelLimit] readonly attribute double ACTION_MENU_TOP_LEVEL_LIMIT;
39 |
40 | };
41 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPICookies.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | MainWorldOnly,
28 | NeedsPageWithCallbackHandler,
29 | ReturnsPromiseWhenCallbackIsOmitted,
30 | ] interface WebExtensionAPICookies {
31 |
32 | [ImplementedAs=getCookie, RaisesException] void get([NSDictionary] any details, [Optional, CallbackHandler] function callback);
33 | [ImplementedAs=getAllCookies, RaisesException] void getAll([NSDictionary] any details, [Optional, CallbackHandler] function callback);
34 | [ImplementedAs=setCookie, RaisesException] void set([NSDictionary] any details, [Optional, CallbackHandler] function callback);
35 | [ImplementedAs=removeCookie, RaisesException] void remove([NSDictionary] any details, [Optional, CallbackHandler] function callback);
36 | void getAllCookieStores([Optional, CallbackHandler] function callback);
37 |
38 | readonly attribute WebExtensionAPIEvent onChanged;
39 |
40 | };
41 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIDeclarativeNetRequest.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | MainWorldOnly,
28 | NeedsPageWithCallbackHandler,
29 | ReturnsPromiseWhenCallbackIsOmitted,
30 | ] interface WebExtensionAPIDeclarativeNetRequest {
31 |
32 | [RaisesException] void updateEnabledRulesets([NSDictionary] any options, [Optional, CallbackHandler] function callback);
33 | [NeedsFrame] void getEnabledRulesets([Optional, CallbackHandler] function callback);
34 |
35 | [RaisesException] void updateDynamicRules([NSDictionary] any options, [Optional, CallbackHandler] function callback);
36 | [NeedsFrame] void getDynamicRules([Optional, CallbackHandler] function callback);
37 |
38 | [RaisesException] void updateSessionRules([NSDictionary] any options, [Optional, CallbackHandler] function callback);
39 | [NeedsFrame] void getSessionRules([Optional, CallbackHandler] function callback);
40 |
41 | [RaisesException, NeedsFrame] void getMatchedRules([Optional, NSDictionary] any filter, [Optional, CallbackHandler] function callback);
42 |
43 | [RaisesException] void isRegexSupported([NSDictionary] any regexOptions, [Optional, CallbackHandler] function callback);
44 |
45 | [ImplementedAs=maxNumberOfStaticRulesets] readonly attribute double MAX_NUMBER_OF_STATIC_RULESETS;
46 | [ImplementedAs=maxNumberOfEnabledRulesets] readonly attribute double MAX_NUMBER_OF_ENABLED_STATIC_RULESETS;
47 |
48 | };
49 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIDevTools.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | ReturnsPromiseWhenCallbackIsOmitted,
28 | ] interface WebExtensionAPIDevTools {
29 |
30 | readonly attribute WebExtensionAPIDevToolsInspectedWindow inspectedWindow;
31 | readonly attribute WebExtensionAPIDevToolsNetwork network;
32 | readonly attribute WebExtensionAPIDevToolsPanels panels;
33 |
34 | };
35 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIDevToolsElementsPanel.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | ReturnsPromiseWhenCallbackIsOmitted,
28 | ] interface WebExtensionAPIDevToolsElementsPanel {
29 |
30 | readonly attribute WebExtensionAPIEvent onSelectionChanged;
31 |
32 | [RaisesException] void createSidebarPane(DOMString title, [Optional, CallbackHandler] function callback);
33 |
34 | };
35 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIDevToolsExtensionPanel.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | ReturnsPromiseWhenCallbackIsOmitted,
28 | ] interface WebExtensionAPIDevToolsExtensionPanel {
29 |
30 | readonly attribute WebExtensionAPIEvent onShown;
31 | readonly attribute WebExtensionAPIEvent onHidden;
32 |
33 | };
34 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIDevToolsExtensionSidebarPane.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | ReturnsPromiseWhenCallbackIsOmitted,
28 | ] interface WebExtensionAPIDevToolsExtensionSidebarPane {
29 |
30 | [ImplementedAs=setSourceURL, RaisesException] void setPage(DOMString path);
31 |
32 | readonly attribute WebExtensionAPIEvent onShown;
33 | readonly attribute WebExtensionAPIEvent onHidden;
34 |
35 | [RaisesException] void setExpression(DOMString expression, [Optional] DOMString rootTitle, [Optional, CallbackHandler] function callback);
36 | [RaisesException] void setObject(DOMString jsonObject, [Optional] DOMString rootTitle, [Optional, CallbackHandler] function callback);
37 |
38 | };
39 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIDevToolsInspectedWindow.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | NeedsPageWithCallbackHandler,
28 | ReturnsPromiseWhenCallbackIsOmitted,
29 | ] interface WebExtensionAPIDevToolsInspectedWindow {
30 |
31 | [ImplementedAs=evaluateExpression, RaisesException] void eval(DOMString expression, [Optional, NSDictionary] any options, [Optional, CallbackHandler] function callback);
32 |
33 | [RaisesException, NeedsFrame] void reload([Optional, NSDictionary] any options);
34 |
35 | [NeedsFrame] readonly attribute double tabId;
36 |
37 | [RaisesException, Dynamic] void getResources([NSDictionary] any options, [Optional, CallbackHandler] function callback);
38 | [Dynamic] readonly attribute WebExtensionAPIEvent onResourceAdded;
39 |
40 | };
41 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIDevToolsNetwork.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | ReturnsPromiseWhenCallbackIsOmitted,
28 | ] interface WebExtensionAPIDevToolsNetwork {
29 |
30 | [RaisesException] void getHAR([Optional, CallbackHandler] function callback);
31 |
32 | readonly attribute WebExtensionAPIEvent onNavigated;
33 |
34 | readonly attribute WebExtensionAPIEvent onRequestFinished;
35 |
36 | };
37 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIDevToolsPanels.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | NeedsPageWithCallbackHandler,
28 | ReturnsPromiseWhenCallbackIsOmitted,
29 | ] interface WebExtensionAPIDevToolsPanels {
30 |
31 | [ImplementedAs=createNewTab, RaisesException] void create(DOMString title, DOMString iconPath, DOMString pagePath, [Optional, CallbackHandler] function callback);
32 |
33 | readonly attribute WebExtensionAPIDevToolsElementsPanel elements;
34 |
35 | [NeedsFrame] readonly attribute DOMString themeName;
36 | readonly attribute WebExtensionAPIEvent onThemeChanged;
37 |
38 | };
39 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIEvent.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | NeedsPageWithCallbackHandler,
28 | ] interface WebExtensionAPIEvent {
29 |
30 | void addListener([CallbackHandler] function listener);
31 | void removeListener([CallbackHandler] function listener);
32 | boolean hasListener([CallbackHandler] function listener);
33 |
34 | };
35 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIExtension.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | ReturnsPromiseWhenCallbackIsOmitted,
28 | ] interface WebExtensionAPIExtension {
29 |
30 | [URL, ConvertNullStringTo=Null, RaisesException, Dynamic] DOMString getURL(DOMString resourcePath);
31 |
32 | [ImplementedAs=isInIncognitoContext] readonly attribute boolean inIncognitoContext;
33 |
34 | [MainWorldOnly] void isAllowedIncognitoAccess([Optional, CallbackHandler] function callback);
35 | [MainWorldOnly] void isAllowedFileSchemeAccess([Optional, CallbackHandler] function callback);
36 |
37 | [MainWorldOnly] any getBackgroundPage();
38 | [MainWorldOnly, NeedsScriptContext] any getViews([Optional, NSDictionary] any properties);
39 |
40 | };
41 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPILocalization.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | ReturnsPromiseWhenCallbackIsOmitted,
28 | ] interface WebExtensionAPILocalization {
29 |
30 | DOMString getMessage([CannotBeEmpty] DOMString name, [Optional, NSObject] any substitutions);
31 |
32 | DOMString getUILanguage();
33 |
34 | void getAcceptLanguages([Optional, CallbackHandler] function callback);
35 |
36 | };
37 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPINamespace.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | ReturnsPromiseWhenCallbackIsOmitted,
28 | ] interface WebExtensionAPINamespace {
29 |
30 | readonly attribute WebExtensionAPIExtension extension;
31 |
32 | readonly attribute WebExtensionAPIRuntime runtime;
33 |
34 | readonly attribute WebExtensionAPILocalization i18n;
35 |
36 | [Dynamic] readonly attribute WebExtensionAPIStorage storage;
37 |
38 | [MainWorldOnly] readonly attribute WebExtensionAPIPermissions permissions;
39 |
40 | [MainWorldOnly] readonly attribute WebExtensionAPITabs tabs;
41 |
42 | [MainWorldOnly] readonly attribute WebExtensionAPIWindows windows;
43 |
44 | [MainWorldOnly, Dynamic] readonly attribute WebExtensionAPIAction browserAction;
45 |
46 | [MainWorldOnly, Dynamic] readonly attribute WebExtensionAPIAction pageAction;
47 |
48 | [MainWorldOnly, Dynamic] readonly attribute WebExtensionAPIAction action;
49 |
50 | [MainWorldOnly, Dynamic] readonly attribute WebExtensionAPICommands commands;
51 |
52 | [MainWorldOnly, Dynamic] readonly attribute WebExtensionAPIContextMenus contextMenus;
53 |
54 | [MainWorldOnly, Dynamic] readonly attribute WebExtensionAPIContextMenus menus;
55 |
56 | [MainWorldOnly, Dynamic] readonly attribute WebExtensionAPINotifications notifications;
57 |
58 | [MainWorldOnly, Dynamic] readonly attribute WebExtensionAPIAlarms alarms;
59 |
60 | [MainWorldOnly, Dynamic] readonly attribute WebExtensionAPIWebNavigation webNavigation;
61 |
62 | [MainWorldOnly, Dynamic] readonly attribute WebExtensionAPIWebRequest webRequest;
63 |
64 | [MainWorldOnly, Dynamic] readonly attribute WebExtensionAPICookies cookies;
65 |
66 | [MainWorldOnly, Dynamic] readonly attribute WebExtensionAPIDeclarativeNetRequest declarativeNetRequest;
67 |
68 | [Dynamic] readonly attribute WebExtensionAPIDevTools devtools;
69 |
70 | [MainWorldOnly, Dynamic] readonly attribute WebExtensionAPIScripting scripting;
71 |
72 | };
73 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPINotifications.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | MainWorldOnly,
28 | ReturnsPromiseWhenCallbackIsOmitted,
29 | ] interface WebExtensionAPINotifications {
30 |
31 | readonly attribute WebExtensionAPIEvent onClicked;
32 | readonly attribute WebExtensionAPIEvent onButtonClicked;
33 |
34 | };
35 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIPermissions.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | MainWorldOnly,
28 | NeedsPageWithCallbackHandler,
29 | ReturnsPromiseWhenCallbackIsOmitted,
30 | ] interface WebExtensionAPIPermissions {
31 |
32 | void getAll([Optional, CallbackHandler] function callback);
33 |
34 | [RaisesException] void contains([NSDictionary] any permissions, [Optional, CallbackHandler] function callback);
35 |
36 | [RaisesException] void request([NSDictionary] any permissions, [Optional, CallbackHandler] function callback);
37 |
38 | [RaisesException] void remove([NSDictionary] any permissions, [Optional, CallbackHandler] function callback);
39 |
40 | readonly attribute WebExtensionAPIEvent onAdded;
41 |
42 | readonly attribute WebExtensionAPIEvent onRemoved;
43 |
44 | };
45 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIPort.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | interface WebExtensionAPIPort {
27 |
28 | readonly attribute DOMString name;
29 |
30 | void disconnect();
31 |
32 | readonly attribute WebExtensionAPIEvent onDisconnect;
33 |
34 | readonly attribute WebExtensionAPIEvent onMessage;
35 |
36 | [RaisesException] void postMessage([Serialization=JSON] any message);
37 |
38 | [Dynamic] readonly attribute any sender;
39 |
40 | };
41 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIRuntime.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | ReturnsPromiseWhenCallbackIsOmitted,
28 | ] interface WebExtensionAPIRuntime {
29 |
30 | [URL, ConvertNullStringTo=Null, RaisesException] DOMString getURL(DOMString resourcePath);
31 |
32 | [NSDictionary] any getManifest();
33 |
34 | [NeedsScriptContext] double getFrameId(any target);
35 |
36 | [NeedsFrame, ProcessArgumentsLeftToRight, RaisesException] void sendMessage([Optional] DOMString extensionId, [Serialization=JSON] any message, [Optional, NSDictionary] any options, [Optional, CallbackHandler] function callback);
37 |
38 | [NeedsFrame] WebExtensionAPIPort connect([Optional] DOMString extensionId, [Optional, NSDictionary] any connectInfo);
39 |
40 | [ImplementedAs=runtimeIdentifier] readonly attribute DOMString id;
41 |
42 | readonly attribute WebExtensionAPIEvent onConnect;
43 | readonly attribute WebExtensionAPIEvent onMessage;
44 |
45 | [MainWorldOnly, NeedsFrame] void getBackgroundPage([Optional, CallbackHandler] function callback);
46 |
47 | [MainWorldOnly] void setUninstallURL([URL] DOMString url, [Optional, CallbackHandler] function callback);
48 |
49 | [MainWorldOnly, NeedsFrame] void openOptionsPage([Optional, CallbackHandler] function callback);
50 | [MainWorldOnly, NeedsFrame] void reload();
51 | [MainWorldOnly] void getPlatformInfo([Optional, CallbackHandler] function callback);
52 |
53 | [MainWorldOnly] readonly attribute WebExtensionAPIEvent onConnectExternal;
54 | [MainWorldOnly] readonly attribute WebExtensionAPIEvent onMessageExternal;
55 | [MainWorldOnly] readonly attribute WebExtensionAPIEvent onStartup;
56 | [MainWorldOnly] readonly attribute WebExtensionAPIEvent onInstalled;
57 |
58 | [MainWorldOnly] readonly attribute any lastError;
59 |
60 | [MainWorldOnly, Dynamic, NeedsFrame] void sendNativeMessage([Optional] DOMString applicationID, [NSObject] any message, [Optional, CallbackHandler] function callback);
61 | [MainWorldOnly, Dynamic, NeedsFrame] WebExtensionAPIPort connectNative([Optional] DOMString applicationID);
62 |
63 | };
64 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIScripting.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | MainWorldOnly,
28 | NeedsPageWithCallbackHandler,
29 | ReturnsPromiseWhenCallbackIsOmitted,
30 | ] interface WebExtensionAPIScripting {
31 |
32 | [RaisesException] void executeScript([NSDictionary] any injectionDetails, [Optional, CallbackHandler] function callback);
33 | [RaisesException] void insertCSS([NSDictionary] any injectionDetails, [Optional, CallbackHandler] function callback);
34 | [RaisesException] void removeCSS([NSDictionary] any injectionDetails, [Optional, CallbackHandler] function callback);
35 | [RaisesException] void registerContentScripts([NSObject] any details, [Optional, CallbackHandler] function callback);
36 |
37 | [RaisesException] void getRegisteredContentScripts([Optional, NSDictionary] any filter, [Optional, CallbackHandler] function callback);
38 |
39 | };
40 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIStorage.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | ReturnsPromiseWhenCallbackIsOmitted,
28 | ] interface WebExtensionAPIStorage {
29 |
30 | readonly attribute WebExtensionAPIStorageArea local;
31 | readonly attribute WebExtensionAPIStorageArea sync;
32 | readonly attribute WebExtensionAPIStorageArea session;
33 |
34 | readonly attribute WebExtensionAPIEvent onChanged;
35 |
36 | };
37 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIStorageArea.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | NeedsPageWithCallbackHandler,
28 | ReturnsPromiseWhenCallbackIsOmitted,
29 | ] interface WebExtensionAPIStorageArea {
30 |
31 | [ImplementedAs=getItems, NeedsScriptContext, RaisesException] void get([Optional, NSObject, DOMString] any items, [Optional, CallbackHandler] function callback);
32 | [RaisesException] void getBytesInUse([Optional, NSObject, DOMString] any items, [Optional, CallbackHandler] function callback);
33 | [ImplementedAs=setItems, NeedsScriptContext, RaisesException] void set([NSDictionary] any items, [Optional, CallbackHandler] function callback);
34 | [ImplementedAs=removeItems, RaisesException] void remove([NSObject] any items, [Optional, CallbackHandler] function callback);
35 | void clear([Optional, CallbackHandler] function callback);
36 |
37 | readonly attribute WebExtensionAPIEvent onChanged;
38 |
39 | [ImplementedAs=quotaBytes] readonly attribute double QUOTA_BYTES;
40 |
41 | [ImplementedAs=quotaBytesPerItem, Dynamic] readonly attribute double QUOTA_BYTES_PER_ITEM;
42 | [ImplementedAs=maxItems, Dynamic] readonly attribute unsigned long MAX_ITEMS;
43 | [ImplementedAs=maxWriteOperationsPerHour, Dynamic] readonly attribute unsigned long MAX_WRITE_OPERATIONS_PER_HOUR;
44 | [ImplementedAs=maxWriteOperationsPerMinute, Dynamic] readonly attribute unsigned long MAX_WRITE_OPERATIONS_PER_MINUTE;
45 | };
46 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIWebNavigation.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | MainWorldOnly,
28 | NeedsPageWithCallbackHandler,
29 | ReturnsPromiseWhenCallbackIsOmitted,
30 | ] interface WebExtensionAPIWebNavigation {
31 |
32 | readonly attribute WebExtensionAPIWebNavigationEvent onBeforeNavigate;
33 | readonly attribute WebExtensionAPIWebNavigationEvent onCommitted;
34 | readonly attribute WebExtensionAPIWebNavigationEvent onDOMContentLoaded;
35 | readonly attribute WebExtensionAPIWebNavigationEvent onCompleted;
36 | readonly attribute WebExtensionAPIWebNavigationEvent onErrorOccurred;
37 |
38 | [RaisesException] void getFrame([NSDictionary] any details, [Optional, CallbackHandler] function callback);
39 | [RaisesException] void getAllFrames([NSDictionary] any details, [Optional, CallbackHandler] function callback);
40 |
41 | };
42 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIWebNavigationEvent.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | MainWorldOnly,
28 | NeedsPageWithCallbackHandler,
29 | ] interface WebExtensionAPIWebNavigationEvent {
30 |
31 | [RaisesException] void addListener([CallbackHandler] function listener, [NSDictionary, Optional] any filter);
32 | void removeListener([CallbackHandler] function listener);
33 | boolean hasListener([CallbackHandler] function listener);
34 |
35 | };
36 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIWebPageNamespace.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | ReturnsPromiseWhenCallbackIsOmitted,
28 | ] interface WebExtensionAPIWebPageNamespace {
29 |
30 | readonly attribute WebExtensionAPIWebPageRuntime runtime;
31 |
32 | };
33 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIWebPageRuntime.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | ReturnsPromiseWhenCallbackIsOmitted,
28 | ] interface WebExtensionAPIWebPageRuntime {
29 |
30 | [ImplementedAs=sendMessageToExtension, NeedsFrame, ProcessArgumentsLeftToRight, RaisesException] void sendMessage(DOMString extensionId, [Serialization=JSON] any message, [Optional, NSDictionary] any options, [Optional, CallbackHandler] function callback);
31 |
32 | [ImplementedAs=connectToExtension, NeedsFrame] WebExtensionAPIPort connect(DOMString extensionId, [Optional, NSDictionary] any connectInfo);
33 |
34 | };
35 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIWebRequest.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | MainWorldOnly,
28 | NeedsPageWithCallbackHandler,
29 | ReturnsPromiseWhenCallbackIsOmitted,
30 | ] interface WebExtensionAPIWebRequest {
31 |
32 | readonly attribute WebExtensionAPIWebRequestEvent onBeforeRequest;
33 | readonly attribute WebExtensionAPIWebRequestEvent onBeforeSendHeaders;
34 | readonly attribute WebExtensionAPIWebRequestEvent onSendHeaders;
35 | readonly attribute WebExtensionAPIWebRequestEvent onHeadersReceived;
36 | readonly attribute WebExtensionAPIWebRequestEvent onAuthRequired;
37 | readonly attribute WebExtensionAPIWebRequestEvent onBeforeRedirect;
38 | readonly attribute WebExtensionAPIWebRequestEvent onResponseStarted;
39 | readonly attribute WebExtensionAPIWebRequestEvent onCompleted;
40 | readonly attribute WebExtensionAPIWebRequestEvent onErrorOccurred;
41 |
42 | };
43 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIWebRequestEvent.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | MainWorldOnly,
28 | NeedsPageWithCallbackHandler,
29 | ] interface WebExtensionAPIWebRequestEvent {
30 |
31 | [RaisesException] void addListener([CallbackHandler] function listener, [NSDictionary] any filter, [NSArray=NSString, Optional] array extraInfoSpec);
32 | void removeListener([CallbackHandler] function listener);
33 | boolean hasListener([CallbackHandler] function listener);
34 |
35 | };
36 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIWindows.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | MainWorldOnly,
28 | NeedsPageWithCallbackHandler,
29 | ReturnsPromiseWhenCallbackIsOmitted,
30 | ] interface WebExtensionAPIWindows {
31 |
32 | [ImplementedAs=getWindow, RaisesException] void get(double windowID, [Optional, NSDictionary] any info, [Optional, CallbackHandler] function callback);
33 | [ImplementedAs=getCurrentWindow, RaisesException] void getCurrent([Optional, NSDictionary] any info, [Optional, CallbackHandler] function callback);
34 | [ImplementedAs=getLastFocusedWindow, RaisesException] void getLastFocused([Optional, NSDictionary] any info, [Optional, CallbackHandler] function callback);
35 | [ImplementedAs=getAllWindows, RaisesException] void getAll([Optional, NSDictionary] any info, [Optional, CallbackHandler] function callback);
36 |
37 | [ImplementedAs=createWindow, Dynamic, RaisesException] void create([Optional, NSDictionary] any data, [Optional, CallbackHandler] function callback);
38 | [ImplementedAs=updateWindow, Dynamic, RaisesException] void update(double windowID, [NSDictionary] any info, [Optional, CallbackHandler] function callback);
39 | [ImplementedAs=closeWindow, Dynamic, RaisesException] void remove(double windowID, [Optional, CallbackHandler] function callback);
40 |
41 | [ImplementedAs=windowIdentifierNone] readonly attribute double WINDOW_ID_NONE;
42 | [ImplementedAs=windowIdentifierCurrent] readonly attribute double WINDOW_ID_CURRENT;
43 |
44 | readonly attribute WebExtensionAPIWindowsEvent onCreated;
45 | readonly attribute WebExtensionAPIWindowsEvent onRemoved;
46 | readonly attribute WebExtensionAPIWindowsEvent onFocusChanged;
47 |
48 | };
49 |
--------------------------------------------------------------------------------
/interfaces/safari/WebExtensionAPIWindowsEvent.idl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 Apple Inc. All rights reserved.
3 | *
4 | * Redistribution and use in source and binary forms, with or without
5 | * modification, are permitted provided that the following conditions
6 | * are met:
7 | * 1. Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * 2. Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | *
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 | * THE POSSIBILITY OF SUCH DAMAGE.
24 | */
25 |
26 | [
27 | MainWorldOnly,
28 | NeedsPageWithCallbackHandler,
29 | ] interface WebExtensionAPIWindowsEvent {
30 |
31 | [RaisesException] void addListener([CallbackHandler] function listener, [Optional, NSDictionary] any filter);
32 | void removeListener([CallbackHandler] function listener);
33 | boolean hasListener([CallbackHandler] function listener);
34 |
35 | };
36 |
--------------------------------------------------------------------------------
/memo/persistence-of-states.md:
--------------------------------------------------------------------------------
1 | # Persistence of API States
2 |
3 | ## Overview
4 | There are many extension APIs that have some kind of states. The persistence of these states is often discussed in various issues in WECG, some with clear definitions and some without. Here is a summary of these states and their persistence.
5 |
6 | ## Goals
7 | At present, the persistence of these states depends on browsers' implementation. This document provides a high-level perspective for them. The goal is to make the design and implementation of these states in a consistent manner on the platform, as well as consistent behavior among different browsers.
8 |
9 | ## Definitions
10 | - A) Session Only Persistence: The state is only saved in memory, and is lost or restored to the default state when encountering the following situations.
11 | - B) Across Browser Sessions Persistence: The state is persistent when exiting and restarting the browser or upgrading the browser (i.e. restarting the browser).
12 | - C) Extension Upgrading Persistence: The state is persistent when upgrading the extension to a new version, also including reload the extension (click the reload button).
13 | - D) Extension Disable and Re-enable Persistence.
14 |
15 | ## Principles
16 | - Functions declared in manifest.json, like "content_scripts" and "declarative_net_request", will be cleared and the new functions will take effect when upgrading the extension. So they are not extension upgrading persistent.
17 | - If a state is across browser sessions persistent, it should also be persistent when disabling then re-enabling the extension.
18 |
19 | ## State Management by Developers
20 | If developers want to keep states persistent across B, C or D, but the default persistence doesn't meet their needs, then developers need to maintain the states by themselves through
21 | - `runtime.onStartup()`: when the browser (or a profile in this browser) first starts.
22 | - `runtime.onInstalled()`: when installing or upgrading the extension, and when upgrading the browser.
23 | - `runtime.onEnabled()`: this api is not yet implemented.
24 |
25 | ## API List
26 |
27 | | API | Chrome | Firefox | Safari |
28 | | ------------- | ------------- | ------------- | ------------- |
29 | | action.set* (e.g. setBadgeText)| A: in MV3
2 | Title: window.browser
3 | Shortname: wecg-browser
4 | Level: 1
5 | Group: wecg
6 | Status: w3c/CG-DRAFT
7 | URL: https://w3c.github.io/webextensions/specification/window.browser.html
8 | Editor: Patrick Kettner, Google, patrickkettner@google.com
9 | Abstract: This specification reserves the window.browser
namespace for use by WebExtensions.
10 | Repository: w3c/webextensions
11 | Complain About: accidental-2119 on, missing-example-ids on
12 |
13 |
14 | 15 | spec:html; type:attribute; text:window 16 |17 | 18 |
19 | spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/ 20 | type: dfn; text: valid non-empty URL; url: valid-non-empty-url-potentially-surrounded-by-spaces 21 |22 | 23 |
chrome
namespace. When WebExtensions were adopted outside of
33 | Chromium, other vendors used the more neutral browser
namespace.
34 | That browser
is now considered the canonically correct namespace
35 | for all WebExtension APIs. Some interactions with WebExtensions (such as
36 | external messaging from websites to background processes) necessitate
37 | the exposure of this namespace to the web.
38 |
39 | Given that, this document defines window.browser
as reserved for
40 | the use of APIs designed to interact with WebExtensions. The specifics of what
41 | APIs within window.browser
are at present intentionally undefined,
42 | and are left up to User Agent implementation.
43 | window.browser
API
49 | chrome
as a global identifier for WebExtension related methods,
58 | a UA MAY define a global chrome
object that includes all
59 | properties of {{browser}}.
60 | {{browser}} and chrome
MAY be direct aliases of each other.
61 | When {{browser}} and chrome
are distinct objects, each initial
62 | property of {{browser}} SHOULD be defined on the chrome
object,
63 | and each property descriptor on the chrome
object SHOULD return
64 | the same value as the corresponding property on the {{browser}} object.
65 |
66 |
69 | // When `chrome` and `browser` are not direct aliases,
70 | // modifying one top level values will not change the other:
71 |
72 | globalThis.browser.FAKE = true
73 | console.log(globalThis.chrome.FAKE);
74 | // ^ undefined when chrome and browser are not direct aliases.
75 | // ^ may be true if browser === chrome.
76 |
77 | // Individual properties are aliased, so updating a known property
78 | // directly changes the matching property on the other
79 | globalThis.browser.runtime.FAKE = 123
80 |
81 | console.log(globalThis.chrome.runtime.FAKE);
82 | // 123
83 |
84 |
85 | 91 | partial interface Window { 92 | attribute object browser; 93 | }; 94 | 95 |96 | 97 |
108 | partial interface ServiceWorkerGlobalScope { 109 | attribute object browser; 110 | }; 111 |112 | -------------------------------------------------------------------------------- /w3c.json: -------------------------------------------------------------------------------- 1 | { 2 | "group": [131613] 3 | , "contacts": ["dotproto","xeenon"] 4 | , "repo-type": "cg-report" 5 | } 6 | --------------------------------------------------------------------------------