-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchrome-api-vsdoc.js
1826 lines (1824 loc) · 136 KB
/
chrome-api-vsdoc.js
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
// <copyright project="http://code.google.com/p/chrome-api-vsdoc/" file="chrome-api-vsdoc.js" author="Wesley Johnson">
// This source is licensed under The GNU General Public License (GPL) Version 2
// </copyright>
// This file contains documented stubs to support Visual Studio intellisense
// when working with Google's chrome extension APIs.
// You should not reference this file in a page at design time or runtime.
// To enable intellisense when authoring chrome extensions, place a commented
// reference to this file in your extension's JavaScript files like so: ///<reference path="chrome-api-vsdoc.js"/>
chrome = {
alarms: {
clear: function (name) {
///<summary>Clears the alarm with the given name.</summary>
///<param name='name' type='string'> (optional) The name of the alarm to clear. Defaults to the empty string.</param>
},
clearAll: function () {},
create: function (name, alarmInfo) {
///<summary>Creates an alarm. Near the time(s) specified by alarmInfo , the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm. In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 1 minute but may delay them an arbitrary amount more. That is, setting delayInMinutes or periodInMinutes to less than 1 will not be honored and will cause a warning. when can be set to less than 1 minute after \now\ without warning but won't actually cause the alarm to fire for at least 1 minute. To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.</summary>
///<param name='name' type='string'> (optional) Optional name to identify this alarm. Defaults to the empty string.</param>
///<param name='alarmInfo' type='object'>None{delayInMinutes: (optional double), periodInMinutes: (optional double), when: (optional double)}</param>
},
get: function (name, callback) {
///<summary>Retrieves details about the specified alarm.</summary>
///<param name='name' type='string'> (optional) The name of the alarm to get. Defaults to the empty string.</param>
///<param name='callback' type='function'>function( Alarm alarm) {...} ;</param>
},
getAll: function (callback) {
///<summary>Gets an array of all the alarms.</summary>
///<param name='callback' type='function'>function(array of Alarm alarms) {...} ;</param>
},
onAlarm: {
addListener: function (callback) {
///<summary>Fired when an alarm has elapsed. Useful for event pages.</summary>
///<param name='callback' type='function'>function( Alarm alarm) {...} ;</param>
}
}
},
bookmarks: {
create: function (bookmark, callback) {
///<summary>Creates a bookmark or folder under the specified parentId. If url is NULL or missing, it will be a folder.</summary>
///<param name='bookmark' type='object'>{url: (optional string), index: (optional integer), title: (optional string), parentId: (optional string)}</param>
///<param name='callback' type='function'> (optional) function( BookmarkTreeNode result) {...} ;</param>
},
get: function (idOrIdList, callback) {
///<summary>Retrieves the specified BookmarkTreeNode(s).</summary>
///<param name='idOrIdList' type='string or array of string'>A single string-valued id, or an array of string-valued ids</param>
///<param name='callback' type='function'>function(array of BookmarkTreeNode results) {...} ;</param>
},
getChildren: function (id, callback) {
///<summary>Retrieves the children of the specified BookmarkTreeNode id.</summary>
///<param name='id' type='string'></param>
///<param name='callback' type='function'>function(array of BookmarkTreeNode results) {...} ;</param>
},
getRecent: function (numberOfItems, callback) {
///<summary>Retrieves the recently added bookmarks.</summary>
///<param name='numberOfItems' type='integer'>The maximum number of items to return.</param>
///<param name='callback' type='function'>function(array of BookmarkTreeNode results) {...} ;</param>
},
getSubTree: function (id, callback) {
///<summary>Retrieves part of the Bookmarks hierarchy, starting at the specified node.</summary>
///<param name='id' type='string'>The ID of the root of the subtree to retrieve.</param>
///<param name='callback' type='function'>function(array of BookmarkTreeNode results) {...} ;</param>
},
getTree: function (callback) {
///<summary>Retrieves the entire Bookmarks hierarchy.</summary>
///<param name='callback' type='function'>function(array of BookmarkTreeNode results) {...} ;</param>
},
move: function (id, destination, callback) {
///<summary>Moves the specified BookmarkTreeNode to the provided location.</summary>
///<param name='id' type='string'></param>
///<param name='destination' type='object'>{index: (optional integer), parentId: (optional string)}</param>
///<param name='callback' type='function'> (optional) function( BookmarkTreeNode result) {...} ;</param>
},
onChanged: {
addListener: function (callback) {
///<summary>Fired when a bookmark or folder changes. Note: Currently, only title and url changes trigger this.</summary>
///<param name='callback' type='function'>function(string id, object changeInfo) {...} ;</param>
}
},
onChildrenReordered: {
addListener: function (callback) {
///<summary>Fired when the children of a folder have changed their order due to the order being sorted in the UI. This is not called as a result of a move().</summary>
///<param name='callback' type='function'>function(string id, object reorderInfo) {...} ;</param>
}
},
onCreated: {
addListener: function (callback) {
///<summary>Fired when a bookmark or folder is created.</summary>
///<param name='callback' type='function'>function(string id, BookmarkTreeNode bookmark) {...} ;</param>
}
},
onImportBegan: {
addListener: function (callback) {
///<summary>Fired when a bookmark import session is begun. Expensive observers should ignore onCreated updates until onImportEnded is fired. Observers should still handle other notifications immediately.</summary>
///<param name='callback' type='function'>function() {...} ;</param>
}
},
onImportEnded: {
addListener: function (callback) {
///<summary>Fired when a bookmark import session is ended.</summary>
///<param name='callback' type='function'>function() {...} ;</param>
}
},
onMoved: {
addListener: function (callback) {
///<summary>Fired when a bookmark or folder is moved to a different parent folder.</summary>
///<param name='callback' type='function'>function(string id, object moveInfo) {...} ;</param>
}
},
onRemoved: {
addListener: function (callback) {
///<summary>Fired when a bookmark or folder is removed. When a folder is removed recursively, a single notification is fired for the folder, and none for its contents.</summary>
///<param name='callback' type='function'>function(string id, object removeInfo) {...} ;</param>
}
},
remove: function (id, callback) {
///<summary>Removes a bookmark or an empty bookmark folder.</summary>
///<param name='id' type='string'></param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
removeTree: function (id, callback) {
///<summary>Recursively removes a bookmark folder.</summary>
///<param name='id' type='string'></param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
search: function (query, callback) {
///<summary>Searches for BookmarkTreeNodes matching the given query.</summary>
///<param name='query' type='string'></param>
///<param name='callback' type='function'>function(array of BookmarkTreeNode results) {...} ;</param>
},
update: function (id, changes, callback) {
///<summary>Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. Note: Currently, only 'title' and 'url' are supported.</summary>
///<param name='id' type='string'></param>
///<param name='changes' type='object'>{url: (optional string), title: (optional string)}</param>
///<param name='callback' type='function'> (optional) function( BookmarkTreeNode result) {...} ;</param>
}
},
browserAction: {
disable: function (tabId) {
///<summary>Disables the browser action for a tab.</summary>
///<param name='tabId' type='integer'> (optional) The id of the tab for which you want to modify the browser action.</param>
},
enable: function (tabId) {
///<summary>Enables the browser action for a tab. By default, browser actions are enabled.</summary>
///<param name='tabId' type='integer'> (optional) The id of the tab for which you want to modify the browser action.</param>
},
getBadgeBackgroundColor: function (details, callback) {
///<summary>Gets the background color of the browser action.</summary>
///<param name='details' type='object'>{tabId: (optional integer), imageData: (optional ImageDataType orobject), title: (string), color: (stringor ColorArray ), text: (string), popup: (string), path: (optional stringorobject)}</param>
///<param name='callback' type='function'>function( ColorArray result) {...} ;</param>
},
getBadgeText: function (details, callback) {
///<summary>Gets the badge text of the browser action. If no tab is specified, the non-tab-specific badge text is returned.</summary>
///<param name='details' type='object'>{tabId: (optional integer), imageData: (optional ImageDataType orobject), title: (string), color: (stringor ColorArray ), text: (string), popup: (string), path: (optional stringorobject)}</param>
///<param name='callback' type='function'>function(string result) {...} ;</param>
},
getPopup: function (details, callback) {
///<summary>Gets the html document set as the popup for this browser action.</summary>
///<param name='details' type='object'>{tabId: (optional integer), imageData: (optional ImageDataType orobject), title: (string), color: (stringor ColorArray ), text: (string), popup: (string), path: (optional stringorobject)}</param>
///<param name='callback' type='function'>function(string result) {...} ;</param>
},
getTitle: function (details, callback) {
///<summary>Gets the title of the browser action.</summary>
///<param name='details' type='object'>{tabId: (optional integer), imageData: (optional ImageDataType orobject), title: (string), color: (stringor ColorArray ), text: (string), popup: (string), path: (optional stringorobject)}</param>
///<param name='callback' type='function'>function(string result) {...} ;</param>
},
onClicked: {
addListener: function (callback) {
///<summary>Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup.</summary>
///<param name='callback' type='function'>function( tabs.Tab tab) {...} ;</param>
}
},
setBadgeBackgroundColor: function (details) {
///<summary>Sets the background color for the badge.</summary>
///<param name='details' type='object'>{tabId: (optional integer), imageData: (optional ImageDataType orobject), title: (string), color: (stringor ColorArray ), text: (string), popup: (string), path: (optional stringorobject)}</param>
},
setBadgeText: function (details) {
///<summary>Sets the badge text for the browser action. The badge is displayed on top of the icon.</summary>
///<param name='details' type='object'>{tabId: (optional integer), imageData: (optional ImageDataType orobject), title: (string), color: (stringor ColorArray ), text: (string), popup: (string), path: (optional stringorobject)}</param>
},
setIcon: function (details, callback) {
///<summary>Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the path or the imageData property must be specified.</summary>
///<param name='details' type='object'>{tabId: (optional integer), imageData: (optional ImageDataType orobject), title: (string), color: (stringor ColorArray ), text: (string), popup: (string), path: (optional stringorobject)}</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
setPopup: function (details) {
///<summary>Sets the html document to be opened as a popup when the user clicks on the browser action's icon.</summary>
///<param name='details' type='object'>{tabId: (optional integer), imageData: (optional ImageDataType orobject), title: (string), color: (stringor ColorArray ), text: (string), popup: (string), path: (optional stringorobject)}</param>
},
setTitle: function (details) {
///<summary>Sets the title of the browser action. This shows up in the tooltip.</summary>
///<param name='details' type='object'>{tabId: (optional integer), imageData: (optional ImageDataType orobject), title: (string), color: (stringor ColorArray ), text: (string), popup: (string), path: (optional stringorobject)}</param>
}
},
browsingData: {
remove: function (options, dataToRemove, callback) {
///<summary>Clears various types of browsing data stored in a user's profile.</summary>
///<param name='options' type='RemovalOptions'></param>
///<param name='dataToRemove' type='DataTypeSet'>The set of data types to remove.</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
removeAppcache: function (options, callback) {
///<summary>Clears websites' appcache data.</summary>
///<param name='options' type='RemovalOptions'></param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
removeCache: function (options, callback) {
///<summary>Clears the browser's cache.</summary>
///<param name='options' type='RemovalOptions'></param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
removeCookies: function (options, callback) {
///<summary>Clears the browser's cookies and server-bound certificates modified within a particular timeframe.</summary>
///<param name='options' type='RemovalOptions'></param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
removeDownloads: function (options, callback) {
///<summary>Clears the browser's list of downloaded files ( not the downloaded files themselves).</summary>
///<param name='options' type='RemovalOptions'></param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
removeFileSystems: function (options, callback) {
///<summary>Clears websites' file system data.</summary>
///<param name='options' type='RemovalOptions'></param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
removeFormData: function (options, callback) {
///<summary>Clears the browser's stored form data (autofill).</summary>
///<param name='options' type='RemovalOptions'></param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
removeHistory: function (options, callback) {
///<summary>Clears the browser's history.</summary>
///<param name='options' type='RemovalOptions'></param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
removeIndexedDB: function (options, callback) {
///<summary>Clears websites' IndexedDB data.</summary>
///<param name='options' type='RemovalOptions'></param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
removeLocalStorage: function (options, callback) {
///<summary>Clears websites' local storage data.</summary>
///<param name='options' type='RemovalOptions'></param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
removePasswords: function (options, callback) {
///<summary>Clears the browser's stored passwords.</summary>
///<param name='options' type='RemovalOptions'></param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
removePluginData: function (options, callback) {
///<summary>Clears plugins' data.</summary>
///<param name='options' type='RemovalOptions'></param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
removeWebSQL: function (options, callback) {
///<summary>Clears websites' WebSQL data.</summary>
///<param name='options' type='RemovalOptions'></param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
settings: function (callback) {
///<summary>Reports which types of data are currently selected in the 'Clear browsing data' settings UI. Note: some of the data types included in this API are not available in the settings UI, and some UI settings control more than one data type listed here.</summary>
///<param name='callback' type='function'>function(object result) {...} ;</param>
}
},
commands: {
getAll: function (callback) {
///<summary>Returns all the registered extension commands for this extension and their shortcut (if active).</summary>
///<param name='callback' type='function'> (optional) function(array of Command commands) {...} ;</param>
},
onCommand: {
addListener: function (callback) {
///<summary>Fired when a registered command is activated using a keyboard shortcut.</summary>
///<param name='callback' type='function'>function(string command) {...} ;</param>
}
}
},
contentSettings: {
clear: function(details, callback) {
///<summary>Clear all content setting rules set by this extension.</summary>
///<param name='details' type='object'>{scope: (optional enum of /regular/ or /icognito_session_only/)}</param>
///<param name='callback' type='function'> (optional) function() {...};</param>
},
get: function(details, callback) {
///<summary>Gets the current content setting for a given pair of URLs.</summary>
///<param name='details' type='object'>{primaryUrl: (string), secondaryUrl: (optional string), resourceIdentifier: (optional ResourceIdentifier), icognito: (optional boolean)}</param>
///<param name='callback' type='function'>function(object details) {...};</param>
},
set: function(details, callback) {
///<summary>Gets the current content setting for a given pair of URLs.</summary>
///<param name='details' type='object'>{primaryPattern: (string), secondaryPattern: (optional string), resourceIdentifier: (optional ResourceIdentifier), setting: (any), scope: (optional enum of /regular/ or /icognito_session_only/)}</param>
///<param name='callback' type='function'>function() {...};</param>
},
getResourceIdentifiers: function(callback) {
///<summary></summary>
///<param name='callback' type='function'>function(array of ResourceIdentifier resourceIdentifiers) {...};</param>
},
cookies: {},
images: {},
javascript: {},
plugins: {},
popups: {},
notifications: {}
},
contextMenus: {
create: function (createProperties, callback) {
///<summary>Creates a new context menu item. Note that if an error occurs during creation, you may not find out until the creation callback fires (the details will be in chrome.runtime.lastError).</summary>
///<param name='createProperties' type='object'>{documentUrlPatterns: (optional arrayofstring), checked: (optional boolean), title: (optional string), contexts: (optional arrayofenumof \\all\\ , \\page\\ , \\frame\\ , \\selection\\ , \\link\\ , \\editable\\ , \\image\\ , \\video\\ , \\audio\\ ,or \\launcher\\ ), enabled: (optional boolean), targetUrlPatterns: (optional arrayofstring), onclick: (optional function), parentId: (optional integerorstring), type: (optional enumof \\normal\\ , \\checkbox\\ , \\radio\\ ,or \\separator\\ ), id: (optional string)}</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
onClicked: {
addListener: function (callback) {
///<summary>Fired when a context menu item is clicked.</summary>
///<param name='callback' type='function'>function( OnClickData info, tabs.Tab tab) {...} ;</param>
}
},
remove: function (menuItemId, callback) {
///<summary>Removes a context menu item.</summary>
///<param name='menuItemId' type='integer or string'>The ID of the context menu item to remove.</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
removeAll: function (callback) {
///<summary>Removes all context menu items added by this extension.</summary>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
update: function (id, updateProperties, callback) {
///<summary>Updates a previously created context menu item.</summary>
///<param name='id' type='integer or string'>The ID of the item to update.</param>
///<param name='updateProperties' type='object'>The properties to update. Accepts the same values as the create function.{documentUrlPatterns: (optional arrayofstring), checked: (optional boolean), title: (optional string), contexts: (optional arrayofenumof \\all\\ , \\page\\ , \\frame\\ , \\selection\\ , \\link\\ , \\editable\\ , \\image\\ , \\video\\ , \\audio\\ ,or \\launcher\\ ), enabled: (optional boolean), targetUrlPatterns: (optional arrayofstring), onclick: (optional function), parentId: (optional integerorstring), type: (optional enumof \\normal\\ , \\checkbox\\ , \\radio\\ ,or \\separator\\ )}</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
}
},
cookies: {
get: function (details, callback) {
///<summary>Retrieves information about a single cookie. If more than one cookie of the same name exists for the given URL, the one with the longest path will be returned. For cookies with the same path length, the cookie with the earliest creation time will be returned.</summary>
///<param name='details' type='object'>Details to identify the cookie being retrieved.{domain: (optional string), name: (string), url: (string), storeId: (string), value: (optional string), session: (optional boolean), expirationDate: (optional double), path: (optional string), httpOnly: (optional boolean), secure: (optional boolean)}</param>
///<param name='callback' type='function'>function( Cookie cookie) {...} ;</param>
},
getAll: function (details, callback) {
///<summary>Retrieves all cookies from a single cookie store that match the given information. The cookies returned will be sorted, with those with the longest path first. If multiple cookies have the same path length, those with the earliest creation time will be first.</summary>
///<param name='details' type='object'>Information to filter the cookies being retrieved.{domain: (optional string), name: (string), url: (string), storeId: (string), value: (optional string), session: (optional boolean), expirationDate: (optional double), path: (optional string), httpOnly: (optional boolean), secure: (optional boolean)}</param>
///<param name='callback' type='function'>function(array of Cookie cookies) {...} ;</param>
},
getAllCookieStores: function (callback) {
///<summary>Lists all existing cookie stores.</summary>
///<param name='callback' type='function'>function(array of CookieStore cookieStores) {...} ;</param>
},
onChanged: {
addListener: function (callback) {
///<summary>Fired when a cookie is set or removed. As a special case, note that updating a cookie's properties is implemented as a two step process: the cookie to be updated is first removed entirely, generating a notification with \cause\ of \overwrite\ . Afterwards, a new cookie is written with the updated values, generating a second notification with \cause\ \explicit\.</summary>
///<param name='callback' type='function'>function(object changeInfo) {...} ;</param>
}
},
remove: function (details, callback) {
///<summary>Deletes a cookie by name.</summary>
///<param name='details' type='object'>Information to identify the cookie to remove.{domain: (optional string), name: (string), url: (string), storeId: (string), value: (optional string), session: (optional boolean), expirationDate: (optional double), path: (optional string), httpOnly: (optional boolean), secure: (optional boolean)}</param>
///<param name='callback' type='function'> (optional) function(object details) {...} ;</param>
},
set: function (details, callback) {
///<summary>Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.</summary>
///<param name='details' type='object'>Details about the cookie being set.{domain: (optional string), name: (string), url: (string), storeId: (string), value: (optional string), session: (optional boolean), expirationDate: (optional double), path: (optional string), httpOnly: (optional boolean), secure: (optional boolean)}</param>
///<param name='callback' type='function'> (optional) function( Cookie cookie) {...} ;</param>
}
},
debugger: {
attach: function (target, requiredVersion, callback) {
///<summary>Attaches debugger to the given target.</summary>
///<param name='target' type='Debuggee'>Debugging target to which you want to attach.</param>
///<param name='requiredVersion' type='string'>None</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
detach: function (target, callback) {
///<summary>Detaches debugger from the given target.</summary>
///<param name='target' type='Debuggee'>Debugging target from which you want to detach.</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
getTargets: function (callback) {
///<summary>Returns the list of available debug targets.</summary>
///<param name='callback' type='function'>function(array of TargetInfo result) {...} ;</param>
},
onDetach: {
addListener: function (callback) {
///<summary>Fired when browser terminates debugging session for the tab. This happens when either the tab is being closed or Chrome DevTools is being invoked for the attached tab.</summary>
///<param name='callback' type='function'>function( Debuggee source, enum of \target_closed\ , \canceled_by_user\ , or \replaced_with_devtools\ reason) {...} ;</param>
}
},
onEvent: {
addListener: function (callback) {
///<summary>Fired whenever debugging target issues instrumentation event.</summary>
///<param name='callback' type='function'>function( Debuggee source, string method, object params) {...} ;</param>
}
},
sendCommand: function (target, method, commandParams, callback) {
///<summary>Sends given command to the debugging target.</summary>
///<param name='target' type='Debuggee'>Debugging target to which you want to send the command.</param>
///<param name='method' type='string'>None</param>
///<param name='commandParams' type='object'> (optional) JSON object with request parameters. This object must conform to the remote debugging params scheme for given method.</param>
///<param name='callback' type='function'> (optional) function(object result) {...} ;</param>
}
},
devtools: {
inspectedWindow: {
eval: function (expression, callback) {
///<summary>Evaluates a JavaScript expression in the context of the main frame of the inspected page. The expression must evaluate to a JSON-compliant object, otherwise an exception is thrown.</summary>
///<param name='expression' type='string'>An expression to evaluate.</param>
///<param name='callback' type='function'> (optional) function(object result, boolean isException) {...} ;</param>
},
getResources: function (callback) {
///<summary>Retrieves the list of resources from the inspected page.</summary>
///<param name='callback' type='function'>function(array of Resource resources) {...} ;</param>
},
onResourceAdded: {
addListener: function (callback) {
///<summary>Fired when a new resource is added to the inspected page.</summary>
///<param name='callback' type='function'>function( Resource resource) {...} ;</param>
}
},
onResourceContentCommitted: {
addListener: function (callback) {
///<summary>Fired when a new revision of the resource is committed (e.g. user saves an edited version of the resource in the Developer Tools).</summary>
///<param name='callback' type='function'>function( Resource resource, string content) {...} ;</param>
}
},
reload: function (reloadOptions) {
///<summary>Reloads the inspected page.</summary>
///<param name='reloadOptions' type='object'> (optional) {userAgent: (optional string), ignoreCache: (optional boolean), injectedScript: (optional string)}</param>
}
},
network: {
getHAR: function (callback) {
///<summary>Returns HAR log that contains all known network requests.</summary>
///<param name='callback' type='function'>function(object harLog) {...} ;</param>
},
onNavigated: {
addListener: function (callback) {
///<summary>Fired when the inspected window navigates to a new page.</summary>
///<param name='callback' type='function'>function(string url) {...} ;</param>
}
},
onRequestFinished: {
addListener: function (callback) {
///<summary>Fired when a network request is finished and all request data are available.</summary>
///<param name='callback' type='function'>function( Request request) {...} ;</param>
}
}
},
panels: {
create: function (title, iconPath, pagePath, callback) {
///<summary>Creates an extension panel.</summary>
///<param name='title' type='string'>Title that is displayed next to the extension icon in the Developer Tools toolbar.</param>
///<param name='iconPath' type='string'>Path of the panel's icon relative to the extension directory.</param>
///<param name='pagePath' type='string'>Path of the panel's HTML page relative to the extension directory.</param>
///<param name='callback' type='function'> (optional) function( ExtensionPanel panel) {...} ;</param>
},
setOpenResourceHandler: function (callback) {
///<summary>Specifies the function to be called when the user clicks a resource link in the Developer Tools window. To unset the handler, either call the method with no parameters or pass null as the parameter.</summary>
///<param name='callback' type='function'> (optional) function( devtools.inspectedWindow.Resource resource) {...} ;</param>
}
}
},
downloads: {
acceptDanger: function (downloadId, callback) {
///<summary>Prompt the user to accept a dangerous download. Does not automatically accept dangerous downloads. If the download is accepted, then an onChanged event will fire, otherwise nothing will happen. When all the data is fetched into a temporary file and either the download is not dangerous or the danger has been accepted, then the temporary file is renamed to the target filename, the |state| changes to 'complete', and onChanged fires.</summary>
///<param name='downloadId' type='integer'>None</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
cancel: function (downloadId, callback) {
///<summary>Cancel a download. When callback is run, the download is cancelled, completed, interrupted or doesn't exist anymore.</summary>
///<param name='downloadId' type='integer'>The id of the download to cancel.</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
download: function (options, callback) {
///<summary>Download a URL. If the URL uses the HTTP[S] protocol, then the request will include all cookies currently set for its hostname. If both filename and saveAs are specified, then the Save As dialog will be displayed, pre-populated with the specified filename . If the download started successfully, callback will be called with the new DownloadItem 's downloadId . If there was an error starting the download, then callback will be called with downloadId=undefined and runtime.lastError will contain a descriptive string. The error strings are not guaranteed to remain backwards compatible between releases. Extensions must not parse it.</summary>
///<param name='options' type='object'>What to download and how.{body: (optional string), saveAs: (optional boolean), url: (string), filename: (optional string), headers: (optional arrayofobject), method: (optional enumof \\GET\\ ,or \\POST\\ ), conflictAction: (optional FilenameConflictAction ), size: (optional integer)}</param>
///<param name='callback' type='function'> (optional) function(integer downloadId) {...} ;</param>
},
drag: function (downloadId) {
///<summary>Initiate dragging the downloaded file to another application. Call in a javascript ondragstart handler.</summary>
///<param name='downloadId' type='integer'></param>
},
erase: function (query, callback) {
///<summary>Erase matching DownloadItem from history without deleting the downloaded file. An onErased event will fire for each DownloadItem that matches query , then callback will be called.</summary>
///<param name='query' type='object'>{orderBy: (optional arrayofstring), urlRegex: (optional string), endedBefore: (optional string), totalBytesGreater: (optional integer), danger: (optional DangerType ), totalBytes: (optional integer), paused: (optional boolean), filenameRegex: (optional string), query: (optional arrayofstring), totalBytesLess: (optional integer), id: (optional integer), bytesReceived: (optional integer), exists: (optional boolean), endedAfter: (optional string), filename: (optional string), state: (optional State ), startedAfter: (optional string), mime: (optional string), fileSize: (optional integer), startTime: (optional string), url: (optional string), startedBefore: (optional string), limit: (optional integer), error: (optional InterruptReason ), endTime: (optional string)}</param>
///<param name='callback' type='function'> (optional) function(array of integer erasedIds) {...} ;</param>
},
getFileIcon: function (downloadId, options, callback) {
///<summary>Retrieve an icon for the specified download. For new downloads, file icons are available after the onCreated event has been received. The image returned by this function while a download is in progress may be different from the image returned after the download is complete. Icon retrieval is done by querying the underlying operating system or toolkit depending on the platform. The icon that is returned will therefore depend on a number of factors including state of the download, platform, registered file types and visual theme. If a file icon cannot be determined, runtime.lastError will contain an error message.</summary>
///<param name='downloadId' type='integer'>The identifier for the download.</param>
///<param name='options' type='object'> (optional) {body: (optional string), saveAs: (optional boolean), url: (string), filename: (optional string), headers: (optional arrayofobject), method: (optional enumof \\GET\\ ,or \\POST\\ ), conflictAction: (optional FilenameConflictAction ), size: (optional integer)}</param>
///<param name='callback' type='function'>function(string iconURL) {...} ;</param>
},
onChanged: {
addListener: function (callback) {
///<summary>When any of a DownloadItem 's properties except bytesReceived and estimatedEndTime changes, this event fires with the downloadId and an object containing the properties that changed.</summary>
///<param name='callback' type='function'>function(object downloadDelta) {...} ;</param>
}
},
onCreated: {
addListener: function (callback) {
///<summary>This event fires with the DownloadItem object when a download begins.</summary>
///<param name='callback' type='function'>function( DownloadItem downloadItem) {...} ;</param>
}
},
onDeterminingFilename: {
addListener: function (callback) {
///<summary>During the filename determination process, extensions will be given the opportunity to override the target DownloadItem.filename . Each extension may not register more than one listener for this event. Each listener must call suggest exactly once, either synchronously or asynchronously. If the listener calls suggest asynchronously, then it must return true . If the listener neither calls suggest synchronously nor returns true , then suggest will be called automatically. The DownloadItem will not complete until all listeners have called suggest . Listeners may call suggest without any arguments in order to allow the download to use downloadItem.filename for its filename, or pass a suggestion object to suggest in order to override the target filename. If more than one extension overrides the filename, then the last extension installed whose listener passes a suggestion object to suggest wins. In order to avoid confusion regarding which extension will win, users should not install extensions that may conflict. If the download is initiated by download and the target filename is known before the MIME type and tentative filename have been determined, pass filename to download instead.</summary>
///<param name='callback' type='function'>function( DownloadItem downloadItem, function suggest) {...} ;</param>
}
},
onErased: {
addListener: function (callback) {
///<summary>Fires with the downloadId when a download is erased from history.</summary>
///<param name='callback' type='function'>function(integer downloadId) {...} ;</param>
}
},
open: function (downloadId) {
///<summary>Open the downloaded file now if the DownloadItem is complete; otherwise returns an error through runtime.lastError . Requires the \downloads.open\ permission in addition to the \downloads\ permission. An onChanged event will fire when the item is opened for the first time.</summary>
///<param name='downloadId' type='integer'>The identifier for the downloaded file.</param>
},
pause: function (downloadId, callback) {
///<summary>Pause the download. If the request was successful the download is in a paused state. Otherwise runtime.lastError contains an error message. The request will fail if the download is not active.</summary>
///<param name='downloadId' type='integer'>The id of the download to pause.</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
removeFile: function (downloadId, callback) {
///<summary>Remove the downloaded file if it exists and the DownloadItem is complete; otherwise return an error through runtime.lastError .</summary>
///<param name='downloadId' type='integer'></param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
resume: function (downloadId, callback) {
///<summary>Resume a paused download. If the request was successful the download is in progress and unpaused. Otherwise runtime.lastError contains an error message. The request will fail if the download is not active.</summary>
///<param name='downloadId' type='integer'>The id of the download to resume.</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
search: function (query, callback) {
///<summary>Find DownloadItem . Set query to the empty object to get all DownloadItem . To get a specific DownloadItem , set only the id field. To page through a large number of items, set orderBy: ['-startTime'] , set limit to the number of items per page, and set startedAfter to the startTime of the last item from the last page.</summary>
///<param name='query' type='object'>{orderBy: (optional arrayofstring), urlRegex: (optional string), endedBefore: (optional string), totalBytesGreater: (optional integer), danger: (optional DangerType ), totalBytes: (optional integer), paused: (optional boolean), filenameRegex: (optional string), query: (optional arrayofstring), totalBytesLess: (optional integer), id: (optional integer), bytesReceived: (optional integer), exists: (optional boolean), endedAfter: (optional string), filename: (optional string), state: (optional State ), startedAfter: (optional string), mime: (optional string), fileSize: (optional integer), startTime: (optional string), url: (optional string), startedBefore: (optional string), limit: (optional integer), error: (optional InterruptReason ), endTime: (optional string)}</param>
///<param name='callback' type='function'>function(array of DownloadItem results) {...} ;</param>
},
setShelfEnabled: function (enabled) {
///<summary>Enable or disable the gray shelf at the bottom of every window associated with the current browser profile. The shelf will be disabled as long as at least one extension has disabled it. Enabling the shelf while at least one other extension has disabled it will return an error through runtime.lastError . Requires the \downloads.shelf\ permission in addition to the \downloads\ permission.</summary>
///<param name='enabled' type='boolean'></param>
},
show: function (downloadId) {
///<summary>Show the downloaded file in its folder in a file manager.</summary>
///<param name='downloadId' type='integer'>The identifier for the downloaded file.</param>
},
showDefaultFolder: function () {}
},
events: {
addListener: function(callback) {
///<summary>Registers an event listener callback to an event.</summary>
///<param name="callback" type="function">function() {...}</param>
},
removeListener: function(callback) {
///<summary>Deregisters an event listener callback from an event.</summary>
///<param name="callback" type="function">function() {...}</param>
},
hasListener: function(callback) {
///<summary>Tests that a specific event listener callback is registered.</summary>
///<param name="callback" type="function">function() {...}</param>
},
hasListeners: function() {
///<summary>Tests that an event listener callback is registered.</summary>
},
addRules: function(rules, callback) {
///<summary>Registers rules to handle events.</summary>
///<param name="rules" type="array">Rules to be registered. These do not replace previously registered rules.</param>
///<param name="callback" type="function">function(array of Rule rules) {...}</param>
},
getRules: function(ruleIdentifiers, callback) {
///<summary>Returns currently registered rules.</summary>
///<param name="ruleIdentifiers" type="array"> (optional) If an array is passed, only rules with identifiers contained in this array are returned.</param>
///<param name="callback" type="function">function(array of Rule rules) {...}</param>
},
removeRules: function(ruleIdentifiers, callback) {
///<summary>Unregisters currently registered rules.</summary>
///<param name="ruleIdentifiers" type="array">(optional) Rules to be registered. These do not replace previously registered rules.</param>
///<param name="callback" type="function">function() {...}</param>
}
},
extension: {
getBackgroundPage: function () {},
getExtensionTabs: function (windowId) {
///<summary>Returns an array of the JavaScript 'window' objects for each of the tabs running inside the current extension. If windowId is specified, returns only the 'window' objects of tabs attached to the specified window.</summary>
///<param name='windowId' type='integer'> (optional) </param>
},
getURL: function (path) {
///<summary>Converts a relative path within an extension install directory to a fully-qualified URL.</summary>
///<param name='path' type='string'>A path to a resource within an extension expressed relative to its install directory.</param>
},
getViews: function (fetchProperties) {
///<summary>Returns an array of the JavaScript 'window' objects for each of the pages running inside the current extension.</summary>
///<param name='fetchProperties' type='object'> (optional) {windowId: (optional integer), type: (optional enumof \\tab\\ , \\infobar\\ , \\notification\\ ,or \\popup\\ )}</param>
},
isAllowedFileSchemeAccess: function (callback) {
///<summary>Retrieves the state of the extension's access to the 'file://' scheme (as determined by the user-controlled 'Allow access to File URLs' checkbox.</summary>
///<param name='callback' type='function'>function(boolean isAllowedAccess) {...} ;</param>
},
isAllowedIncognitoAccess: function (callback) {
///<summary>Retrieves the state of the extension's access to Incognito-mode (as determined by the user-controlled 'Allowed in Incognito' checkbox.</summary>
///<param name='callback' type='function'>function(boolean isAllowedAccess) {...} ;</param>
},
onRequest: {
addListener: function (callback) {
///<summary></summary>
///<param name='callback' type='function'>function(any request, runtime.MessageSender sender, function sendResponse) {...} ;</param>
}
},
onRequestExternal: {
addListener: function (callback) {
///<summary></summary>
///<param name='callback' type='function'>function(any request, runtime.MessageSender sender, function sendResponse) {...} ;</param>
}
},
sendRequest: function (extensionId, request, responseCallback) {
///<summary>Sends a single request to other listeners within the extension. Similar to runtime.connect , but only sends a single request with an optional response. The onRequest event is fired in each page of the extension.</summary>
///<param name='extensionId' type='string'> (optional) The extension ID of the extension you want to connect to. If omitted, default is your own extension.</param>
///<param name='request' type='any'></param>
///<param name='responseCallback' type='function'> (optional) </param>
},
setUpdateUrlData: function (data) {
///<summary>Sets the value of the ap CGI parameter used in the extension's update URL. This value is ignored for extensions that are hosted in the Chrome Extension Gallery.</summary>
///<param name='data' type='string'></param>
}
},
fileBrowserHandler: {
onExecute: {
addListener: function (callback) {
///<summary>Fired when file system action is executed from ChromeOS file browser.</summary>
///<param name='callback' type='function'>function(string id, FileHandlerExecuteEventDetails details) {...} ;</param>
}
},
selectFile: function (selectionParams, callback) {
///<summary>Prompts user to select file path under which file should be saved. When the file is selected, file access permission required to use the file (read, write and create) are granted to the caller. The file will not actually get created during the function call, so function caller must ensure its existence before using it. The function has to be invoked with a user gesture.</summary>
///<param name='selectionParams' type='object'>Parameters that will be used while selecting the file.{allowedFileExtensions: (optional arrayofstring), suggestedName: (string)}</param>
///<param name='callback' type='function'>function(object result) {...} ;</param>
}
},
fontSettings: {
clearDefaultFixedFontSize: function (details, callback) {
///<summary>Clears the default fixed font size set by this extension, if any.</summary>
///<param name='details' type='object'> (optional) This parameter is currently unused.{levelOfControl: ( LevelOfControl ), pixelSize: (integer), fontId: (string), genericFamily: ( GenericFamily ), script: (optional ScriptCode )}</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
clearDefaultFontSize: function (details, callback) {
///<summary>Clears the default font size set by this extension, if any.</summary>
///<param name='details' type='object'> (optional) This parameter is currently unused.{levelOfControl: ( LevelOfControl ), pixelSize: (integer), fontId: (string), genericFamily: ( GenericFamily ), script: (optional ScriptCode )}</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
clearFont: function (details, callback) {
///<summary>Clears the font set by this extension, if any.</summary>
///<param name='details' type='object'>{levelOfControl: ( LevelOfControl ), pixelSize: (integer), fontId: (string), genericFamily: ( GenericFamily ), script: (optional ScriptCode )}</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
clearMinimumFontSize: function (details, callback) {
///<summary>Clears the minimum font size set by this extension, if any.</summary>
///<param name='details' type='object'> (optional) This parameter is currently unused.{levelOfControl: ( LevelOfControl ), pixelSize: (integer), fontId: (string), genericFamily: ( GenericFamily ), script: (optional ScriptCode )}</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
getDefaultFixedFontSize: function (details, callback) {
///<summary>Gets the default size for fixed width fonts.</summary>
///<param name='details' type='object'> (optional) This parameter is currently unused.{levelOfControl: ( LevelOfControl ), pixelSize: (integer), fontId: (string), genericFamily: ( GenericFamily ), script: (optional ScriptCode )}</param>
///<param name='callback' type='function'> (optional) function(object details) {...} ;</param>
},
getDefaultFontSize: function (details, callback) {
///<summary>Gets the default font size.</summary>
///<param name='details' type='object'> (optional) This parameter is currently unused.{levelOfControl: ( LevelOfControl ), pixelSize: (integer), fontId: (string), genericFamily: ( GenericFamily ), script: (optional ScriptCode )}</param>
///<param name='callback' type='function'> (optional) function(object details) {...} ;</param>
},
getFont: function (details, callback) {
///<summary>Gets the font for a given script and generic font family.</summary>
///<param name='details' type='object'>{levelOfControl: ( LevelOfControl ), pixelSize: (integer), fontId: (string), genericFamily: ( GenericFamily ), script: (optional ScriptCode )}</param>
///<param name='callback' type='function'> (optional) function(object details) {...} ;</param>
},
getFontList: function (callback) {
///<summary>Gets a list of fonts on the system.</summary>
///<param name='callback' type='function'>function(array of FontName results) {...} ;</param>
},
getMinimumFontSize: function (details, callback) {
///<summary>Gets the minimum font size.</summary>
///<param name='details' type='object'> (optional) This parameter is currently unused.{levelOfControl: ( LevelOfControl ), pixelSize: (integer), fontId: (string), genericFamily: ( GenericFamily ), script: (optional ScriptCode )}</param>
///<param name='callback' type='function'> (optional) function(object details) {...} ;</param>
},
onDefaultFixedFontSizeChanged: {
addListener: function (callback) {
///<summary>Fired when the default fixed font size setting changes.</summary>
///<param name='callback' type='function'>function(object details) {...} ;</param>
}
},
onDefaultFontSizeChanged: {
addListener: function (callback) {
///<summary>Fired when the default font size setting changes.</summary>
///<param name='callback' type='function'>function(object details) {...} ;</param>
}
},
onFontChanged: {
addListener: function (callback) {
///<summary>Fired when a font setting changes.</summary>
///<param name='callback' type='function'>function(object details) {...} ;</param>
}
},
onMinimumFontSizeChanged: {
addListener: function (callback) {
///<summary>Fired when the minimum font size setting changes.</summary>
///<param name='callback' type='function'>function(object details) {...} ;</param>
}
},
setDefaultFixedFontSize: function (details, callback) {
///<summary>Sets the default size for fixed width fonts.</summary>
///<param name='details' type='object'>{levelOfControl: ( LevelOfControl ), pixelSize: (integer), fontId: (string), genericFamily: ( GenericFamily ), script: (optional ScriptCode )}</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
setDefaultFontSize: function (details, callback) {
///<summary>Sets the default font size.</summary>
///<param name='details' type='object'>{levelOfControl: ( LevelOfControl ), pixelSize: (integer), fontId: (string), genericFamily: ( GenericFamily ), script: (optional ScriptCode )}</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
setFont: function (details, callback) {
///<summary>Sets the font for a given script and generic font family.</summary>
///<param name='details' type='object'>{levelOfControl: ( LevelOfControl ), pixelSize: (integer), fontId: (string), genericFamily: ( GenericFamily ), script: (optional ScriptCode )}</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
setMinimumFontSize: function (details, callback) {
///<summary>Sets the minimum font size.</summary>
///<param name='details' type='object'>{levelOfControl: ( LevelOfControl ), pixelSize: (integer), fontId: (string), genericFamily: ( GenericFamily ), script: (optional ScriptCode )}</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
}
},
history: {
addUrl: function (details, callback) {
///<summary>Adds a URL to the history at the current time with a transition type of \link\.</summary>
///<param name='details' type='object'>{url: (string)}</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
deleteAll: function (callback) {
///<summary>Deletes all items from the history.</summary>
///<param name='callback' type='function'>function() {...} ;</param>
},
deleteRange: function (range, callback) {
///<summary>Removes all items within the specified date range from the history. Pages will not be removed from the history unless all visits fall within the range.</summary>
///<param name='range' type='object'>{endTime: (double), startTime: (double)}</param>
///<param name='callback' type='function'>function() {...} ;</param>
},
deleteUrl: function (details, callback) {
///<summary>Removes all occurrences of the given URL from the history.</summary>
///<param name='details' type='object'>{url: (string)}</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
getVisits: function (details, callback) {
///<summary>Retrieves information about visits to a URL.</summary>
///<param name='details' type='object'>{url: (string)}</param>
///<param name='callback' type='function'>function(array of VisitItem results) {...} ;</param>
},
onVisitRemoved: {
addListener: function (callback) {
///<summary>Fired when one or more URLs are removed from the history service. When all visits have been removed the URL is purged from history.</summary>
///<param name='callback' type='function'>function(object removed) {...} ;</param>
}
},
onVisited: {
addListener: function (callback) {
///<summary>Fired when a URL is visited, providing the HistoryItem data for that URL. This event fires before the page has loaded.</summary>
///<param name='callback' type='function'>function( HistoryItem result) {...} ;</param>
}
},
search: function (query, callback) {
///<summary>Searches the history for the last visit time of each page matching the query.</summary>
///<param name='query' type='object'>{text: (string), endTime: (optional double), maxResults: (optional integer), startTime: (optional double)}</param>
///<param name='callback' type='function'>function(array of HistoryItem results) {...} ;</param>
}
},
i18n: {
getAcceptLanguages: function (callback) {
///<summary>Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use window.navigator.language .</summary>
///<param name='callback' type='function'>function(array of string languages) {...} ;</param>
},
getMessage: function (messageName, substitutions) {
///<summary>Gets the localized string for the specified message. If the message is missing, this method returns an empty string (''). If the format of the getMessage() call is wrong \u2014 for example, messageName is not a string or the substitutions array has more than 9 elements \u2014 this method returns undefined .</summary>
///<param name='messageName' type='string'>None</param>
///<param name='substitutions' type='any'> (optional) Up to 9 substitution strings, if the message requires any.</param>
}
},
identity: {
getAuthToken: function (details, callback) {
///<summary>Gets an OAuth2 access token using the client ID and scopes specified in the oauth2 section of manifest.json . The Identity API caches access tokens in memory, so it's ok to call getAuthToken any time a token is required. The token cache automatically handles expiration.</summary>
///<param name='details' type='object'> (optional) Token options.{url: (string), token: (string), interactive: (optional boolean)}</param>
///<param name='callback' type='function'>function(string token) {...} ;</param>
},
getRedirectURL: function (path) {
///<summary>Generates a redirect URL to be used in |launchWebAuthFlow|. The generated URLs match the pattern https://<app-id>.chromiumapp.org/* .</summary>
///<param name='path' type='string'> (optional) The path appended to the end of the generated URL.</param>
},
launchWebAuthFlow: function (details, callback) {
///<summary>Starts an auth flow at the specified URL. This method enables auth flows with non-Google identity providers by launching a web view and navigating it to the first URL in the provider's auth flow. When the provider redirects to a URL matching the pattern https://<app-id>.chromiumapp.org/* , the window will close, and the final redirect URL will be passed to the callback function.</summary>
///<param name='details' type='object'>WebAuth flow options.{url: (string), token: (string), interactive: (optional boolean)}</param>
///<param name='callback' type='function'>function(string responseUrl) {...} ;</param>
},
onSignInChanged: {
addListener: function (callback) {
///<summary>Fired when signin state changes for an account on the user's profile.</summary>
///<param name='callback' type='function'>function(object account, boolean signedIn) {...} ;</param>
}
},
removeCachedAuthToken: function (details, callback) {
///<summary>Removes an OAuth2 access token from the Identity API's token cache. If an access token is discovered to be invalid, it should be passed to removeCachedAuthToken to remove it from the cache. The app may then retrieve a fresh token with getAuthToken .</summary>
///<param name='details' type='object'>Token information.{url: (string), token: (string), interactive: (optional boolean)}</param>
///<param name='callback' type='function'>function() {...} ;</param>
}
},
idle: {
onStateChanged: {
addListener: function (callback) {
///<summary>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.</summary>
///<param name='callback' type='function'>function(enum of \active\ , \idle\ , or \locked\ newState) {...} ;</param>
}
},
queryState: function (detectionIntervalInSeconds, callback) {
///<summary>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.</summary>
///<param name='detectionIntervalInSeconds' type='integer'>The system is considered idle if detectionIntervalInSeconds seconds have elapsed since the last user input detected.</param>
///<param name='callback' type='function'>function(enum of \active\ , \idle\ , or \locked\ newState) {...} ;</param>
},
setDetectionInterval: function (intervalInSeconds) {
///<summary>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.</summary>
///<param name='intervalInSeconds' type='integer'>Threshold, in seconds, used to determine when the system is in an idle state.</param>
}
},
input: {
ime: {
clearComposition: function (parameters, callback) {
///<summary>Clear the current composition. If this extension does not own the active IME, this fails.</summary>
///<param name='parameters' type='object'>{contextID: (integer), text: (string), segments: (optional arrayofobject), offset: (integer), properties: (object), cursor: (integer), length: (integer), candidateID: (integer), selectionStart: (optional integer), selectionEnd: (optional integer), items: (arrayof MenuItem ), candidates: (arrayofobject), engineID: (string)}</param>
///<param name='callback' type='function'> (optional) function(boolean success) {...} ;</param>
},
commitText: function (parameters, callback) {
///<summary>Commits the provided text to the current input.</summary>
///<param name='parameters' type='object'>{contextID: (integer), text: (string), segments: (optional arrayofobject), offset: (integer), properties: (object), cursor: (integer), length: (integer), candidateID: (integer), selectionStart: (optional integer), selectionEnd: (optional integer), items: (arrayof MenuItem ), candidates: (arrayofobject), engineID: (string)}</param>
///<param name='callback' type='function'> (optional) function(boolean success) {...} ;</param>
},
deleteSurroundingText: function (parameters, callback) {
///<summary>Deletes the text around the caret.</summary>
///<param name='parameters' type='object'>{contextID: (integer), text: (string), segments: (optional arrayofobject), offset: (integer), properties: (object), cursor: (integer), length: (integer), candidateID: (integer), selectionStart: (optional integer), selectionEnd: (optional integer), items: (arrayof MenuItem ), candidates: (arrayofobject), engineID: (string)}</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
keyEventHandled: function (requestId, response) {
///<summary>Indicates that the key event received by onKeyEvent is handled. This should only be called if the onKeyEvent listener is asynchronous.</summary>
///<param name='requestId' type='string'>Request id of the event that was handled. This should come from keyEvent.requestId</param>
///<param name='response' type='boolean'>True if the keystroke was handled, false if not</param>
},
onActivate: {
addListener: function (callback) {
///<summary>This event is sent when an IME is activated. It signals that the IME will be receiving onKeyPress events.</summary>
///<param name='callback' type='function'>function(string engineID) {...} ;</param>
}
},
onBlur: {
addListener: function (callback) {
///<summary>This event is sent when focus leaves a text box. It is sent to all extensions that are listening to this event, and enabled by the user.</summary>
///<param name='callback' type='function'>function(integer contextID) {...} ;</param>
}
},
onCandidateClicked: {
addListener: function (callback) {
///<summary>This event is sent if this extension owns the active IME.</summary>
///<param name='callback' type='function'>function(string engineID, integer candidateID, enum of \left\ , \middle\ , or \right\ button) {...} ;</param>
}
},
onDeactivated: {
addListener: function (callback) {
///<summary>This event is sent when an IME is deactivated. It signals that the IME will no longer be receiving onKeyPress events.</summary>
///<param name='callback' type='function'>function(string engineID) {...} ;</param>
}
},
onFocus: {
addListener: function (callback) {
///<summary>This event is sent when focus enters a text box. It is sent to all extensions that are listening to this event, and enabled by the user.</summary>
///<param name='callback' type='function'>function( InputContext context) {...} ;</param>
}
},
onInputContextUpdate: {
addListener: function (callback) {
///<summary>This event is sent when the properties of the current InputContext change, such as the the type. It is sent to all extensions that are listening to this event, and enabled by the user.</summary>
///<param name='callback' type='function'>function( InputContext context) {...} ;</param>
}
},
onKeyEvent: {
addListener: function (callback) {
///<summary>This event is sent if this extension owns the active IME.</summary>
///<param name='callback' type='function'>function(string engineID, KeyboardEvent keyData) {...} ;</param>
}
},
onMenuItemActivated: {
addListener: function (callback) {
///<summary>Called when the user selects a menu item</summary>
///<param name='callback' type='function'>function(string engineID, string name) {...} ;</param>
}
},
onReset: {
addListener: function (callback) {
///<summary>This event is sent when chrome terminates ongoing text input session.</summary>
///<param name='callback' type='function'>function(string engineID) {...} ;</param>
}
},
onSurroundingTextChanged: {
addListener: function (callback) {
///<summary>Called when the editable string around caret is changed or when the caret position is moved. The text length is limited to 100 characters for each back and forth direction.</summary>
///<param name='callback' type='function'>function(string engineID, object surroundingInfo) {...} ;</param>
}
},
setCandidateWindowProperties: function (parameters, callback) {
///<summary>Sets the properties of the candidate window. This fails if the extension doesn\u2019t own the active IME</summary>
///<param name='parameters' type='object'>{contextID: (integer), text: (string), segments: (optional arrayofobject), offset: (integer), properties: (object), cursor: (integer), length: (integer), candidateID: (integer), selectionStart: (optional integer), selectionEnd: (optional integer), items: (arrayof MenuItem ), candidates: (arrayofobject), engineID: (string)}</param>
///<param name='callback' type='function'> (optional) function(boolean success) {...} ;</param>
},
setCandidates: function (parameters, callback) {
///<summary>Sets the current candidate list. This fails if this extension doesn\u2019t own the active IME</summary>
///<param name='parameters' type='object'>{contextID: (integer), text: (string), segments: (optional arrayofobject), offset: (integer), properties: (object), cursor: (integer), length: (integer), candidateID: (integer), selectionStart: (optional integer), selectionEnd: (optional integer), items: (arrayof MenuItem ), candidates: (arrayofobject), engineID: (string)}</param>
///<param name='callback' type='function'> (optional) function(boolean success) {...} ;</param>
},
setComposition: function (parameters, callback) {
///<summary>Set the current composition. If this extension does not own the active IME, this fails.</summary>
///<param name='parameters' type='object'>{contextID: (integer), text: (string), segments: (optional arrayofobject), offset: (integer), properties: (object), cursor: (integer), length: (integer), candidateID: (integer), selectionStart: (optional integer), selectionEnd: (optional integer), items: (arrayof MenuItem ), candidates: (arrayofobject), engineID: (string)}</param>
///<param name='callback' type='function'> (optional) function(boolean success) {...} ;</param>
},
setCursorPosition: function (parameters, callback) {
///<summary>Set the position of the cursor in the candidate window. This is a no-op if this extension does not own the active IME.</summary>
///<param name='parameters' type='object'>{contextID: (integer), text: (string), segments: (optional arrayofobject), offset: (integer), properties: (object), cursor: (integer), length: (integer), candidateID: (integer), selectionStart: (optional integer), selectionEnd: (optional integer), items: (arrayof MenuItem ), candidates: (arrayofobject), engineID: (string)}</param>
///<param name='callback' type='function'> (optional) function(boolean success) {...} ;</param>
},
setMenuItems: function (parameters, callback) {
///<summary>Adds the provided menu items to the language menu when this IME is active.</summary>
///<param name='parameters' type='object'>{contextID: (integer), text: (string), segments: (optional arrayofobject), offset: (integer), properties: (object), cursor: (integer), length: (integer), candidateID: (integer), selectionStart: (optional integer), selectionEnd: (optional integer), items: (arrayof MenuItem ), candidates: (arrayofobject), engineID: (string)}</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
updateMenuItems: function (parameters, callback) {
///<summary>Updates the state of the MenuItems specified</summary>
///<param name='parameters' type='object'>{contextID: (integer), text: (string), segments: (optional arrayofobject), offset: (integer), properties: (object), cursor: (integer), length: (integer), candidateID: (integer), selectionStart: (optional integer), selectionEnd: (optional integer), items: (arrayof MenuItem ), candidates: (arrayofobject), engineID: (string)}</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
}
}
},
management: {
get: function (id, callback) {
///<summary>Returns information about the installed extension, app, or theme that has the given ID.</summary>
///<param name='id' type='string'>None</param>
///<param name='callback' type='function'> (optional) function( ExtensionInfo result) {...} ;</param>
},
getAll: function (callback) {
///<summary>Returns a list of information about installed extensions and apps.</summary>
///<param name='callback' type='function'> (optional) function(array of ExtensionInfo result) {...} ;</param>
},
getPermissionWarningsById: function (id, callback) {
///<summary>Returns a list of permission warnings for the given extension id.</summary>
///<param name='id' type='string'>The ID of an already installed extension.</param>
///<param name='callback' type='function'> (optional) function(array of string permissionWarnings) {...} ;</param>
},
getPermissionWarningsByManifest: function (manifestStr, callback) {
///<summary>Returns a list of permission warnings for the given extension manifest string. Note: This function can be used without requesting the 'management' permission in the manifest.</summary>
///<param name='manifestStr' type='string'>Extension manifest JSON string.</param>
///<param name='callback' type='function'> (optional) function(array of string permissionWarnings) {...} ;</param>
},
launchApp: function (id, callback) {
///<summary>Launches an application.</summary>
///<param name='id' type='string'>The extension id of the application.</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
onDisabled: {
addListener: function (callback) {
///<summary>Fired when an app or extension has been disabled.</summary>
///<param name='callback' type='function'>function( ExtensionInfo info) {...} ;</param>
}
},
onEnabled: {
addListener: function (callback) {
///<summary>Fired when an app or extension has been enabled.</summary>
///<param name='callback' type='function'>function( ExtensionInfo info) {...} ;</param>
}
},
onInstalled: {
addListener: function (callback) {
///<summary>Fired when an app or extension has been installed.</summary>
///<param name='callback' type='function'>function( ExtensionInfo info) {...} ;</param>
}
},
onUninstalled: {
addListener: function (callback) {
///<summary>Fired when an app or extension has been uninstalled.</summary>
///<param name='callback' type='function'>function(string id) {...} ;</param>
}
},
setEnabled: function (id, enabled, callback) {
///<summary>Enables or disables an app or extension.</summary>
///<param name='id' type='string'>None</param>
///<param name='enabled' type='boolean'>Whether this item should be enabled or disabled.</param>
///<param name='callback' type='function'> (optional) function() {...} ;</param>
},
uninstall: function (id, options, callback) {
///<summary>Uninstalls a currently installed app or extension.</summary>