diff --git a/readme.md b/readme.md index 47a7a4ba..568edbc2 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ # chromex [![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg)](license.txt) [![Clojars Project](https://img.shields.io/clojars/v/binaryage/chromex.svg)](https://clojars.org/binaryage/chromex) [![Travis](https://img.shields.io/travis/binaryage/chromex.svg)](https://travis-ci.org/binaryage/chromex) [![Sample Project](https://img.shields.io/badge/project-example-ff69b4.svg)](https://github.com/binaryage/chromex-sample) -This library is auto-generated. Current version was **generated on 2018-11-07** from [**Chromium @ d3a040e**](https://chromium.googlesource.com/chromium/src.git/+/d3a040ee36ced7b00bfa0e7014ba4bb64f11a02f). +This library is auto-generated. Current version was **generated on 2018-11-21** from [**Chromium @ b793b53fd9cd**](https://chromium.googlesource.com/chromium/src.git/+/b793b53fd9cd7a07e857ac1eac5ab6f7c7fcd323). Looking for a nightly version? Check out [**nightly branch**](https://github.com/binaryage/chromex/tree/nightly) which gets updated if there are any new API changes. @@ -10,10 +10,10 @@ For Chrome Extensions and also for Chrome Apps: | API family | namespaces | properties | functions | events | | --- | --- | --- | --- | --- | -| [Public Chrome Extension APIs](src/exts) | 78 | 52 | 380 | 176 | +| [Public Chrome Extension APIs](src/exts) | 78 | 52 | 382 | 176 | | [Public Chrome App APIs](src/apps) | 69 | 30 | 452 | 152 | -| [Private Chrome Extension APIs](src/exts_private) | 40 | 1 | 363 | 68 | -| [Private Chrome App APIs](src/apps_private) | 38 | 1 | 320 | 68 | +| [Private Chrome Extension APIs](src/exts_private) | 40 | 1 | 366 | 69 | +| [Private Chrome App APIs](src/apps_private) | 37 | 1 | 314 | 66 | Note: Chromex generator uses the same data source as [developer.chrome.com/extensions/api_index](https://developer.chrome.com/extensions/api_index) and [developer.chrome.com/apps/api_index](https://developer.chrome.com/apps/api_index) docs. diff --git a/src/apps_private/chromex/app/easy_unlock_private.clj b/src/apps_private/chromex/app/easy_unlock_private.clj deleted file mode 100644 index 231d362e..00000000 --- a/src/apps_private/chromex/app/easy_unlock_private.clj +++ /dev/null @@ -1,201 +0,0 @@ -(ns chromex.app.easy-unlock-private - "chrome.easyUnlockPrivate API that provides hooks to Chrome to - be used by Easy Unlock component app. - - * available since Chrome 38" - - (:refer-clojure :only [defmacro defn apply declare meta let partial]) - (:require [chromex.wrapgen :refer [gen-wrap-helper]] - [chromex.callgen :refer [gen-call-helper gen-tap-all-events-call]])) - -(declare api-table) -(declare gen-call) - -; -- functions -------------------------------------------------------------------------------------------------------------- - -(defmacro get-strings - "Gets localized strings required to render the API. - - This function returns a core.async channel of type `promise-chan` which eventually receives a result value. - Signature of the result value put on the channel is [strings] where: - - |strings| - ? - - In case of an error the channel closes without receiving any value and relevant error object can be obtained via - chromex.error/get-last-error." - ([] (gen-call :function ::get-strings &form))) - -(defmacro show-error-bubble - "Shows an error bubble with the given |message|, anchored to an edge of the given |anchorRect| -- typically the right edge, - but possibly a different edge if there is not space for the bubble to the right of the anchor rectangle. If the - |link_range| is non-empty, renders the text within the |message| that is contained in the |link_range| as a link with the - given |link_target| URL. - - |message| - ? - |link-range| - ? - |link-target| - ? - |anchor-rect| - ?" - ([message link-range link-target anchor-rect] (gen-call :function ::show-error-bubble &form message link-range link-target anchor-rect))) - -(defmacro hide-error-bubble - "Hides the currently visible error bubble, if there is one." - ([] (gen-call :function ::hide-error-bubble &form))) - -(defmacro find-setup-connection - "Finds and connects the remote BLE device that is advertising: |setupServiceUUID|. Returns when a connection is found or - |timeOut| seconds have elapsed. - - |setup-service-uuid| - ? - |time-out| - ? - - This function returns a core.async channel of type `promise-chan` which eventually receives a result value. - Signature of the result value put on the channel is [connection-id] where: - - |connection-id| - The identifier of the connection found. To be used in future calls refering to this connection. - - In case of an error the channel closes without receiving any value and relevant error object can be obtained via - chromex.error/get-last-error." - ([setup-service-uuid time-out] (gen-call :function ::find-setup-connection &form setup-service-uuid time-out))) - -(defmacro setup-connection-disconnect - "Disconnects the connection with |connectionId|. - - |connection-id| - ? - - This function returns a core.async channel of type `promise-chan` which eventually receives a result value. - Signature of the result value put on the channel is []. - - In case of an error the channel closes without receiving any value and relevant error object can be obtained via - chromex.error/get-last-error." - ([connection-id] (gen-call :function ::setup-connection-disconnect &form connection-id))) - -(defmacro setup-connection-send - "Sends |data| through the connection with |connnectionId|. - - |connection-id| - ? - |data| - ? - - This function returns a core.async channel of type `promise-chan` which eventually receives a result value. - Signature of the result value put on the channel is []. - - In case of an error the channel closes without receiving any value and relevant error object can be obtained via - chromex.error/get-last-error." - ([connection-id data] (gen-call :function ::setup-connection-send &form connection-id data))) - -; -- events ----------------------------------------------------------------------------------------------------------------- -; -; docs: https://github.com/binaryage/chromex/#tapping-events - -(defmacro tap-on-connection-status-changed-events - "Event fired when |connectionId| change status. - - Events will be put on the |channel| with signature [::on-connection-status-changed [connection-id old-status new-status]] - where: - - |connection-id| - ? - |old-status| - ? - |new-status| - ? - - Note: |args| will be passed as additional parameters into Chrome event's .addListener call." - ([channel & args] (apply gen-call :event ::on-connection-status-changed &form channel args))) - -(defmacro tap-on-data-received-events - "Event fired when |connectionId| receives |data|. - - Events will be put on the |channel| with signature [::on-data-received [connection-id data]] where: - - |connection-id| - ? - |data| - ? - - Note: |args| will be passed as additional parameters into Chrome event's .addListener call." - ([channel & args] (apply gen-call :event ::on-data-received &form channel args))) - -(defmacro tap-on-send-completed-events - "Event fired when |connectionId| sends |data|. |success| is true if the send operation was successful. - - Events will be put on the |channel| with signature [::on-send-completed [connection-id data success]] where: - - |connection-id| - ? - |data| - ? - |success| - ? - - Note: |args| will be passed as additional parameters into Chrome event's .addListener call." - ([channel & args] (apply gen-call :event ::on-send-completed &form channel args))) - -; -- convenience ------------------------------------------------------------------------------------------------------------ - -(defmacro tap-all-events - "Taps all valid non-deprecated events in chromex.app.easy-unlock-private namespace." - [chan] - (gen-tap-all-events-call api-table (meta &form) chan)) - -; --------------------------------------------------------------------------------------------------------------------------- -; -- API TABLE -------------------------------------------------------------------------------------------------------------- -; --------------------------------------------------------------------------------------------------------------------------- - -(def api-table - {:namespace "chrome.easyUnlockPrivate", - :since "38", - :functions - [{:id ::get-strings, - :name "getStrings", - :callback? true, - :params [{:name "callback", :type :callback, :callback {:params [{:name "strings", :type "object"}]}}]} - {:id ::show-error-bubble, - :name "showErrorBubble", - :since "42", - :params - [{:name "message", :type "string"} - {:name "link-range", :type "object"} - {:name "link-target", :type "string"} - {:name "anchor-rect", :type "object"}]} - {:id ::hide-error-bubble, :name "hideErrorBubble", :since "43"} - {:id ::find-setup-connection, - :name "findSetupConnection", - :since "47", - :callback? true, - :params - [{:name "setup-service-uuid", :type "string"} - {:name "time-out", :type "integer"} - {:name "callback", :type :callback, :callback {:params [{:name "connection-id", :type "integer"}]}}]} - {:id ::setup-connection-disconnect, - :name "setupConnectionDisconnect", - :since "47", - :callback? true, - :params [{:name "connection-id", :type "integer"} {:name "callback", :optional? true, :type :callback}]} - {:id ::setup-connection-send, - :name "setupConnectionSend", - :since "47", - :callback? true, - :params - [{:name "connection-id", :type "integer"} - {:name "data", :type "ArrayBuffer"} - {:name "callback", :optional? true, :type :callback}]}], - :events - [{:id ::on-connection-status-changed, - :name "onConnectionStatusChanged", - :since "47", - :params - [{:name "connection-id", :type "integer"} - {:name "old-status", :type "easyUnlockPrivate.ConnectionStatus"} - {:name "new-status", :type "easyUnlockPrivate.ConnectionStatus"}]} - {:id ::on-data-received, - :name "onDataReceived", - :since "47", - :params [{:name "connection-id", :type "integer"} {:name "data", :type "ArrayBuffer"}]} - {:id ::on-send-completed, - :name "onSendCompleted", - :since "47", - :params - [{:name "connection-id", :type "integer"} - {:name "data", :type "ArrayBuffer"} - {:name "success", :type "boolean"}]}]}) - -; -- helpers ---------------------------------------------------------------------------------------------------------------- - -; code generation for native API wrapper -(defmacro gen-wrap [kind item-id config & args] - (apply gen-wrap-helper api-table kind item-id config args)) - -; code generation for API call-site -(def gen-call (partial gen-call-helper api-table)) \ No newline at end of file diff --git a/src/apps_private/chromex/app/easy_unlock_private.cljs b/src/apps_private/chromex/app/easy_unlock_private.cljs deleted file mode 100644 index 71815fe2..00000000 --- a/src/apps_private/chromex/app/easy_unlock_private.cljs +++ /dev/null @@ -1,34 +0,0 @@ -(ns chromex.app.easy-unlock-private (:require-macros [chromex.app.easy-unlock-private :refer [gen-wrap]]) - (:require [chromex.core])) - -; -- functions -------------------------------------------------------------------------------------------------------------- - -(defn get-strings* [config] - (gen-wrap :function ::get-strings config)) - -(defn show-error-bubble* [config message link-range link-target anchor-rect] - (gen-wrap :function ::show-error-bubble config message link-range link-target anchor-rect)) - -(defn hide-error-bubble* [config] - (gen-wrap :function ::hide-error-bubble config)) - -(defn find-setup-connection* [config setup-service-uuid time-out] - (gen-wrap :function ::find-setup-connection config setup-service-uuid time-out)) - -(defn setup-connection-disconnect* [config connection-id] - (gen-wrap :function ::setup-connection-disconnect config connection-id)) - -(defn setup-connection-send* [config connection-id data] - (gen-wrap :function ::setup-connection-send config connection-id data)) - -; -- events ----------------------------------------------------------------------------------------------------------------- - -(defn on-connection-status-changed* [config channel & args] - (gen-wrap :event ::on-connection-status-changed config channel args)) - -(defn on-data-received* [config channel & args] - (gen-wrap :event ::on-data-received config channel args)) - -(defn on-send-completed* [config channel & args] - (gen-wrap :event ::on-send-completed config channel args)) - diff --git a/src/apps_private/chromex/app/file_manager_private.clj b/src/apps_private/chromex/app/file_manager_private.clj index ed5f0cac..8241a7d3 100644 --- a/src/apps_private/chromex/app/file_manager_private.clj +++ b/src/apps_private/chromex/app/file_manager_private.clj @@ -882,6 +882,15 @@ Note: |args| will be passed as additional parameters into Chrome event's .addListener call." ([channel & args] (apply gen-call :event ::on-apps-updated &form channel args))) +(defmacro tap-on-crostini-shared-paths-changed-events + " + Events will be put on the |channel| with signature [::on-crostini-shared-paths-changed [event]] where: + + |event| - ? + + Note: |args| will be passed as additional parameters into Chrome event's .addListener call." + ([channel & args] (apply gen-call :event ::on-crostini-shared-paths-changed &form channel args))) + ; -- convenience ------------------------------------------------------------------------------------------------------------ (defmacro tap-all-events @@ -1262,7 +1271,11 @@ {:id ::on-drive-connection-status-changed, :name "onDriveConnectionStatusChanged"} {:id ::on-device-changed, :name "onDeviceChanged", :params [{:name "event", :type "object"}]} {:id ::on-drive-sync-error, :name "onDriveSyncError", :params [{:name "event", :type "object"}]} - {:id ::on-apps-updated, :name "onAppsUpdated", :since "57"}]}) + {:id ::on-apps-updated, :name "onAppsUpdated", :since "57"} + {:id ::on-crostini-shared-paths-changed, + :name "onCrostiniSharedPathsChanged", + :since "72", + :params [{:name "event", :type "object"}]}]}) ; -- helpers ---------------------------------------------------------------------------------------------------------------- diff --git a/src/apps_private/chromex/app/file_manager_private.cljs b/src/apps_private/chromex/app/file_manager_private.cljs index c4905b32..c88e373c 100644 --- a/src/apps_private/chromex/app/file_manager_private.cljs +++ b/src/apps_private/chromex/app/file_manager_private.cljs @@ -218,3 +218,6 @@ (defn on-apps-updated* [config channel & args] (gen-wrap :event ::on-apps-updated config channel args)) +(defn on-crostini-shared-paths-changed* [config channel & args] + (gen-wrap :event ::on-crostini-shared-paths-changed config channel args)) + diff --git a/src/apps_private/readme.md b/src/apps_private/readme.md index fbf403ce..6c691e23 100644 --- a/src/apps_private/readme.md +++ b/src/apps_private/readme.md @@ -15,7 +15,6 @@ | [chrome.commandLinePrivate](https://developer.chrome.com/extensions/commandLinePrivate) | [chromex/app/command_line_private.clj](chromex/app/command_line_private.clj) | | [chrome.dashboardPrivate](https://developer.chrome.com/extensions/dashboardPrivate) | [chromex/app/dashboard_private.clj](chromex/app/dashboard_private.clj) | | [chrome.developerPrivate](https://developer.chrome.com/extensions/developerPrivate) | [chromex/app/developer_private.clj](chromex/app/developer_private.clj) | -| [chrome.easyUnlockPrivate](https://developer.chrome.com/extensions/easyUnlockPrivate) | [chromex/app/easy_unlock_private.clj](chromex/app/easy_unlock_private.clj) | | [chrome.echoPrivate](https://developer.chrome.com/extensions/echoPrivate) | [chromex/app/echo_private.clj](chromex/app/echo_private.clj) | | [chrome.feedbackPrivate](https://developer.chrome.com/extensions/feedbackPrivate) | [chromex/app/feedback_private.clj](chromex/app/feedback_private.clj) | | [chrome.fileManagerPrivate](https://developer.chrome.com/extensions/fileManagerPrivate) | [chromex/app/file_manager_private.clj](chromex/app/file_manager_private.clj) | @@ -46,7 +45,7 @@ ### API stats -Generated 38 namespaces containing 1 properties, 320 functions and 68 events: +Generated 37 namespaces containing 1 properties, 314 functions and 66 events: | :namespace | :properties | :functions | :events | @@ -62,10 +61,9 @@ Generated 38 namespaces containing 1 properties, 320 functions and 68 events: | chrome.commandLinePrivate | 0 | 1 | 0 | | chrome.dashboardPrivate | 0 | 1 | 0 | | chrome.developerPrivate | 0 | 31 | 2 | - | chrome.easyUnlockPrivate | 0 | 6 | 3 | | chrome.echoPrivate | 0 | 5 | 0 | | chrome.feedbackPrivate | 0 | 6 | 1 | - | chrome.fileManagerPrivate | 0 | 62 | 9 | + | chrome.fileManagerPrivate | 0 | 62 | 10 | | chrome.identityPrivate | 0 | 0 | 1 | | chrome.imageWriterPrivate | 0 | 5 | 5 | | chrome.inputMethodPrivate | 0 | 13 | 8 | @@ -147,11 +145,6 @@ Generated 38 namespaces containing 1 properties, 320 functions and 68 events: update-extension-command add-host-permission remove-host-permission enable allow-incognito allow-file-access inspect tap-on-item-state-changed tap-on-profile-state-changed tap-all-events]] - [chromex.app.easy-unlock-private refer:[ - get-strings show-error-bubble hide-error-bubble find-setup-connection setup-connection-disconnect - setup-connection-send tap-on-connection-status-changed tap-on-data-received tap-on-send-completed - tap-all-events]] - [chromex.app.echo-private refer:[ set-offer-info get-offer-info get-registration-code get-oobe-timestamp get-user-consent tap-all-events]] @@ -175,7 +168,8 @@ Generated 38 namespaces containing 1 properties, 320 functions and 68 events: get-crostini-shared-paths get-linux-package-info install-linux-package get-thumbnail detect-character-encoding tap-on-mount-completed tap-on-file-transfers-updated tap-on-copy-progress tap-on-directory-changed tap-on-preferences-changed tap-on-drive-connection-status-changed - tap-on-device-changed tap-on-drive-sync-error tap-on-apps-updated tap-all-events]] + tap-on-device-changed tap-on-drive-sync-error tap-on-apps-updated + tap-on-crostini-shared-paths-changed tap-all-events]] [chromex.app.identity-private refer:[ tap-on-web-flow-request tap-all-events]] diff --git a/src/exts/chromex/ext/browsing_data.clj b/src/exts/chromex/ext/browsing_data.clj index 05d0a7c9..3ebd0822 100644 --- a/src/exts/chromex/ext/browsing_data.clj +++ b/src/exts/chromex/ext/browsing_data.clj @@ -72,6 +72,20 @@ https://developer.chrome.com/extensions/browsingData#method-removeCache." ([options] (gen-call :function ::remove-cache &form options))) +(defmacro remove-cache-storage + "Clears websites' cache storage data. + + |options| - https://developer.chrome.com/extensions/browsingData#property-removeCacheStorage-options. + + This function returns a core.async channel of type `promise-chan` which eventually receives a result value. + Signature of the result value put on the channel is []. + + In case of an error the channel closes without receiving any value and relevant error object can be obtained via + chromex.error/get-last-error. + + https://developer.chrome.com/extensions/browsingData#method-removeCacheStorage." + ([options] (gen-call :function ::remove-cache-storage &form options))) + (defmacro remove-cookies "Clears the browser's cookies and server-bound certificates modified within a particular timeframe. @@ -198,6 +212,20 @@ https://developer.chrome.com/extensions/browsingData#method-removePasswords." ([options] (gen-call :function ::remove-passwords &form options))) +(defmacro remove-service-workers + "Clears websites' service workers. + + |options| - https://developer.chrome.com/extensions/browsingData#property-removeServiceWorkers-options. + + This function returns a core.async channel of type `promise-chan` which eventually receives a result value. + Signature of the result value put on the channel is []. + + In case of an error the channel closes without receiving any value and relevant error object can be obtained via + chromex.error/get-last-error. + + https://developer.chrome.com/extensions/browsingData#method-removeServiceWorkers." + ([options] (gen-call :function ::remove-service-workers &form options))) + (defmacro remove-web-sql "Clears websites' WebSQL data. @@ -248,6 +276,12 @@ :callback? true, :params [{:name "options", :type "browsingData.RemovalOptions"} {:name "callback", :optional? true, :type :callback}]} + {:id ::remove-cache-storage, + :name "removeCacheStorage", + :since "master", + :callback? true, + :params + [{:name "options", :type "browsingData.RemovalOptions"} {:name "callback", :optional? true, :type :callback}]} {:id ::remove-cookies, :name "removeCookies", :callback? true, @@ -293,6 +327,12 @@ :callback? true, :params [{:name "options", :type "browsingData.RemovalOptions"} {:name "callback", :optional? true, :type :callback}]} + {:id ::remove-service-workers, + :name "removeServiceWorkers", + :since "master", + :callback? true, + :params + [{:name "options", :type "browsingData.RemovalOptions"} {:name "callback", :optional? true, :type :callback}]} {:id ::remove-web-sql, :name "removeWebSQL", :callback? true, diff --git a/src/exts/chromex/ext/browsing_data.cljs b/src/exts/chromex/ext/browsing_data.cljs index f0ed8fc0..99d3ce59 100644 --- a/src/exts/chromex/ext/browsing_data.cljs +++ b/src/exts/chromex/ext/browsing_data.cljs @@ -15,6 +15,9 @@ (defn remove-cache* [config options] (gen-wrap :function ::remove-cache config options)) +(defn remove-cache-storage* [config options] + (gen-wrap :function ::remove-cache-storage config options)) + (defn remove-cookies* [config options] (gen-wrap :function ::remove-cookies config options)) @@ -42,6 +45,9 @@ (defn remove-passwords* [config options] (gen-wrap :function ::remove-passwords config options)) +(defn remove-service-workers* [config options] + (gen-wrap :function ::remove-service-workers config options)) + (defn remove-web-sql* [config options] (gen-wrap :function ::remove-web-sql config options)) diff --git a/src/exts/readme.md b/src/exts/readme.md index 77e5dcaf..fb5248dc 100644 --- a/src/exts/readme.md +++ b/src/exts/readme.md @@ -86,7 +86,7 @@ ### API stats -Generated 78 namespaces containing 52 properties, 380 functions and 176 events: +Generated 78 namespaces containing 52 properties, 382 functions and 176 events: | :namespace | :properties | :functions | :events | @@ -99,7 +99,7 @@ Generated 78 namespaces containing 52 properties, 380 functions and 176 events: | chrome.bluetooth | 0 | 5 | 4 | | chrome.bookmarks | 2 | 11 | 7 | | chrome.browserAction | 0 | 11 | 1 | - | chrome.browsingData | 0 | 14 | 0 | + | chrome.browsingData | 0 | 16 | 0 | | chrome.cast.streaming.receiverSession | 0 | 1 | 0 | | chrome.cast.streaming.rtpStream | 0 | 7 | 3 | | chrome.cast.streaming.session | 0 | 1 | 0 | @@ -210,9 +210,9 @@ Generated 78 namespaces containing 52 properties, 380 functions and 176 events: set-badge-background-color get-badge-background-color enable disable tap-on-clicked tap-all-events]] [chromex.ext.browsing-data refer:[ - settings remove remove-appcache remove-cache remove-cookies remove-downloads remove-file-systems - remove-form-data remove-history remove-indexed-db remove-local-storage remove-plugin-data - remove-passwords remove-web-sql tap-all-events]] + settings remove remove-appcache remove-cache remove-cache-storage remove-cookies remove-downloads + remove-file-systems remove-form-data remove-history remove-indexed-db remove-local-storage + remove-plugin-data remove-passwords remove-service-workers remove-web-sql tap-all-events]] [chromex.ext.cast.streaming.receiver-session refer:[ create-and-bind tap-all-events]] diff --git a/src/exts_private/chromex/ext/autotest_private.clj b/src/exts_private/chromex/ext/autotest_private.clj index 369e673b..7d790809 100644 --- a/src/exts_private/chromex/ext/autotest_private.clj +++ b/src/exts_private/chromex/ext/autotest_private.clj @@ -157,6 +157,18 @@ chromex.error/get-last-error." ([app-id] (gen-call :function ::is-app-shown &form app-id))) +(defmacro is-arc-provisioned + "Returns true if ARC is provisioned. + + This function returns a core.async channel of type `promise-chan` which eventually receives a result value. + Signature of the result value put on the channel is [arc-provisioned] where: + + |arc-provisioned| - ? + + In case of an error the channel closes without receiving any value and relevant error object can be obtained via + chromex.error/get-last-error." + ([] (gen-call :function ::is-arc-provisioned &form))) + (defmacro launch-app "Launches an application from the launcher with the given appId. @@ -263,6 +275,19 @@ chromex.error/get-last-error." ([] (gen-call :function ::bootstrap-machine-learning-service &form))) +(defmacro set-assistant-enabled + "Enable/disable the Google Assistant + + |enabled| - ? + |timeout-ms| - ? + + This function returns a core.async channel of type `promise-chan` which eventually receives a result value. + Signature of the result value put on the channel is []. + + In case of an error the channel closes without receiving any value and relevant error object can be obtained via + chromex.error/get-last-error." + ([enabled timeout-ms] (gen-call :function ::set-assistant-enabled &form enabled timeout-ms))) + ; -- convenience ------------------------------------------------------------------------------------------------------------ (defmacro tap-all-events @@ -328,6 +353,11 @@ :params [{:name "app-id", :type "string"} {:name "callback", :type :callback, :callback {:params [{:name "app-shown", :type "boolean"}]}}]} + {:id ::is-arc-provisioned, + :name "isArcProvisioned", + :since "master", + :callback? true, + :params [{:name "callback", :type :callback, :callback {:params [{:name "arc-provisioned", :type "boolean"}]}}]} {:id ::launch-app, :name "launchApp", :since "71", @@ -374,7 +404,13 @@ :name "bootstrapMachineLearningService", :since "71", :callback? true, - :params [{:name "callback", :type :callback}]}]}) + :params [{:name "callback", :type :callback}]} + {:id ::set-assistant-enabled, + :name "setAssistantEnabled", + :since "master", + :callback? true, + :params + [{:name "enabled", :type "boolean"} {:name "timeout-ms", :type "integer"} {:name "callback", :type :callback}]}]}) ; -- helpers ---------------------------------------------------------------------------------------------------------------- diff --git a/src/exts_private/chromex/ext/autotest_private.cljs b/src/exts_private/chromex/ext/autotest_private.cljs index d8fcaeb2..c7903907 100644 --- a/src/exts_private/chromex/ext/autotest_private.cljs +++ b/src/exts_private/chromex/ext/autotest_private.cljs @@ -60,6 +60,9 @@ (defn is-app-shown* [config app-id] (gen-wrap :function ::is-app-shown config app-id)) +(defn is-arc-provisioned* [config] + (gen-wrap :function ::is-arc-provisioned config)) + (defn launch-app* [config app-id] (gen-wrap :function ::launch-app config app-id)) @@ -90,3 +93,6 @@ (defn bootstrap-machine-learning-service* [config] (gen-wrap :function ::bootstrap-machine-learning-service config)) +(defn set-assistant-enabled* [config enabled timeout-ms] + (gen-wrap :function ::set-assistant-enabled config enabled timeout-ms)) + diff --git a/src/exts_private/chromex/ext/cryptotoken_private.clj b/src/exts_private/chromex/ext/cryptotoken_private.clj index 54d3d958..c9c195e5 100644 --- a/src/exts_private/chromex/ext/cryptotoken_private.clj +++ b/src/exts_private/chromex/ext/cryptotoken_private.clj @@ -66,6 +66,18 @@ chromex.error/get-last-error." ([options] (gen-call :function ::can-app-id-get-attestation &form options))) +(defmacro can-proxy-to-web-authn + "Checks whether Cryptotoken can proxy the request through to WebAuthn. + + This function returns a core.async channel of type `promise-chan` which eventually receives a result value. + Signature of the result value put on the channel is [result] where: + + |result| - ? + + In case of an error the channel closes without receiving any value and relevant error object can be obtained via + chromex.error/get-last-error." + ([] (gen-call :function ::can-proxy-to-web-authn &form))) + ; -- convenience ------------------------------------------------------------------------------------------------------------ (defmacro tap-all-events @@ -102,7 +114,12 @@ :callback? true, :params [{:name "options", :type "object"} - {:name "callback", :type :callback, :callback {:params [{:name "result", :type "boolean"}]}}]}]}) + {:name "callback", :type :callback, :callback {:params [{:name "result", :type "boolean"}]}}]} + {:id ::can-proxy-to-web-authn, + :name "canProxyToWebAuthn", + :since "master", + :callback? true, + :params [{:name "callback", :type :callback, :callback {:params [{:name "result", :type "boolean"}]}}]}]}) ; -- helpers ---------------------------------------------------------------------------------------------------------------- diff --git a/src/exts_private/chromex/ext/cryptotoken_private.cljs b/src/exts_private/chromex/ext/cryptotoken_private.cljs index 70c7f66a..8126ba21 100644 --- a/src/exts_private/chromex/ext/cryptotoken_private.cljs +++ b/src/exts_private/chromex/ext/cryptotoken_private.cljs @@ -12,3 +12,6 @@ (defn can-app-id-get-attestation* [config options] (gen-wrap :function ::can-app-id-get-attestation config options)) +(defn can-proxy-to-web-authn* [config] + (gen-wrap :function ::can-proxy-to-web-authn config)) + diff --git a/src/exts_private/chromex/ext/file_manager_private.clj b/src/exts_private/chromex/ext/file_manager_private.clj index 6f935d6c..c01c8aae 100644 --- a/src/exts_private/chromex/ext/file_manager_private.clj +++ b/src/exts_private/chromex/ext/file_manager_private.clj @@ -882,6 +882,15 @@ Note: |args| will be passed as additional parameters into Chrome event's .addListener call." ([channel & args] (apply gen-call :event ::on-apps-updated &form channel args))) +(defmacro tap-on-crostini-shared-paths-changed-events + " + Events will be put on the |channel| with signature [::on-crostini-shared-paths-changed [event]] where: + + |event| - ? + + Note: |args| will be passed as additional parameters into Chrome event's .addListener call." + ([channel & args] (apply gen-call :event ::on-crostini-shared-paths-changed &form channel args))) + ; -- convenience ------------------------------------------------------------------------------------------------------------ (defmacro tap-all-events @@ -1262,7 +1271,11 @@ {:id ::on-drive-connection-status-changed, :name "onDriveConnectionStatusChanged"} {:id ::on-device-changed, :name "onDeviceChanged", :params [{:name "event", :type "object"}]} {:id ::on-drive-sync-error, :name "onDriveSyncError", :params [{:name "event", :type "object"}]} - {:id ::on-apps-updated, :name "onAppsUpdated", :since "57"}]}) + {:id ::on-apps-updated, :name "onAppsUpdated", :since "57"} + {:id ::on-crostini-shared-paths-changed, + :name "onCrostiniSharedPathsChanged", + :since "72", + :params [{:name "event", :type "object"}]}]}) ; -- helpers ---------------------------------------------------------------------------------------------------------------- diff --git a/src/exts_private/chromex/ext/file_manager_private.cljs b/src/exts_private/chromex/ext/file_manager_private.cljs index c14e349b..3fa9c38c 100644 --- a/src/exts_private/chromex/ext/file_manager_private.cljs +++ b/src/exts_private/chromex/ext/file_manager_private.cljs @@ -218,3 +218,6 @@ (defn on-apps-updated* [config channel & args] (gen-wrap :event ::on-apps-updated config channel args)) +(defn on-crostini-shared-paths-changed* [config channel & args] + (gen-wrap :event ::on-crostini-shared-paths-changed config channel args)) + diff --git a/src/exts_private/readme.md b/src/exts_private/readme.md index a5c6f253..35aeedd2 100644 --- a/src/exts_private/readme.md +++ b/src/exts_private/readme.md @@ -48,7 +48,7 @@ ### API stats -Generated 40 namespaces containing 1 properties, 363 functions and 68 events: +Generated 40 namespaces containing 1 properties, 366 functions and 69 events: | :namespace | :properties | :functions | :events | @@ -56,21 +56,21 @@ Generated 40 namespaces containing 1 properties, 363 functions and 68 events: | chrome.accessibilityPrivate | 0 | 12 | 5 | | chrome.activityLogPrivate | 0 | 4 | 1 | | chrome.autofillPrivate | 0 | 10 | 2 | - | chrome.autotestPrivate | 0 | 29 | 0 | + | chrome.autotestPrivate | 0 | 31 | 0 | | chrome.bluetoothPrivate | 0 | 7 | 1 | | chrome.bookmarkManagerPrivate | 0 | 20 | 4 | | chrome.brailleDisplayPrivate | 0 | 3 | 2 | | chrome.chromeosInfoPrivate | 0 | 2 | 0 | | chrome.cloudPrintPrivate | 0 | 4 | 0 | | chrome.commandLinePrivate | 0 | 1 | 0 | - | chrome.cryptotokenPrivate | 0 | 3 | 0 | + | chrome.cryptotokenPrivate | 0 | 4 | 0 | | chrome.dashboardPrivate | 0 | 1 | 0 | | chrome.developerPrivate | 0 | 31 | 2 | | chrome.echoPrivate | 0 | 5 | 0 | | chrome.enterprise.platformKeysPrivate | 0 | 2 | 0 | | chrome.enterprise.reportingPrivate | 0 | 2 | 0 | | chrome.feedbackPrivate | 0 | 6 | 1 | - | chrome.fileManagerPrivate | 0 | 62 | 9 | + | chrome.fileManagerPrivate | 0 | 62 | 10 | | chrome.imageWriterPrivate | 0 | 5 | 5 | | chrome.inputMethodPrivate | 0 | 13 | 8 | | chrome.languageSettingsPrivate | 0 | 14 | 4 | @@ -120,10 +120,10 @@ Generated 40 namespaces containing 1 properties, 363 functions and 68 events: logout restart shutdown login-status lock-screen get-extensions-info simulate-asan-memory-bug set-touchpad-sensitivity set-tap-to-click set-three-finger-click set-tap-dragging set-natural-scroll set-mouse-sensitivity set-primary-button-right set-mouse-reverse-scroll - get-visible-notifications get-play-store-state get-printer-list is-app-shown launch-app - update-printer remove-printer set-play-store-enabled get-histogram run-crostini-installer - run-crostini-uninstaller set-crostini-enabled take-screenshot bootstrap-machine-learning-service - tap-all-events]] + get-visible-notifications get-play-store-state get-printer-list is-app-shown is-arc-provisioned + launch-app update-printer remove-printer set-play-store-enabled get-histogram + run-crostini-installer run-crostini-uninstaller set-crostini-enabled take-screenshot + bootstrap-machine-learning-service set-assistant-enabled tap-all-events]] [chromex.ext.bluetooth-private refer:[ set-adapter-state set-pairing-response disconnect-all forget-device set-discovery-filter connect @@ -150,7 +150,7 @@ Generated 40 namespaces containing 1 properties, 363 functions and 68 events: [chromex.ext.cryptotoken-private refer:[ can-origin-assert-app-id is-app-id-hash-in-enterprise-context can-app-id-get-attestation - tap-all-events]] + can-proxy-to-web-authn tap-all-events]] [chromex.ext.dashboard-private refer:[ show-permission-prompt-for-delegated-install tap-all-events]] @@ -193,7 +193,8 @@ Generated 40 namespaces containing 1 properties, 363 functions and 68 events: get-crostini-shared-paths get-linux-package-info install-linux-package get-thumbnail detect-character-encoding tap-on-mount-completed tap-on-file-transfers-updated tap-on-copy-progress tap-on-directory-changed tap-on-preferences-changed tap-on-drive-connection-status-changed - tap-on-device-changed tap-on-drive-sync-error tap-on-apps-updated tap-all-events]] + tap-on-device-changed tap-on-drive-sync-error tap-on-apps-updated + tap-on-crostini-shared-paths-changed tap-all-events]] [chromex.ext.image-writer-private refer:[ write-from-url write-from-file cancel-write destroy-partitions list-removable-storage-devices