-
Notifications
You must be signed in to change notification settings - Fork 21
/
autotest_private.clj
1726 lines (1339 loc) · 72.1 KB
/
autotest_private.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(ns chromex.ext.autotest-private
"API for integration testing. To be used on test images with a test component
extension.
* available since Chrome 36"
(: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 initialize-events
"Must be called to allow autotestPrivateAPI events to be fired."
([] (gen-call :function ::initialize-events &form)))
(defmacro logout
"Logout of a user session."
([] (gen-call :function ::logout &form)))
(defmacro restart
"Restart the browser."
([] (gen-call :function ::restart &form)))
(defmacro shutdown
"Shutdown the browser.
|force| - if set, ignore ongoing downloads and onunbeforeunload handlers."
([force] (gen-call :function ::shutdown &form force)))
(defmacro login-status
"Get login status.
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 [status] where:
|status| - ?
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 ::login-status &form)))
(defmacro lock-screen
"Locks the screen."
([] (gen-call :function ::lock-screen &form)))
(defmacro get-extensions-info
"Get info about installed extensions.
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 [info] where:
|info| - ?
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-extensions-info &form)))
(defmacro get-all-enterprise-policies
"Get state of the policies. Will contain device policies and policies from the active profile. The policy values are
formatted as they would be for exporting in chrome://policy.
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 [all-policies] where:
|all-policies| - ?
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-all-enterprise-policies &form)))
(defmacro refresh-enterprise-policies
"Refreshes the Enterprise Policies.
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."
([] (gen-call :function ::refresh-enterprise-policies &form)))
(defmacro simulate-asan-memory-bug
"Simulates a memory access bug for asan testing."
([] (gen-call :function ::simulate-asan-memory-bug &form)))
(defmacro set-touchpad-sensitivity
"Set the touchpad pointer sensitivity setting.
|value| - the pointer sensitivity setting index."
([value] (gen-call :function ::set-touchpad-sensitivity &form value)))
(defmacro set-tap-to-click
"Turn on/off tap-to-click for the touchpad.
|enabled| - if set, enable tap-to-click."
([enabled] (gen-call :function ::set-tap-to-click &form enabled)))
(defmacro set-three-finger-click
"Turn on/off three finger click for the touchpad.
|enabled| - if set, enable three finger click."
([enabled] (gen-call :function ::set-three-finger-click &form enabled)))
(defmacro set-tap-dragging
"Turn on/off tap dragging for the touchpad.
|enabled| - if set, enable tap dragging."
([enabled] (gen-call :function ::set-tap-dragging &form enabled)))
(defmacro set-natural-scroll
"Turn on/off Australian scrolling for devices other than wheel mouse.
|enabled| - if set, enable Australian scrolling."
([enabled] (gen-call :function ::set-natural-scroll &form enabled)))
(defmacro set-mouse-sensitivity
"Set the mouse pointer sensitivity setting.
|value| - the pointer sensitivity setting index."
([value] (gen-call :function ::set-mouse-sensitivity &form value)))
(defmacro set-primary-button-right
"Swap the primary mouse button for left click.
|right| - if set, swap the primary mouse button."
([right] (gen-call :function ::set-primary-button-right &form right)))
(defmacro set-mouse-reverse-scroll
"Turn on/off reverse scrolling for mice.
|enabled| - if set, enable reverse scrolling."
([enabled] (gen-call :function ::set-mouse-reverse-scroll &form enabled)))
(defmacro get-visible-notifications
"Get visible notifications on the system.
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 [notifications] where:
|notifications| - ?
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-visible-notifications &form)))
(defmacro remove-all-notifications
"Remove all notifications.
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."
([] (gen-call :function ::remove-all-notifications &form)))
(defmacro get-arc-start-time
"Get ARC start time.
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 [start-time] where:
|start-time| - ?
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-arc-start-time &form)))
(defmacro get-arc-state
"Get state of the ARC session.
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 ::get-arc-state &form)))
(defmacro get-play-store-state
"Get state of the Play Store.
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 ::get-play-store-state &form)))
(defmacro get-printer-list
"Get list of available printers
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 [printers] where:
|printers| - ?
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-printer-list &form)))
(defmacro is-app-shown
"Returns true if requested app is shown in Chrome.
|app-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 [app-shown] where:
|app-shown| - ?
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."
([app-id] (gen-call :function ::is-app-shown &form app-id)))
(defmacro is-arc-provisioned
"Returns true if ARC is provisioned. [deprecated='Use getArcState()']
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 get-arc-app
"Gets information about the requested ARC app.
|app-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 [package] where:
|package| - ?
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."
([app-id] (gen-call :function ::get-arc-app &form app-id)))
(defmacro get-arc-package
"Gets information about requested ARC package.
|package-name| - ?
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 [package] where:
|package| - ?
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."
([package-name] (gen-call :function ::get-arc-package &form package-name)))
(defmacro wait-for-system-web-apps-install
"Waits for system web apps to complete the installation.
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."
([] (gen-call :function ::wait-for-system-web-apps-install &form)))
(defmacro get-registered-system-web-apps
"Returns the number of system web apps that should be installed.
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 [system-apps] where:
|system-apps| - ?
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-registered-system-web-apps &form)))
(defmacro launch-arc-app
"Launches ARC app with optional intent. Returns true if ARC is active, app exists and launch request is passed to Android.
|app-id| - ?
|intent| - ?
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 [app-launched] where:
|app-launched| - ?
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."
([app-id intent] (gen-call :function ::launch-arc-app &form app-id intent)))
(defmacro launch-app
"Launches an application from the launcher with the given appId.
|app-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."
([app-id] (gen-call :function ::launch-app &form app-id)))
(defmacro launch-system-web-app
"Launches an system web app from the launcher with the given app name and url.
|app-name| - ?
|url| - ?
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."
([app-name url] (gen-call :function ::launch-system-web-app &form app-name url)))
(defmacro close-app
"Closes an application the given appId in case it was running.
|app-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."
([app-id] (gen-call :function ::close-app &form app-id)))
(defmacro update-printer
"Update printer. Printer with empty ID is considered new.
|printer| - ?"
([printer] (gen-call :function ::update-printer &form printer)))
(defmacro remove-printer
"Remove printer.
|printer-id| - ?"
([printer-id] (gen-call :function ::remove-printer &form printer-id)))
(defmacro set-play-store-enabled
"Enable/disable the Play Store.
|enabled| - if set, enable the Play Store.
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] (gen-call :function ::set-play-store-enabled &form enabled)))
(defmacro get-clipboard-text-data
"Get text from ui::Clipboard.
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 [data] where:
|data| - ?
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-clipboard-text-data &form)))
(defmacro set-clipboard-text-data
"Set text in ui::Clipbaord.
|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."
([data] (gen-call :function ::set-clipboard-text-data &form data)))
(defmacro run-crostini-installer
"Run the crostini installer GUI to install the default crostini vm / container and create sshfs mount. The installer
launches the crostini terminal app on completion. The installer expects that crostini is not already installed.
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."
([] (gen-call :function ::run-crostini-installer &form)))
(defmacro run-crostini-uninstaller
"Run the crostini uninstaller GUI to remove the default crostini vm / container. The callback is invoked upon completion.
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."
([] (gen-call :function ::run-crostini-uninstaller &form)))
(defmacro set-crostini-enabled
"Enable/disable Crostini in preferences.
|enabled| - Enable Crostini.
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] (gen-call :function ::set-crostini-enabled &form enabled)))
(defmacro export-crostini
"Export the crostini container.
|path| - The path in Downloads to save the export.
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."
([path] (gen-call :function ::export-crostini &form path)))
(defmacro import-crostini
"Import the crostini container.
|path| - The path in Downloads to read the import.
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."
([path] (gen-call :function ::import-crostini &form path)))
(defmacro set-plugin-vm-policy
"Sets mock Plugin VM policy.
|image-url| - URL to the image to install.
|image-hash| - Hash for the provided image.
|license-key| - License key for Plugin VM."
([image-url image-hash license-key] (gen-call :function ::set-plugin-vm-policy &form image-url image-hash license-key)))
(defmacro show-plugin-vm-installer
"Shows the Plugin VM installer. Does not start installation."
([] (gen-call :function ::show-plugin-vm-installer &form)))
(defmacro register-component
"Register a component with CrOSComponentManager.
|name| - The name of the component.
|path| - Path to the component."
([name path] (gen-call :function ::register-component &form name path)))
(defmacro take-screenshot
"Takes a screenshot and returns the data in base64 encoded PNG format.
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 [base64-png] where:
|base64-png| - ?
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 ::take-screenshot &form)))
(defmacro take-screenshot-for-display
"Tasks a screenshot for a display.
|display-id| - the display id of the display.
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 [base64-png] where:
|base64-png| - ?
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."
([display-id] (gen-call :function ::take-screenshot-for-display &form display-id)))
(defmacro bootstrap-machine-learning-service
"Makes a basic request to ML Service, triggering 1. ML Service daemon startup, and 2. the initial D-Bus -> Mojo IPC
bootstrap.
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."
([] (gen-call :function ::bootstrap-machine-learning-service &form)))
(defmacro set-assistant-enabled
"Enables/disables 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)))
(defmacro enable-assistant-and-wait-for-ready
"Bring up the Assistant service, and wait for the ready signal.
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."
([] (gen-call :function ::enable-assistant-and-wait-for-ready &form)))
(defmacro send-assistant-text-query
"Sends a text query via Google Assistant.
|query| - ?
|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 [status] where:
|status| - ?
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."
([query timeout-ms] (gen-call :function ::send-assistant-text-query &form query timeout-ms)))
(defmacro wait-for-assistant-query-status
"Invokes |callback| once the current text/voice interaction is completed. Responds with the the query status if any valid
response was caught before the timeout. This API should be called before sending the query. To use it for testing a voice
query via OKG in Autotest, for example, you can do:// Enable hotword setting for Assistant.
assistant_util.enable_hotword();// Call this API with your callback function.
chrome.autotestPrivate.waitForAssistantQueryStatus(timeout_s, function(status) {...});then start Assistant via OKG
and send voice query before timeout.TODO(meilinw@): disable warmer welcome to avoid an unintended early return of this API
when launching Assistant via hotkey. TODO(meilinw@): update the comment above to use Tast instead after adding API to
enable hotword in Tast.
|timeout-s| - ?
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 [status] where:
|status| - ?
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."
([timeout-s] (gen-call :function ::wait-for-assistant-query-status &form timeout-s)))
(defmacro is-arc-package-list-initial-refreshed
"Whether the local list of installed ARC packages has been refreshed for the first time after user login.
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 [refreshed] where:
|refreshed| - ?
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-package-list-initial-refreshed &form)))
(defmacro set-whitelisted-pref
"Set value for the specified user pref in the pref tree.
|pref-name| - ?
|value| - ?
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."
([pref-name value] (gen-call :function ::set-whitelisted-pref &form pref-name value)))
(defmacro set-crostini-app-scaled
"Enable/disable a Crostini app's 'scaled' property.
|app-id| - The Crostini application ID.
|scaled| - The app is 'scaled' when shown, which means it uses low display density.
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."
([app-id scaled] (gen-call :function ::set-crostini-app-scaled &form app-id scaled)))
(defmacro get-primary-display-scale-factor
"Get the primary display scale factor. |callback| is invoked with the scale factor.
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 [scale-factor] where:
|scale-factor| - ?
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-primary-display-scale-factor &form)))
(defmacro is-tablet-mode-enabled
"Get the tablet mode enabled status. |callback| is invoked with the tablet mode enablement status.
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 [enabled] where:
|enabled| - ?
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-tablet-mode-enabled &form)))
(defmacro set-tablet-mode-enabled
"Enable/disable tablet mode. After calling this function, it won't be possible to physically switch to/from tablet mode
since that functionality will be disabled.
|enabled| - if set, enable tablet mode.
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 [enabled] where:
|enabled| - ?
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] (gen-call :function ::set-tablet-mode-enabled &form enabled)))
(defmacro get-all-installed-apps
"Get the list of all installed applications
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 [apps] where:
|apps| - ?
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-all-installed-apps &form)))
(defmacro get-shelf-items
"Get the list of all shelf items
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 [items] where:
|items| - ?
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-shelf-items &form)))
(defmacro get-shelf-auto-hide-behavior
"Get the shelf auto hide behavior.
|display-id| - display that contains the shelf. |callback| is invoked with the shelf auto hide behavior. Possible
behavior values are: 'always', 'never' or 'hidden'.
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 [behavior] where:
|behavior| - ?
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."
([display-id] (gen-call :function ::get-shelf-auto-hide-behavior &form display-id)))
(defmacro set-shelf-auto-hide-behavior
"Set the shelf auto hide behavior.
|display-id| - display that contains the shelf.
|behavior| - an enum of 'always', 'never' or 'hidden'.
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."
([display-id behavior] (gen-call :function ::set-shelf-auto-hide-behavior &form display-id behavior)))
(defmacro get-shelf-alignment
"Get the shelf alignment.
|display-id| - display that contains the shelf. |callback| is invoked with the shelf alignment type.
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 [alignment] where:
|alignment| - ?
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."
([display-id] (gen-call :function ::get-shelf-alignment &form display-id)))
(defmacro set-shelf-alignment
"Set the shelf alignment.
|display-id| - display that contains the shelf.
|alignment| - the type of alignment to set.
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."
([display-id alignment] (gen-call :function ::set-shelf-alignment &form display-id alignment)))
(defmacro pin-shelf-icon
"Create a pin on shelf for the app specified by |appId|.
|app-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."
([app-id] (gen-call :function ::pin-shelf-icon &form app-id)))
(defmacro set-overview-mode-state
"Enter or exit the overview mode.
|start| - whether entering to or exiting from the overview mode.
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 [finished] where:
|finished| - ?
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."
([start] (gen-call :function ::set-overview-mode-state &form start)))
(defmacro show-virtual-keyboard-if-enabled
"Show virtual keyboard of the current input method if it's available."
([] (gen-call :function ::show-virtual-keyboard-if-enabled &form)))
(defmacro arc-app-tracing-start
"Start ARC performance tracing for the active ARC app window.
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."
([] (gen-call :function ::arc-app-tracing-start &form)))
(defmacro arc-app-tracing-stop-and-analyze
"Stop ARC performance tracing if it was started and analyze results.
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 [info] where:
|info| - ?
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 ::arc-app-tracing-stop-and-analyze &form)))
(defmacro swap-windows-in-split-view
"Swap the windows in the split view.
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."
([] (gen-call :function ::swap-windows-in-split-view &form)))
(defmacro set-arc-app-window-focus
"Set ARC app window focused.
|package-name| - the package name of the ARC app window.
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."
([package-name] (gen-call :function ::set-arc-app-window-focus &form package-name)))
(defmacro wait-for-display-rotation
"Invokes the callback when the display rotation animation is finished, or invokes it immediately if it is not animating. The
callback argument is true if the display's rotation is same as |rotation|, or false otherwise.
|display-id| - display that contains the shelf.
|rotation| - the target rotation.
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 [success] where:
|success| - ?
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."
([display-id rotation] (gen-call :function ::wait-for-display-rotation &form display-id rotation)))
(defmacro get-app-window-list
"Get information on all application windows. Callback will be called with the list of |AppWindowInfo| dictionary.
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 [window-list] where:
|window-list| - ?
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-app-window-list &form)))
(defmacro set-app-window-state
"Send WM event to change the app window's window state.
|id| - the id of the window
|change| - WM event type to send to the app window.
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 [current-type] where:
|current-type| - ?
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."
([id change] (gen-call :function ::set-app-window-state &form id change)))
(defmacro close-app-window
"Closes an app window given by 'id'.
|id| - the id of the window
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."
([id] (gen-call :function ::close-app-window &form id)))
(defmacro install-pwa-for-current-url
"Installs the Progressive Web App (PWA) that is in the current URL.
|timeout-ms| - Timeout in milliseconds for the operation to complete.
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 [app-id] where:
|app-id| - ?
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."
([timeout-ms] (gen-call :function ::install-pwa-for-current-url &form timeout-ms)))
(defmacro activate-accelerator
"Activates shortcut.
|accelerator| - the accelerator to activate.
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 [success] where:
|success| - ?
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."
([accelerator] (gen-call :function ::activate-accelerator &form accelerator)))
(defmacro wait-for-launcher-state
"Wwait until the launcher is transitionto the |launcherState|, if it's not in that state.
|launcher-state| - the target launcher state.
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."
([launcher-state] (gen-call :function ::wait-for-launcher-state &form launcher-state)))
(defmacro wait-for-overview-state
"Wait until overview has transitioned to |overviewState|, if it is not in that state.
|overview-state| - the target overview state.
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."
([overview-state] (gen-call :function ::wait-for-overview-state &form overview-state)))
(defmacro create-new-desk
"Creates a new desk if the maximum number of desks has not been reached.
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 [success] where:
|success| - ?
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 ::create-new-desk &form)))
(defmacro activate-desk-at-index
"Activates the desk at the given |index| triggering the activate-desk animation.
|index| - the zero-based index of the desk desired to be activated.
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 [success] where:
|success| - ?
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."
([index] (gen-call :function ::activate-desk-at-index &form index)))
(defmacro remove-active-desk
"Removes the currently active desk and triggers the remove-desk animation.
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 [success] where:
|success| - ?
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 ::remove-active-desk &form)))
(defmacro activate-adjacent-desks-to-target-index
"Activates the desk at the given |index| by chaining multiple activate-desk animations.
|index| - the zero-based index of the desk desired to be activated.
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 [success] where:
|success| - ?
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."
([index] (gen-call :function ::activate-adjacent-desks-to-target-index &form index)))
(defmacro mouse-click
"Create mouse events to cause a mouse click.
|button| - the mouse button for the click event.
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."
([button] (gen-call :function ::mouse-click &form button)))
(defmacro mouse-press
"Create a mouse event to cause mouse pressing. The mouse button stays in the pressed state.
|button| - the mouse button to be pressed.
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."
([button] (gen-call :function ::mouse-press &form button)))
(defmacro mouse-release
"Create a mouse event to release a mouse button. This does nothing and returns immediately if the specified button is not
pressed.
|button| - the mouse button to be released.
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."
([button] (gen-call :function ::mouse-release &form button)))
(defmacro mouse-move
"Create mouse events to move a mouse cursor to the location. This can cause a dragging if a button is pressed. It starts
from the last mouse location. It does not support the move or drag across display boundaries.
|location| - the target location (in display's coordinate).
|duration-in-ms| - the duration (in milliseconds) for the mouse movement. The mouse will move linearly. 0 means
moving immediately.
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."
([location duration-in-ms] (gen-call :function ::mouse-move &form location duration-in-ms)))
(defmacro set-metrics-enabled
"Enable/disable metrics reporting in preferences.
|enabled| - Enable metrics reporting.