-
Notifications
You must be signed in to change notification settings - Fork 0
/
chrome.intellisense.js
5522 lines (4964 loc) · 234 KB
/
chrome.intellisense.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
var chrome = {};
chrome.devtools = {};
chrome.declarativeWebRequest = {};
//#region Types
//#region Chrome.AccessibilityObject
chrome.AccessibilityObject = function () {
/// <field name='type' type='string'>The type of this object, which determines the contents of 'details'.</field>
/// <field name='name' type='string'>The localized name of the object, like OK or Password. Do not rely on an exact string match because the text will be in the user's language and may change in the future.</field>
/// <field name='context' type='string'>The localized name of the context for the object, like the name of the surrounding toolbar or group of controls.</field>
/// <field name='details' type=''>Other details like the state, depending on the type of object.</field>
this.type = "";
this.name = "";
this.context = "";
this.details = {};
};
//#endregion
//#region Chrome.AlertInfo
chrome.AlertInfo = function () {
/// <field name='message' type='string'>The message the alert is showing.</field>
this.message = "";
};
//#endregion
//#region Chrome.BlockingResponse
chrome.BlockingResponse = function () {
/// <field name='cancel' type='boolean'>If true, the request is cancelled. Used in onBeforeRequest, this prevents the request from being sent.</field>
/// <field name='redirectUrl' type='string'>Only used as a response to the onBeforeRequest event. If set, the original request is prevented from being sent and is instead redirected to the given URL.</field>
/// <field name='requestHeaders' type=''>Only used as a response to the onBeforeSendHeaders event. If set, the request is made with these request headers instead.</field>
/// <field name='responseHeaders' type=''>Only used as a response to the onHeadersReceived event. If set, the server is assumed to have responded with these response headers instead. Only return <code>responseHeaders</code> if you really want to modify the headers in order to limit the number of conflicts (only one extension may modify <code>responseHeaders</code> for each request).</field>
/// <field name='authCredentials' type='object'>Only used as a response to the onAuthRequired event. If set, the request is made using the supplied credentials.</field>
this.cancel = true;
this.redirectUrl = "";
this.requestHeaders = {};
this.responseHeaders = {};
this.authCredentials = {};
};
//#endregion
//#region Chrome.BookmarkTreeNode
chrome.BookmarkTreeNode = function () {
/// <field name='id' type='string'>The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the browser is restarted.</field>
/// <field name='parentId' type='string'>The <code>id</code> of the parent folder. Omitted for the root node.</field>
/// <field name='index' type='integer'>The 0-based position of this node within its parent folder.</field>
/// <field name='url' type='string'>The URL navigated to when a user clicks the bookmark. Omitted for folders.</field>
/// <field name='title' type='string'>The text displayed for the node.</field>
/// <field name='dateAdded' type='number'>When this node was created, in milliseconds since the epoch (<code>new Date(dateAdded)</code>).</field>
/// <field name='dateGroupModified' type='number'>When the contents of this folder last changed, in milliseconds since the epoch.</field>
/// <field name='children' type='array'>An ordered list of children of this node.</field>
this.id = "";
this.parentId = "";
this.index = {};
this.url = "";
this.title = "";
this.dateAdded = 0;
this.dateGroupModified = 0;
this.children = {};
};
//#endregion
//#region Chrome.Button
chrome.Button = function () {
this.update = function (iconPath, tooltipText, disabled) {
/// <summary>
/// Updates the attributes of the button. If some of the arguments are omitted or <code>null</code>, the corresponding attributes are not updated.
/// </summary>
/// <param name="iconPath" type="string" optional="true">Path to the new icon of the button.</param>
/// <param name="tooltipText" type="string" optional="true">Text shown as a tooltip when user hovers the mouse over the button.</param>
/// <param name="disabled" type="boolean" optional="true">Whether the button is disabled.</param>
//No Callback
};
};
//#endregion
//#region Chrome.Cache
chrome.Cache = function () {
/// <field name='size' type='number'>The size of the cache, in bytes.</field>
/// <field name='liveSize' type='number'>The part of the cache that is utilized, in bytes.</field>
this.size = 0;
this.liveSize = 0;
};
//#endregion
//#region Chrome.CancelRequest
chrome.CancelRequest = function () {
/// <field name='instanceType' type='string'></field>
this.instanceType = "";
};
//#endregion
//#region Chrome.CheckboxDetails
chrome.CheckboxDetails = function () {
/// <field name='isChecked' type='boolean'>True if this checkbox is checked.</field>
this.isChecked = true;
};
//#endregion
//#region Chrome.ChromeSetting
chrome.ChromeSetting = function () {
this.get = function (details, callback) {
/// <summary>
/// Gets the value of a setting.
/// </summary>
/// <param name="details" type="object" optional="false">Which setting to consider.</param>
/// <param name="callback" type="function" optional="false"></param>
callback({});
};
this.set = function (details, callback) {
/// <summary>
/// Sets the value of a setting.
/// </summary>
/// <param name="details" type="object" optional="false">Which setting to change.</param>
/// <param name="callback" type="function" optional="true">Called at the completion of the set operation.</param>
callback();
};
this.clear = function (details, callback) {
/// <summary>
/// Clears the setting, restoring any default value.
/// </summary>
/// <param name="details" type="object" optional="false">Which setting to clear.</param>
/// <param name="callback" type="function" optional="true">Called at the completion of the clear operation.</param>
callback();
};
};
//#endregion
//#region Chrome.ChromeSettingsOverrides
chrome.ChromeSettingsOverrides = function () {
/// <field name='bookmarks_ui' type='object'>Settings to permit bookmarks user interface customization by extensions.</field>
/// <field name='homepage' type='string'>New value for the homepage.</field>
/// <field name='search_provider' type='object'>A search engine</field>
/// <field name='startup_pages' type='array'>A new startup page to be added to the list.</field>
this.bookmarks_ui = {};
this.homepage = "";
this.search_provider = {};
this.startup_pages = {};
};
//#endregion
//#region Chrome.ClearDataOptions
chrome.ClearDataOptions = function () {
/// <field name='since' type='number'>Clear data accumulated on or after this date, represented in milliseconds since the epoch (accessible via the getTime method of the JavaScript <code>Date</code> object). If absent, defaults to <code>0</code> (which would remove all browsing data).</field>
this.since = 0;
};
//#endregion
//#region Chrome.ClearDataTypeSet
chrome.ClearDataTypeSet = function () {
/// <field name='appcache' type='boolean'>Websites' appcaches.</field>
/// <field name='cache' type='boolean'>The partition's cache. Note: This clears the entire cache regardless of the age passed to <code>clearData</code>.</field>
/// <field name='cookies' type='boolean'>The partition's cookies.</field>
/// <field name='downloads' type='boolean'>The partition's download list.</field>
/// <field name='fileSystems' type='boolean'>Websites' filesystems.</field>
/// <field name='formData' type='boolean'>The partition's stored form data.</field>
/// <field name='history' type='boolean'>The partition's history.</field>
/// <field name='indexedDB' type='boolean'>Websites' IndexedDB data.</field>
/// <field name='localStorage' type='boolean'>Websites' local storage data.</field>
/// <field name='serverBoundCertificates' type='boolean'>Server-bound certificates.</field>
/// <field name='pluginData' type='boolean'>Plugins' data.</field>
/// <field name='passwords' type='boolean'>Stored passwords.</field>
/// <field name='webSQL' type='boolean'>Websites' WebSQL data.</field>
this.appcache = true;
this.cache = true;
this.cookies = true;
this.downloads = true;
this.fileSystems = true;
this.formData = true;
this.history = true;
this.indexedDB = true;
this.localStorage = true;
this.serverBoundCertificates = true;
this.pluginData = true;
this.passwords = true;
this.webSQL = true;
};
//#endregion
//#region Chrome.ColorArray
chrome.ColorArray = function () {
};
//#endregion
//#region Chrome.ComboBoxDetails
chrome.ComboBoxDetails = function () {
/// <field name='value' type='string'>The value of the combo box.</field>
/// <field name='itemCount' type='integer'>The number of items in the combo box's list.</field>
/// <field name='itemIndex' type='integer'>The 0-based index of the current value, or -1 if the user entered a value not from the list.</field>
this.value = "";
this.itemCount = {};
this.itemIndex = {};
};
//#endregion
//#region Chrome.Command
chrome.Command = function () {
/// <field name='name' type='string'>The name of the Extension Command</field>
/// <field name='description' type='string'>The Extension Command description</field>
/// <field name='shortcut' type='string'>The shortcut active for this command, or blank if not active.</field>
this.name = "";
this.description = "";
this.shortcut = "";
};
//#endregion
//#region Chrome.ContentSetting
chrome.ContentSetting = function () {
this.clear = function (details, callback) {
/// <summary>
/// Clear all content setting rules set by this extension.
/// </summary>
/// <param name="details" type="object" optional="false"></param>
/// <param name="callback" type="function" optional="true"></param>
callback();
};
this.get = function (details, callback) {
/// <summary>
/// Gets the current content setting for a given pair of URLs.
/// </summary>
/// <param name="details" type="object" optional="false"></param>
/// <param name="callback" type="function" optional="false"></param>
callback({});
};
this.set = function (details, callback) {
/// <summary>
/// Applies a new content setting rule.
/// </summary>
/// <param name="details" type="object" optional="false"></param>
/// <param name="callback" type="function" optional="true"></param>
callback();
};
this.getResourceIdentifiers = function (callback) {
/// <summary>
///
/// </summary>
/// <param name="callback" type="function" optional="false"></param>
callback({});
};
};
//#endregion
//#region Chrome.ContentWindow
chrome.ContentWindow = function () {
this.postMessage = function (message, targetOrigin) {
/// <summary>
/// <p>Posts a message to the embedded web content as long as the embedded content is displaying a page from the target origin. This method is available once the page has completed loading. Listen for the <a href="#event-contentload">contentload</a> event and then call the method.</p><p>The guest will be able to send replies to the embedder by posting message to <code>event.source</code> on the message event it receives.</p><p>This API is identical to the <a href="https://developer.mozilla.org/en-US/docs/DOM/window.postMessage">HTML5 postMessage API</a> for communication between web pages. The embedder may listen for replies by adding a <code>message</code> event listener to its own frame.</p>
/// </summary>
/// <param name="message" type="any" optional="false">Message object to send to the guest.</param>
/// <param name="targetOrigin" type="string" optional="false">Specifies what the origin of the guest window must be for the event to be dispatched.</param>
//No Callback
};
};
//#endregion
//#region Chrome.Cookie
chrome.Cookie = function () {
/// <field name='name' type='string'>The name of the cookie.</field>
/// <field name='value' type='string'>The value of the cookie.</field>
/// <field name='domain' type='string'>The domain of the cookie (e.g. "www.google.com", "example.com").</field>
/// <field name='hostOnly' type='boolean'>True if the cookie is a host-only cookie (i.e. a request's host must exactly match the domain of the cookie).</field>
/// <field name='path' type='string'>The path of the cookie.</field>
/// <field name='secure' type='boolean'>True if the cookie is marked as Secure (i.e. its scope is limited to secure channels, typically HTTPS).</field>
/// <field name='httpOnly' type='boolean'>True if the cookie is marked as HttpOnly (i.e. the cookie is inaccessible to client-side scripts).</field>
/// <field name='session' type='boolean'>True if the cookie is a session cookie, as opposed to a persistent cookie with an expiration date.</field>
/// <field name='expirationDate' type='number'>The expiration date of the cookie as the number of seconds since the UNIX epoch. Not provided for session cookies.</field>
/// <field name='storeId' type='string'>The ID of the cookie store containing this cookie, as provided in getAllCookieStores().</field>
this.name = "";
this.value = "";
this.domain = "";
this.hostOnly = true;
this.path = "";
this.secure = true;
this.httpOnly = true;
this.session = true;
this.expirationDate = 0;
this.storeId = "";
};
//#endregion
//#region Chrome.CookieStore
chrome.CookieStore = function () {
/// <field name='id' type='string'>The unique identifier for the cookie store.</field>
/// <field name='tabIds' type='array'>Identifiers of all the browser tabs that share this cookie store.</field>
this.id = "";
this.tabIds = {};
};
//#endregion
//#region Chrome.DataTypeSet
chrome.DataTypeSet = function () {
/// <field name='appcache' type='boolean'>Websites' appcaches.</field>
/// <field name='cache' type='boolean'>The browser's cache. Note: when removing data, this clears the <em>entire</em> cache: it is not limited to the range you specify.</field>
/// <field name='cookies' type='boolean'>The browser's cookies.</field>
/// <field name='downloads' type='boolean'>The browser's download list.</field>
/// <field name='fileSystems' type='boolean'>Websites' file systems.</field>
/// <field name='formData' type='boolean'>The browser's stored form data.</field>
/// <field name='history' type='boolean'>The browser's history.</field>
/// <field name='indexedDB' type='boolean'>Websites' IndexedDB data.</field>
/// <field name='localStorage' type='boolean'>Websites' local storage data.</field>
/// <field name='serverBoundCertificates' type='boolean'>Server-bound certificates.</field>
/// <field name='pluginData' type='boolean'>Plugins' data.</field>
/// <field name='passwords' type='boolean'>Stored passwords.</field>
/// <field name='webSQL' type='boolean'>Websites' WebSQL data.</field>
this.appcache = true;
this.cache = true;
this.cookies = true;
this.downloads = true;
this.fileSystems = true;
this.formData = true;
this.history = true;
this.indexedDB = true;
this.localStorage = true;
this.serverBoundCertificates = true;
this.pluginData = true;
this.passwords = true;
this.webSQL = true;
};
//#endregion
//#region Chrome.DataTypeSet
chrome.DataTypeSet = function () {
/// <field name='appcache' type='boolean'>Websites' appcaches.</field>
/// <field name='cookies' type='boolean'>The browser's cookies.</field>
/// <field name='fileSystems' type='boolean'>Websites' file systems.</field>
/// <field name='indexedDB' type='boolean'>Websites' IndexedDB data.</field>
/// <field name='localStorage' type='boolean'>Websites' local storage data.</field>
/// <field name='webSQL' type='boolean'>Websites' WebSQL data.</field>
this.appcache = true;
this.cookies = true;
this.fileSystems = true;
this.indexedDB = true;
this.localStorage = true;
this.webSQL = true;
};
//#endregion
//#region Chrome.Debuggee
chrome.Debuggee = function () {
/// <field name='tabId' type='integer'>The id of the tab which you intend to debug.</field>
/// <field name='extensionId' type='string'>The id of the extension which you intend to debug. Attaching to an extension background page is only possible when 'enable-silent-debugging' flag is enabled on the target browser.</field>
/// <field name='targetId' type='string'>The opaque id of the debug target.</field>
this.tabId = {};
this.extensionId = "";
this.targetId = "";
};
//#endregion
//#region Chrome.declarativeWebRequest.AddRequestCookie
chrome.declarativeWebRequest.AddRequestCookie = function () {
/// <field name='instanceType' type='string'></field>
/// <field name='cookie' type=''>Cookie to be added to the request. No field may be undefined.</field>
this.instanceType = "";
this.cookie = {};
};
//#endregion
//#region Chrome.declarativeWebRequest.AddResponseCookie
chrome.declarativeWebRequest.AddResponseCookie = function () {
/// <field name='instanceType' type='string'></field>
/// <field name='cookie' type=''>Cookie to be added to the response. The name and value need to be specified.</field>
this.instanceType = "";
this.cookie = {};
};
//#endregion
//#region Chrome.declarativeWebRequest.AddResponseHeader
chrome.declarativeWebRequest.AddResponseHeader = function () {
/// <field name='instanceType' type='string'></field>
/// <field name='name' type='string'>HTTP response header name.</field>
/// <field name='value' type='string'>HTTP response header value.</field>
this.instanceType = "";
this.name = "";
this.value = "";
};
//#endregion
//#region Chrome.declarativeWebRequest.EditRequestCookie
chrome.declarativeWebRequest.EditRequestCookie = function () {
/// <field name='instanceType' type='string'></field>
/// <field name='filter' type=''>Filter for cookies that will be modified. All empty entries are ignored.</field>
/// <field name='modification' type=''>Attributes that shall be overridden in cookies that machted the filter. Attributes that are set to an empty string are removed.</field>
this.instanceType = "";
this.filter = {};
this.modification = {};
};
//#endregion
//#region Chrome.declarativeWebRequest.EditResponseCookie
chrome.declarativeWebRequest.EditResponseCookie = function () {
/// <field name='instanceType' type='string'></field>
/// <field name='filter' type=''>Filter for cookies that will be modified. All empty entries are ignored.</field>
/// <field name='modification' type=''>Attributes that shall be overridden in cookies that machted the filter. Attributes that are set to an empty string are removed.</field>
this.instanceType = "";
this.filter = {};
this.modification = {};
};
//#endregion
//#region Chrome.declarativeWebRequest.FilterResponseCookie
chrome.declarativeWebRequest.FilterResponseCookie = function () {
/// <field name='name' type='string'>Name of a cookie.</field>
/// <field name='value' type='string'>Value of a cookie, may be padded in double-quotes.</field>
/// <field name='expires' type='string'>Value of the Expires cookie attribute.</field>
/// <field name='maxAge' type='number'>Value of the Max-Age cookie attribute</field>
/// <field name='domain' type='string'>Value of the Domain cookie attribute.</field>
/// <field name='path' type='string'>Value of the Path cookie attribute.</field>
/// <field name='secure' type='string'>Existence of the Secure cookie attribute.</field>
/// <field name='httpOnly' type='string'>Existence of the HttpOnly cookie attribute.</field>
/// <field name='ageUpperBound' type='integer'>Inclusive upper bound on the cookie lifetime (specified in seconds after current time). Only cookies whose expiration date-time is in the interval [now, now + ageUpperBound] fulfill this criterion. Session cookies and cookies whose expiration date-time is in the past do not meet the criterion of this filter. The cookie lifetime is calculated from either 'max-age' or 'expires' cookie attributes. If both are specified, 'max-age' is used to calculate the cookie lifetime.</field>
/// <field name='ageLowerBound' type='integer'>Inclusive lower bound on the cookie lifetime (specified in seconds after current time). Only cookies whose expiration date-time is set to 'now + ageLowerBound' or later fulfill this criterion. Session cookies do not meet the criterion of this filter. The cookie lifetime is calculated from either 'max-age' or 'expires' cookie attributes. If both are specified, 'max-age' is used to calculate the cookie lifetime.</field>
/// <field name='sessionCookie' type='boolean'>Filters session cookies. Session cookies have no lifetime specified in any of 'max-age' or 'expires' attributes.</field>
this.name = "";
this.value = "";
this.expires = "";
this.maxAge = 0;
this.domain = "";
this.path = "";
this.secure = "";
this.httpOnly = "";
this.ageUpperBound = {};
this.ageLowerBound = {};
this.sessionCookie = true;
};
//#endregion
//#region Chrome.declarativeWebRequest.IgnoreRules
chrome.declarativeWebRequest.IgnoreRules = function () {
/// <field name='instanceType' type='string'></field>
/// <field name='lowerPriorityThan' type='integer'>If set, rules with a lower priority than the specified value are ignored. This boundary is not persisted, it affects only rules and their actions of the same network request stage.</field>
/// <field name='hasTag' type='string'>If set, rules with the specified tag are ignored. This ignoring is not persisted, it affects only rules and their actions of the same network request stage. Note that rules are executed in descending order of their priorities. This action affects rules of lower priority than the current rule. Rules with the same priority may or may not be ignored.</field>
this.instanceType = "";
this.lowerPriorityThan = {};
this.hasTag = "";
};
//#endregion
//#region Chrome.declarativeWebRequest.RedirectByRegEx
chrome.declarativeWebRequest.RedirectByRegEx = function () {
/// <field name='instanceType' type='string'></field>
/// <field name='from' type='string'>A match pattern that may contain capture groups. Capture groups are referenced in the Perl syntax ($1, $2, ...) instead of the RE2 syntax (\1, \2, ...) in order to be closer to JavaScript Regular Expressions.</field>
/// <field name='to' type='string'>Destination pattern.</field>
this.instanceType = "";
this.from = "";
this.to = "";
};
//#endregion
//#region Chrome.declarativeWebRequest.RedirectToEmptyDocument
chrome.declarativeWebRequest.RedirectToEmptyDocument = function () {
/// <field name='instanceType' type='string'></field>
this.instanceType = "";
};
//#endregion
//#region Chrome.declarativeWebRequest.RedirectToTransparentImage
chrome.declarativeWebRequest.RedirectToTransparentImage = function () {
/// <field name='instanceType' type='string'></field>
this.instanceType = "";
};
//#endregion
//#region Chrome.declarativeWebRequest.RemoveRequestCookie
chrome.declarativeWebRequest.RemoveRequestCookie = function () {
/// <field name='instanceType' type='string'></field>
/// <field name='filter' type=''>Filter for cookies that will be removed. All empty entries are ignored.</field>
this.instanceType = "";
this.filter = {};
};
//#endregion
//#region Chrome.declarativeWebRequest.RemoveRequestHeader
chrome.declarativeWebRequest.RemoveRequestHeader = function () {
/// <field name='instanceType' type='string'></field>
/// <field name='name' type='string'>HTTP request header name (case-insensitive).</field>
this.instanceType = "";
this.name = "";
};
//#endregion
//#region Chrome.declarativeWebRequest.RemoveResponseCookie
chrome.declarativeWebRequest.RemoveResponseCookie = function () {
/// <field name='instanceType' type='string'></field>
/// <field name='filter' type=''>Filter for cookies that will be removed. All empty entries are ignored.</field>
this.instanceType = "";
this.filter = {};
};
//#endregion
//#region Chrome.declarativeWebRequest.RemoveResponseHeader
chrome.declarativeWebRequest.RemoveResponseHeader = function () {
/// <field name='instanceType' type='string'></field>
/// <field name='name' type='string'>HTTP request header name (case-insensitive).</field>
/// <field name='value' type='string'>HTTP request header value (case-insensitive).</field>
this.instanceType = "";
this.name = "";
this.value = "";
};
//#endregion
//#region Chrome.declarativeWebRequest.RequestCookie
chrome.declarativeWebRequest.RequestCookie = function () {
/// <field name='name' type='string'>Name of a cookie.</field>
/// <field name='value' type='string'>Value of a cookie, may be padded in double-quotes.</field>
this.name = "";
this.value = "";
};
//#endregion
//#region Chrome.declarativeWebRequest.ResponseCookie
chrome.declarativeWebRequest.ResponseCookie = function () {
/// <field name='name' type='string'>Name of a cookie.</field>
/// <field name='value' type='string'>Value of a cookie, may be padded in double-quotes.</field>
/// <field name='expires' type='string'>Value of the Expires cookie attribute.</field>
/// <field name='maxAge' type='number'>Value of the Max-Age cookie attribute</field>
/// <field name='domain' type='string'>Value of the Domain cookie attribute.</field>
/// <field name='path' type='string'>Value of the Path cookie attribute.</field>
/// <field name='secure' type='string'>Existence of the Secure cookie attribute.</field>
/// <field name='httpOnly' type='string'>Existence of the HttpOnly cookie attribute.</field>
this.name = "";
this.value = "";
this.expires = "";
this.maxAge = 0;
this.domain = "";
this.path = "";
this.secure = "";
this.httpOnly = "";
};
//#endregion
//#region Chrome.declarativeWebRequest.SendMessageToExtension
chrome.declarativeWebRequest.SendMessageToExtension = function () {
/// <field name='instanceType' type='string'></field>
/// <field name='message' type='string'>The value that will be passed in the <code>message</code> attribute of the dictionary that is passed to the event handler.</field>
this.instanceType = "";
this.message = "";
};
//#endregion
//#region Chrome.declarativeWebRequest.SetRequestHeader
chrome.declarativeWebRequest.SetRequestHeader = function () {
/// <field name='instanceType' type='string'></field>
/// <field name='name' type='string'>HTTP request header name.</field>
/// <field name='value' type='string'>HTTP request header value.</field>
this.instanceType = "";
this.name = "";
this.value = "";
};
//#endregion
//#region Chrome.DefaultSuggestResult
chrome.DefaultSuggestResult = function () {
/// <field name='description' type='string'>The text that is displayed in the URL dropdown. Can contain XML-style markup for styling. The supported tags are 'url' (for a literal URL), 'match' (for highlighting text that matched what the user's query), and 'dim' (for dim helper text). The styles can be nested, eg. <dim><match>dimmed match</match></dim>.</field>
/// <field name='descriptionStyles' type='array'>An array of style ranges for the description, as provided by the extension.</field>
/// <field name='descriptionStylesRaw' type='array'>An array of style ranges for the description, as provided by ToValue().</field>
this.description = "";
this.descriptionStyles = {};
this.descriptionStylesRaw = {};
};
//#endregion
//#region Chrome.DesktopCaptureSourceType
chrome.DesktopCaptureSourceType = function () {
};
//#endregion
//#region Chrome.Details
chrome.Details = function () {
};
//#endregion
//#region Chrome.Device
chrome.Device = function () {
/// <field name='info' type='string'>Represents all information about a foreign device.</field>
/// <field name='sessions' type='array'>A list of open window sessions for the foreign device, sorted from most recently to least recently modified session.</field>
this.info = "";
this.sessions = {};
};
//#endregion
//#region Chrome.DialogController
chrome.DialogController = function () {
this.ok = function (response) {
/// <summary>
/// Accept the dialog. Equivalent to clicking OK in an <code>alert</code>, <code>confirm</code>, or <code>prompt</code> dialog.
/// </summary>
/// <param name="response" type="string" optional="true">The response string to provide to the guest when accepting a <code>prompt</code> dialog.</param>
//No Callback
};
this.cancel = function () {
/// <summary>
/// Reject the dialog. Equivalent to clicking Cancel in a <code>confirm</code> or <code>prompt</code> dialog.
/// </summary>
//No Callback
};
};
//#endregion
//#region Chrome.DOMWindow
chrome.DOMWindow = function () {
};
//#endregion
//#region Chrome.DownloadPermissionRequest
chrome.DownloadPermissionRequest = function () {
/// <field name='requestMethod' type='string'>The HTTP request type (e.g. <code>GET</code>) associated with the download request.</field>
/// <field name='url' type='string'>The requested download URL.</field>
this.requestMethod = "";
this.url = "";
this.allow = function () {
/// <summary>
/// Allow the permission request.
/// </summary>
//No Callback
};
this.deny = function () {
/// <summary>
/// Deny the permission request. This is the default behavior if <code>allow</code> is not called.
/// </summary>
//No Callback
};
};
//#endregion
//#region Chrome.ElementsPanel
chrome.ElementsPanel = function () {
this.createSidebarPane = function (title, callback) {
/// <summary>
/// Creates a pane within panel's sidebar.
/// </summary>
/// <param name="title" type="string" optional="false">Text that is displayed in sidebar caption.</param>
/// <param name="callback" type="function" optional="true">A callback invoked when the sidebar is created.</param>
callback(new chrome.ExtensionSidebarPane());
};
};
//#endregion
//#region Chrome.Event
chrome.Event = function () {
this.addListener = function (callback) {
/// <summary>
/// Registers an event listener <em>callback</em> to an event.
/// </summary>
/// <param name="callback" type="function" optional="false">Called when an event occurs. The parameters of this function depend on the type of event.</param>
callback();
};
this.removeListener = function (callback) {
/// <summary>
/// Deregisters an event listener <em>callback</em> from an event.
/// </summary>
/// <param name="callback" type="function" optional="false">Listener that shall be unregistered.</param>
callback();
};
this.hasListener = function (callback) {
/// <summary>
/// </summary>
/// <param name="callback" type="function" optional="false">Listener whose registration status shall be tested.</param>
callback();
return true;
};
this.hasListeners = function () {
/// <summary>
/// </summary>
//No Callback
return true;
};
this.addRules = function (eventName, webViewInstanceId, rules, callback) {
/// <summary>
/// Registers rules to handle events.
/// </summary>
/// <param name="eventName" type="string" optional="false">Name of the event this function affects.</param>
/// <param name="webViewInstanceId" type="integer" optional="false">If provided, this is an integer that uniquely identfies the <webview> associated with this function call.</param>
/// <param name="rules" type="array" optional="false">Rules to be registered. These do not replace previously registered rules.</param>
/// <param name="callback" type="function" optional="true">Called with registered rules.</param>
callback({});
};
this.getRules = function (eventName, webViewInstanceId, ruleIdentifiers, callback) {
/// <summary>
/// Returns currently registered rules.
/// </summary>
/// <param name="eventName" type="string" optional="false">Name of the event this function affects.</param>
/// <param name="webViewInstanceId" type="integer" optional="false">If provided, this is an integer that uniquely identfies the <webview> associated with this function call.</param>
/// <param name="ruleIdentifiers" type="array" optional="true">If an array is passed, only rules with identifiers contained in this array are returned.</param>
/// <param name="callback" type="function" optional="false">Called with registered rules.</param>
callback({});
};
this.removeRules = function (eventName, webViewInstanceId, ruleIdentifiers, callback) {
/// <summary>
/// Unregisters currently registered rules.
/// </summary>
/// <param name="eventName" type="string" optional="false">Name of the event this function affects.</param>
/// <param name="webViewInstanceId" type="integer" optional="false">If provided, this is an integer that uniquely identfies the <webview> associated with this function call.</param>
/// <param name="ruleIdentifiers" type="array" optional="true">If an array is passed, only rules with identifiers contained in this array are unregistered.</param>
/// <param name="callback" type="function" optional="true">Called when rules were unregistered.</param>
callback();
};
};
//#endregion
//#region Chrome.ExtensionInfo
chrome.ExtensionInfo = function () {
/// <field name='id' type='string'>The extension's unique identifier.</field>
/// <field name='name' type='string'>The name of this extension, app, or theme.</field>
/// <field name='shortName' type='string'>A short version of the name of this extension, app, or theme.</field>
/// <field name='description' type='string'>The description of this extension, app, or theme.</field>
/// <field name='version' type='string'>The <a href='manifest/version.html'>version</a> of this extension, app, or theme.</field>
/// <field name='mayDisable' type='boolean'>Whether this extension can be disabled or uninstalled by the user.</field>
/// <field name='enabled' type='boolean'>Whether it is currently enabled or disabled.</field>
/// <field name='disabledReason' type='string'>A reason the item is disabled.</field>
/// <field name='isApp' type='boolean'>True if this is an app.</field>
/// <field name='type' type='string'>The type of this extension, app, or theme.</field>
/// <field name='appLaunchUrl' type='string'>The launch url (only present for apps).</field>
/// <field name='homepageUrl' type='string'>The URL of the homepage of this extension, app, or theme.</field>
/// <field name='updateUrl' type='string'>The update URL of this extension, app, or theme.</field>
/// <field name='offlineEnabled' type='boolean'>Whether the extension, app, or theme declares that it supports offline.</field>
/// <field name='optionsUrl' type='string'>The url for the item's options page, if it has one.</field>
/// <field name='icons' type='array'>A list of icon information. Note that this just reflects what was declared in the manifest, and the actual image at that url may be larger or smaller than what was declared, so you might consider using explicit width and height attributes on img tags referencing these images. See the <a href='manifest/icons.html'>manifest documentation on icons</a> for more details.</field>
/// <field name='permissions' type='array'>Returns a list of API based permissions.</field>
/// <field name='hostPermissions' type='array'>Returns a list of host based permissions.</field>
/// <field name='installType' type='string'>How the extension was installed. One of<br><var>admin</var>: The extension was installed because of an administrative policy,<br><var>development</var>: The extension was loaded unpacked in developer mode,<br><var>normal</var>: The extension was installed normally via a .crx file,<br><var>sideload</var>: The extension was installed by other software on the machine,<br><var>other</var>: The extension was installed by other means.</field>
this.id = "";
this.name = "";
this.shortName = "";
this.description = "";
this.version = "";
this.mayDisable = true;
this.enabled = true;
this.disabledReason = "";
this.isApp = true;
this.type = "";
this.appLaunchUrl = "";
this.homepageUrl = "";
this.updateUrl = "";
this.offlineEnabled = true;
this.optionsUrl = "";
this.icons = {};
this.permissions = {};
this.hostPermissions = {};
this.installType = "";
};
//#endregion
//#region Chrome.ExtensionPanel
chrome.ExtensionPanel = function () {
this.createStatusBarButton = function (iconPath, tooltipText, disabled) {
/// <summary>
/// Appends a button to the status bar of the panel.
/// </summary>
/// <param name="iconPath" type="string" optional="false">Path to the icon of the button. The file should contain a 64x24-pixel image composed of two 32x24 icons. The left icon is used when the button is inactive; the right icon is displayed when the button is pressed.</param>
/// <param name="tooltipText" type="string" optional="false">Text shown as a tooltip when user hovers the mouse over the button.</param>
/// <param name="disabled" type="boolean" optional="false">Whether the button is disabled.</param>
//No Callback
return new chrome.Button;
};
};
//#endregion
//#region Chrome.ExtensionSidebarPane
chrome.ExtensionSidebarPane = function () {
this.setHeight = function (height) {
/// <summary>
/// Sets the height of the sidebar.
/// </summary>
/// <param name="height" type="string" optional="false">A CSS-like size specification, such as <code>'100px'</code> or <code>'12ex'</code>.</param>
//No Callback
};
this.setExpression = function (expression, rootTitle, callback) {
/// <summary>
/// Sets an expression that is evaluated within the inspected page. The result is displayed in the sidebar pane.
/// </summary>
/// <param name="expression" type="string" optional="false">An expression to be evaluated in context of the inspected page. JavaScript objects and DOM nodes are displayed in an expandable tree similar to the console/watch.</param>
/// <param name="rootTitle" type="string" optional="true">An optional title for the root of the expression tree.</param>
/// <param name="callback" type="function" optional="true">A callback invoked after the sidebar pane is updated with the expression evaluation results.</param>
callback();
};
this.setObject = function (jsonObject, rootTitle, callback) {
/// <summary>
/// Sets a JSON-compliant object to be displayed in the sidebar pane.
/// </summary>
/// <param name="jsonObject" type="string" optional="false">An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client).</param>
/// <param name="rootTitle" type="string" optional="true">An optional title for the root of the expression tree.</param>
/// <param name="callback" type="function" optional="true">A callback invoked after the sidebar is updated with the object.</param>
callback();
};
this.setPage = function (path) {
/// <summary>
/// Sets an HTML page to be displayed in the sidebar pane.
/// </summary>
/// <param name="path" type="string" optional="false">Relative path of an extension page to display within the sidebar.</param>
//No Callback
};
};
//#endregion
//#region Chrome.ExternallyConnectable
chrome.ExternallyConnectable = function () {
/// <field name='ids' type='array'><p>The IDs of extensions or apps that are allowed to connect. If left empty or unspecified, no extensions or apps can connect.</p><p>The wildcard <code>"*"</code> will allow all extensions and apps to connect.</p></field>
/// <field name='matches' type='array'><p>The URL patterns for <em>web pages</em> that are allowed to connect. <em>This does not affect content scripts.</em> If left empty or unspecified, no web pages can connect.</p><p>Patterns cannot include wildcard domains nor subdomains of (effective) top level domains; <code>*://google.com/*</code> and <code>http://*.chromium.org/*</code> are valid, while <code><all_urls></code>, <code>http://*/*</code>, <code>*://*.com/*</code>, and even <code>http://*.appspot.com/*</code> are not.</p></field>
/// <field name='accepts_tls_channel_id' type='boolean'>If <code>true</code>, messages sent via ref:runtime.connect or ref:runtime.sendMessage will set ref:runtime.MessageSender.tlsChannelId if those methods request it to be. If <code>false</code>, ref:runtime.MessageSender.tlsChannelId will never be set under any circumstance.</field>
this.ids = {};
this.matches = {};
this.accepts_tls_channel_id = true;
};
//#endregion
//#region Chrome.FileEntryInfo
chrome.FileEntryInfo = function () {
/// <field name='fileSystemName' type='string'></field>
/// <field name='fileSystemRoot' type='string'></field>
/// <field name='fileFullPath' type='string'></field>
/// <field name='fileIsDirectory' type='boolean'></field>
this.fileSystemName = "";
this.fileSystemRoot = "";
this.fileFullPath = "";
this.fileIsDirectory = true;
};
//#endregion
//#region Chrome.FileHandlerExecuteEventDetails
chrome.FileHandlerExecuteEventDetails = function () {
/// <field name='entries' type='array'>Array of Entry instances representing files that are targets of this action (selected in ChromeOS file browser).</field>
/// <field name='tab_id' type='integer'>The ID of the tab that raised this event. Tab IDs are unique within a browser session.</field>
this.entries = {};
this.tab_id = {};
};
//#endregion
//#region Chrome.Filter
chrome.Filter = function () {
/// <field name='maxResults' type='integer'>The maximum number of entries to be fetched in the requested list. Omit this parameter to fetch the maximum number of entries (ref:MAX_SESSION_RESULTS).</field>
this.maxResults = {};
};
//#endregion
//#region Chrome.FontName
chrome.FontName = function () {
/// <field name='fontId' type='string'>The font ID.</field>
/// <field name='displayName' type='string'>The display name of the font.</field>
this.fontId = "";
this.displayName = "";
};
//#endregion
//#region Chrome.GenericFamily
chrome.GenericFamily = function () {
};
//#endregion
//#region Chrome.GeolocationPermissionRequest
chrome.GeolocationPermissionRequest = function () {
/// <field name='url' type='string'>The URL of the frame requesting access to geolocation data.</field>
this.url = "";
this.allow = function () {
/// <summary>
/// Allow the permission request.
/// </summary>
//No Callback
};
this.deny = function () {
/// <summary>
/// Deny the permission request. This is the default behavior if <code>allow</code> is not called.
/// </summary>
//No Callback
};
};
//#endregion
//#region Chrome.HeaderFilter
chrome.HeaderFilter = function () {
/// <field name='namePrefix' type='string'>Matches if the header name starts with the specified string.</field>
/// <field name='nameSuffix' type='string'>Matches if the header name ends with the specified string.</field>
/// <field name='nameContains' type=''>Matches if the header name contains all of the specified strings.</field>
/// <field name='nameEquals' type='string'>Matches if the header name is equal to the specified string.</field>
/// <field name='valuePrefix' type='string'>Matches if the header value starts with the specified string.</field>
/// <field name='valueSuffix' type='string'>Matches if the header value ends with the specified string.</field>
/// <field name='valueContains' type=''>Matches if the header value contains all of the specified strings.</field>
/// <field name='valueEquals' type='string'>Matches if the header value is equal to the specified string.</field>
this.namePrefix = "";
this.nameSuffix = "";
this.nameContains = {};
this.nameEquals = "";
this.valuePrefix = "";
this.valueSuffix = "";
this.valueContains = {};
this.valueEquals = "";
};
//#endregion
//#region Chrome.HistoryItem
chrome.HistoryItem = function () {
/// <field name='id' type='string'>The unique identifier for the item.</field>
/// <field name='url' type='string'>The URL navigated to by a user.</field>
/// <field name='title' type='string'>The title of the page when it was last loaded.</field>
/// <field name='lastVisitTime' type='number'>When this page was last loaded, represented in milliseconds since the epoch.</field>
/// <field name='visitCount' type='integer'>The number of times the user has navigated to this page.</field>
/// <field name='typedCount' type='integer'>The number of times the user has navigated to this page by typing in the address.</field>
this.id = "";
this.url = "";
this.title = "";
this.lastVisitTime = 0;
this.visitCount = {};
this.typedCount = {};
};
//#endregion
//#region Chrome.HttpHeaders
chrome.HttpHeaders = function () {
};
//#endregion
//#region Chrome.IconInfo
chrome.IconInfo = function () {
/// <field name='size' type='integer'>A number representing the width and height of the icon. Likely values include (but are not limited to) 128, 48, 24, and 16.</field>
/// <field name='url' type='string'>The URL for this icon image. To display a grayscale version of the icon (to indicate that an extension is disabled, for example), append <code>?grayscale=true</code> to the URL.</field>
this.size = {};
this.url = "";
};
//#endregion
//#region Chrome.ImageDataType
chrome.ImageDataType = function () {
};
//#endregion
//#region Chrome.ImageDataType
chrome.ImageDataType = function () {
};
//#endregion
//#region Chrome.ImageDetails
chrome.ImageDetails = function () {
/// <field name='format' type='string'>The format of the resulting image. Default is <code>"jpeg"</code>.</field>
/// <field name='quality' type='integer'>When format is <code>"jpeg"</code>, controls the quality of the resulting image. This value is ignored for PNG images. As quality is decreased, the resulting image will have more visual artifacts, and the number of bytes needed to store it will decrease.</field>
this.format = "";
this.quality = {};
};
//#endregion
//#region Chrome.InjectDetails
chrome.InjectDetails = function () {
/// <field name='code' type='string'>JavaScript or CSS code to inject.</field>
/// <field name='file' type='string'>JavaScript or CSS file to inject.</field>
/// <field name='allFrames' type='boolean'>If allFrames is <code>true</code>, implies that the JavaScript or CSS should be injected into all frames of current page. By default, it's <code>false</code> and is only injected into the top frame.</field>
/// <field name='runAt' type='string'>The soonest that the JavaScript or CSS will be injected into the tab. Defaults to "document_idle".</field>
this.code = "";
this.file = "";
this.allFrames = true;
this.runAt = "";
};
//#endregion
//#region Chrome.InjectDetails
chrome.InjectDetails = function () {
/// <field name='code' type='string'>JavaScript or CSS code to inject.</field>
/// <field name='file' type='string'>JavaScript or CSS file to inject.</field>
this.code = "";
this.file = "";
};
//#endregion
//#region Chrome.InputContext
chrome.InputContext = function () {
/// <field name='contextID' type='integer'>This is used to specify targets of text field operations. This ID becomes invalid as soon as onBlur is called.</field>
/// <field name='type' type='string'>Type of value this text field edits, (Text, Number, URL, etc)</field>
this.contextID = {};
this.type = "";
};
//#endregion
//#region Chrome.KeyboardEvent
chrome.KeyboardEvent = function () {
/// <field name='type' type='string'>One of keyup or keydown.</field>
/// <field name='requestId' type='string'>The ID of the request.</field>
/// <field name='key' type='string'>Value of the key being pressed</field>