Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / resources / chromeos / chromevox / common / chrome_extension_externs.js
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5
6 /**
7  * @fileoverview Definitions for the Chromium extensions API used by ChromeVox.
8  *
9  * @externs
10  */
11
12
13 /**
14  * @const
15  */
16 chrome.app = {};
17
18
19 /**
20  * @const
21  */
22 chrome.extension = {};
23
24
25 /** @type {!Object|undefined} */
26 chrome.extension.lastError = {};
27
28
29 /**
30  * @type {string|undefined}
31  */
32 chrome.extension.lastError.message;
33
34
35 /** @type {boolean|undefined} */
36 chrome.extension.inIncognitoContext;
37
38
39 /**
40  * @param {string|Object.<string>=} opt_extensionIdOrConnectInfo Either the
41  *     extensionId to connect to, in which case connectInfo params can be
42  *     passed in the next optional argument, or the connectInfo params.
43  * @param {Object.<string>=} opt_connectInfo The connectInfo object,
44  *     if arg1 was the extensionId to connect to.
45  * @return {Port} New port.
46  */
47 chrome.extension.connect = function(
48     opt_extensionIdOrConnectInfo, opt_connectInfo) {};
49
50
51 /**
52  * @return {Window} The global JS object for the background page.
53  */
54 chrome.extension.getBackgroundPage = function() {};
55
56
57 /**
58  * @param {string} path A path to a resource within an extension expressed
59  *     relative to it's install directory.
60  * @return {string} The fully-qualified URL to the resource.
61  */
62 chrome.extension.getURL = function(path) {};
63
64
65 /**
66  * @param {function(boolean): void} callback Callback function.
67  */
68 chrome.extension.isAllowedIncognitoAccess = function(callback) {};
69
70
71 /**
72  * @param {string|*} extensionIdOrRequest Either the extensionId to send the
73  *     request to, in which case the request is passed as the next arg, or the
74  *     request.
75  * @param {*=} opt_request The request value, if arg1 was the extensionId.
76  * @param {function(*): void=} opt_callback The callback function which
77  *     takes a JSON response object sent by the handler of the request.
78  */
79 chrome.extension.sendMessage = function(
80     extensionIdOrRequest, opt_request, opt_callback) {};
81
82
83 /** @type {ChromeEvent} */
84 chrome.extension.onConnect;
85
86
87 /** @type {ChromeEvent} */
88 chrome.extension.onConnectExternal;
89
90
91 /** @type {ChromeEvent} */
92 chrome.extension.onMessage;
93
94
95 /**
96  * @const
97  */
98 chrome.runtime = {};
99
100
101 /** @type {!Object|undefined} */
102 chrome.runtime.lastError = {};
103
104
105 /**
106  * @type {string|undefined}
107  */
108 chrome.runtime.lastError.message;
109
110
111 /** @type {string} */
112 chrome.runtime.id;
113
114
115 /**
116  * @param {function(!Window=): void} callback Callback function.
117  */
118 chrome.runtime.getBackgroundPage = function(callback) {};
119
120
121
122 /**
123  * Manifest information returned from chrome.runtime.getManifest. See
124  * http://developer.chrome.com/extensions/manifest.html. Note that there are
125  * several other fields not included here. They should be added to these externs
126  * as needed.
127  * @constructor
128  */
129 chrome.runtime.Manifest = function() {};
130
131
132 /** @type {string} */
133 chrome.runtime.Manifest.prototype.name;
134
135
136 /** @type {string} */
137 chrome.runtime.Manifest.prototype.version;
138
139
140 /** @type {number|undefined} */
141 chrome.runtime.Manifest.prototype.manifest_version;
142
143
144 /** @type {string|undefined} */
145 chrome.runtime.Manifest.prototype.description;
146
147
148 /** @type {!chrome.runtime.Manifest.Oauth2|undefined} */
149 chrome.runtime.Manifest.prototype.oauth2;
150
151
152
153 /**
154  * Oauth2 info in the manifest.
155  * See http://developer.chrome.com/apps/app_identity.html#update_manifest.
156  * @constructor
157  */
158 chrome.runtime.Manifest.Oauth2 = function() {};
159
160
161 /** @type {string} */
162 chrome.runtime.Manifest.Oauth2.prototype.client_id;
163
164 /**@type {!Array.<string>} */
165 chrome.runtime.Manifest.Oauth2.prototype.scopes;
166
167
168 /**
169  * http://developer.chrome.com/extensions/runtime.html#method-getManifest
170  * @return {!chrome.runtime.Manifest} The full manifest file of the app or
171  *     extension.
172  */
173 chrome.runtime.getManifest = function() {};
174
175
176 /**
177  * @param {string} path A path to a resource within an extension expressed
178  *     relative to it's install directory.
179  * @return {string} The fully-qualified URL to the resource.
180  */
181 chrome.runtime.getURL = function(path) {};
182
183 /**
184  * @param {string|!Object.<string>=} opt_extensionIdOrConnectInfo Either the
185  *     extensionId to connect to, in which case connectInfo params can be
186  *     passed in the next optional argument, or the connectInfo params.
187  * @param {!Object.<string>=} opt_connectInfo The connectInfo object,
188  *     if arg1 was the extensionId to connect to.
189  * @return {!Port} New port.
190  */
191 chrome.runtime.connect = function(
192     opt_extensionIdOrConnectInfo, opt_connectInfo) {};
193
194
195 /**
196  * @param {string|*} extensionIdOrMessage Either the extensionId to send the
197  *     message to, in which case the message is passed as the next arg, or the
198  *     message itself.
199  * @param {(*|Object|function(*): void)=} opt_messageOrOptsOrCallback
200  *     One of:
201  *     The message, if arg1 was the extensionId.
202  *     The options for message sending, if arg1 was the message and this
203  *     argument is not a function.
204  *     The callback, if arg1 was the message and this argument is a function.
205  * @param {(Object|function(*): void)=} opt_optsOrCallback
206  *     Either the options for message sending, if arg2 was the message,
207  *     or the callback.
208  * @param {function(*): void=} opt_callback The callback function which
209  *     takes a JSON response object sent by the handler of the request.
210  */
211 chrome.runtime.sendMessage = function(
212     extensionIdOrMessage, opt_messageOrOptsOrCallback, opt_optsOrCallback,
213     opt_callback) {};
214
215
216 /**
217  *
218  * @param {function(!Object)} callback
219  */
220 chrome.runtime.getPlatformInfo = function(callback) {};
221
222
223 /** @type {!chrome.runtime.PortEvent} */
224 chrome.runtime.onConnect;
225
226
227 /** @type {!chrome.runtime.PortEvent} */
228 chrome.runtime.onConnectExternal;
229
230
231 /** @type {!chrome.runtime.MessageSenderEvent} */
232 chrome.runtime.onMessage;
233
234
235 /** @type {!chrome.runtime.MessageSenderEvent} */
236 chrome.runtime.onMessageExternal;
237
238
239 /**
240  * Event whose listeners take a Port parameter.
241  * @constructor
242  */
243 chrome.runtime.PortEvent = function() {};
244
245
246 /**
247  * @param {function(!Port): void} callback Callback.
248  */
249 chrome.runtime.PortEvent.prototype.addListener = function(callback) {};
250
251
252 /**
253  * @param {function(!Port): void} callback Callback.
254  */
255 chrome.runtime.PortEvent.prototype.removeListener = function(callback) {};
256
257
258 /**
259  * @param {function(!Port): void} callback Callback.
260  * @return {boolean}
261  */
262 chrome.runtime.PortEvent.prototype.hasListener = function(callback) {};
263
264
265 /**
266  * @return {boolean}
267  */
268 chrome.runtime.PortEvent.prototype.hasListeners = function() {};
269
270
271
272 /**
273  * Event whose listeners take a MessageSender and additional parameters.
274  * @constructor
275  */
276 chrome.runtime.MessageSenderEvent = function() {};
277
278
279 /**
280  * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
281  *     callback Callback.
282  */
283 chrome.runtime.MessageSenderEvent.prototype.addListener = function(callback) {};
284
285
286 /**
287  * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
288  *     callback Callback.
289  */
290 chrome.runtime.MessageSenderEvent.prototype.removeListener = function(callback)
291     {};
292
293
294 /**
295  * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
296  *     callback Callback.
297  * @return {boolean}
298  */
299 chrome.runtime.MessageSenderEvent.prototype.hasListener = function(callback) {};
300
301
302 /**
303  * @return {boolean}
304  */
305 chrome.runtime.MessageSenderEvent.prototype.hasListeners = function() {};
306
307
308 /**
309  * @const
310  */
311 chrome.tabs = {};
312
313
314 /**
315  * @param {number?} windowId Window Id.
316  * @param {Object?} options parameters of image capture, such as the format of
317  *    the resulting image.
318  * @param {function(string): void} callback Callback function which accepts
319  *    the data URL string of a JPEG encoding of the visible area of the
320  *    captured tab. May be assigned to the 'src' property of an HTML Image
321  *    element for display.
322  */
323 chrome.tabs.captureVisibleTab = function(windowId, options, callback) {};
324
325
326 /**
327  * @param {number} tabId Tab Id.
328  * @param {Object.<string>=} opt_connectInfo Info Object.
329  */
330 chrome.tabs.connect = function(tabId, opt_connectInfo) {};
331
332
333 /**
334  * @param {Object} createProperties Info object.
335  * @param {function(Tab): void=} opt_callback The callback function.
336  */
337 chrome.tabs.create = function(createProperties, opt_callback) {};
338
339
340 /**
341  * @param {number?} tabId Tab id.
342  * @param {function(string): void} callback Callback function.
343  */
344 chrome.tabs.detectLanguage = function(tabId, callback) {};
345
346
347 /**
348  * @param {number?} tabId Tab id.
349  * @param {Object?} details An object which may have 'code', 'file',
350  *    or 'allFrames' keys.
351  * @param {function(): void=} opt_callback Callback function.
352  */
353 chrome.tabs.executeScript = function(tabId, details, opt_callback) {};
354
355
356 /**
357  * @param {number} tabId Tab id.
358  * @param {function(Tab): void} callback Callback.
359  */
360 chrome.tabs.get = function(tabId, callback) {};
361
362
363 /**
364  * Note: as of 2012-04-12, this function is no longer documented on
365  * the public web pages, but there are still existing usages
366  *
367  * @param {number?} windowId Window id.
368  * @param {function(Array.<Tab>): void} callback Callback.
369  */
370 chrome.tabs.getAllInWindow = function(windowId, callback) {};
371
372
373 /**
374  * @param {function(Tab): void} callback Callback.
375  */
376 chrome.tabs.getCurrent = function(callback) {};
377
378
379 /**
380  * Note: as of 2012-04-12, this function is no longer documented on
381  * the public web pages, but there are still existing usages.
382  *
383  * @param {number?} windowId Window id.
384  * @param {function(Tab): void} callback Callback.
385  */
386 chrome.tabs.getSelected = function(windowId, callback) {};
387
388
389 /**
390  * @param {Object.<string, (number|Array.<number>)>} highlightInfo
391  *     An object with 'windowId' (number) and 'tabs'
392  *     (number or array of numbers) keys.
393  * @param {function(Window): void} callback Callback function invoked
394  *    with each appropriate Window.
395  */
396 chrome.tabs.highlight = function(highlightInfo, callback) {};
397
398
399 /**
400  * @param {number?} tabId Tab id.
401  * @param {Object?} details An object which may have 'code', 'file',
402  *     or 'allFrames' keys.
403  * @param {function(): void=} opt_callback Callback function.
404  */
405 chrome.tabs.insertCSS = function(tabId, details, opt_callback) {};
406
407
408 /**
409  * @param {number} tabId Tab id.
410  * @param {Object.<string, number>} moveProperties An object with 'index'
411  *     and optional 'windowId' keys.
412  * @param {function(Tab): void=} opt_callback Callback.
413  */
414 chrome.tabs.move = function(tabId, moveProperties, opt_callback) {};
415
416
417 /**
418  * @param {Object.<string, (number|string)>} queryInfo An object which may have
419  *     'active', 'pinned', 'highlighted', 'status', 'title', 'url', 'windowId',
420  *     and 'windowType' keys.
421  * @param {function(Array.<Tab>): void=} opt_callback Callback.
422  * @return {!Array.<Tab>}
423  */
424 chrome.tabs.query = function(queryInfo, opt_callback) {};
425
426
427 /**
428  * @param {number=} opt_tabId Tab id.
429  * @param {Object.<string, boolean>=} opt_reloadProperties An object which
430  *   may have a 'bypassCache' key.
431  * @param {function(): void=} opt_callback The callback function invoked
432  *    after the tab has been reloaded.
433  */
434 chrome.tabs.reload = function(opt_tabId, opt_reloadProperties, opt_callback) {};
435
436
437 /**
438  * @param {number|Array.<number>} tabIds A tab ID or an array of tab IDs.
439  * @param {function(Tab): void=} opt_callback Callback.
440  */
441 chrome.tabs.remove = function(tabIds, opt_callback) {};
442
443
444 /**
445  * @param {number} tabId Tab id.
446  * @param {*} request The request value of any type.
447  * @param {function(*): void=} opt_callback The callback function which
448  *     takes a JSON response object sent by the handler of the request.
449  */
450 chrome.tabs.sendMessage = function(tabId, request, opt_callback) {};
451
452
453 /**
454  * @param {number} tabId Tab id.
455  * @param {*} request The request value of any type.
456  * @param {function(*): void=} opt_callback The callback function which
457  *     takes a JSON response object sent by the handler of the request.
458  */
459 chrome.tabs.sendRequest = function(tabId, request, opt_callback) {};
460
461
462 /**
463  * @param {number} tabId Tab id.
464  * @param {Object.<string, (string|boolean)>} updateProperties An object which
465  *     may have 'url' or 'selected' key.
466  * @param {function(Tab): void=} opt_callback Callback.
467  */
468 chrome.tabs.update = function(tabId, updateProperties, opt_callback) {};
469
470
471 /** @type {ChromeEvent} */
472 chrome.tabs.onActiveChanged;
473
474
475 /** @type {ChromeEvent} */
476 chrome.tabs.onActivated;
477
478
479 /** @type {ChromeEvent} */
480 chrome.tabs.onAttached;
481
482
483 /** @type {ChromeEvent} */
484 chrome.tabs.onCreated;
485
486
487 /** @type {ChromeEvent} */
488 chrome.tabs.onDetached;
489
490
491 /** @type {ChromeEvent} */
492 chrome.tabs.onHighlightChanged;
493
494
495 /** @type {ChromeEvent} */
496 chrome.tabs.onMoved;
497
498
499 /** @type {ChromeEvent} */
500 chrome.tabs.onRemoved;
501
502
503 /** @type {ChromeEvent} */
504 chrome.tabs.onUpdated;
505
506
507 /** @type {ChromeEvent} */
508 chrome.tabs.onReplaced;
509
510 /**
511  * @const
512  */
513 chrome.windows = {};
514
515
516 /**
517  * @param {Object=} opt_createData May have many keys to specify parameters.
518  *     Or the callback.
519  * @param {function(ChromeWindow): void=} opt_callback Callback.
520  */
521 chrome.windows.create = function(opt_createData, opt_callback) {};
522
523
524 /**
525  * @param {number} id Window id.
526  * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
527  * @param {function(!ChromeWindow): void=} opt_callback Callback when
528  *     opt_getInfo is an object.
529  */
530 chrome.windows.get = function(id, opt_getInfo, opt_callback) {};
531
532
533 /**
534  * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
535  * @param {function(!Array.<!ChromeWindow>): void=} opt_callback Callback.
536  */
537 chrome.windows.getAll = function(opt_getInfo, opt_callback) {};
538
539
540 /**
541  * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
542  * @param {function(ChromeWindow): void=} opt_callback Callback.
543  */
544 chrome.windows.getCurrent = function(opt_getInfo, opt_callback) { };
545
546
547 /**
548  * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
549  * @param {function(ChromeWindow): void=} opt_callback Callback.
550  */
551 chrome.windows.getLastFocused = function(opt_getInfo, opt_callback) { };
552
553
554 /**
555  * @param {number} tabId Tab Id.
556  * @param {function(): void=} opt_callback Callback.
557  */
558 chrome.windows.remove = function(tabId, opt_callback) {};
559
560
561 /**
562  * @param {number} tabId Tab Id.
563  * @param {Object} updateProperties An object which may have many keys for
564  *     various options.
565  * @param {function(): void=} opt_callback Callback.
566  */
567 chrome.windows.update = function(tabId, updateProperties, opt_callback) {};
568
569
570 /** @type {ChromeEvent} */
571 chrome.windows.onCreated;
572
573
574 /** @type {ChromeEvent} */
575 chrome.windows.onFocusChanged;
576
577
578 /** @type {ChromeEvent} */
579 chrome.windows.onRemoved;
580
581
582 /**
583  * @type {number}
584  */
585 chrome.windows.WINDOW_ID_NONE;
586
587
588 /**
589  * @type {number}
590  */
591 chrome.windows.WINDOW_ID_CURRENT;
592
593
594 /**
595  * @const
596  */
597 chrome.i18n = {};
598
599
600 /**
601  * @param {function(Array.<string>): void} callback The callback function which
602  *     accepts an array of the accept languages of the browser, such as
603  *     'en-US','en','zh-CN'.
604  */
605 chrome.i18n.getAcceptLanguages = function(callback) {};
606
607
608 /**
609  * @param {string} messageName
610  * @param {(string|Array.<string>)=} opt_args
611  * @return {string}
612  */
613 chrome.i18n.getMessage = function(messageName, opt_args) {};
614
615
616 /**
617  * Chrome Text-to-Speech API.
618  * @const
619  */
620 chrome.tts = {};
621
622
623
624 /**
625  * An event from the TTS engine to communicate the status of an utterance.
626  * @constructor
627  */
628 function TtsEvent() {}
629
630
631 /** @type {string} */
632 TtsEvent.prototype.type;
633
634
635 /** @type {number} */
636 TtsEvent.prototype.charIndex;
637
638
639 /** @type {string} */
640 TtsEvent.prototype.errorMessage;
641
642
643
644 /**
645  * A description of a voice available for speech synthesis.
646  * @constructor
647  */
648 function TtsVoice() {}
649
650
651 /** @type {string} */
652 TtsVoice.prototype.voiceName;
653
654
655 /** @type {string} */
656 TtsVoice.prototype.lang;
657
658
659 /** @type {string} */
660 TtsVoice.prototype.gender;
661
662
663 /** @type {string} */
664 TtsVoice.prototype.extensionId;
665
666
667 /** @type {Array.<string>} */
668 TtsVoice.prototype.eventTypes;
669
670
671 /**
672  * Gets an array of all available voices.
673  * @param {function(Array.<TtsVoice>)=} opt_callback An optional callback
674  *     function.
675  */
676 chrome.tts.getVoices = function(opt_callback) {};
677
678
679 /**
680  * Checks if the engine is currently speaking.
681  * @param {function(boolean)=} opt_callback The callback function.
682  */
683 chrome.tts.isSpeaking = function(opt_callback) {};
684
685
686 /**
687  * Speaks text using a text-to-speech engine.
688  * @param {string} utterance The text to speak, either plain text or a complete,
689  *     well-formed SSML document. Speech engines that do not support SSML will
690  *     strip away the tags and speak the text. The maximum length of the text is
691  *     32,768 characters.
692  * @param {Object=} opt_options The speech options.
693  * @param {function()=} opt_callback Called right away, before speech finishes.
694  */
695 chrome.tts.speak = function(utterance, opt_options, opt_callback) {};
696
697
698 /**
699  * Stops any current speech.
700  */
701 chrome.tts.stop = function() {};
702
703
704 /**
705  * @const
706  */
707 chrome.history = {};
708
709
710 /**
711  * @param {Object.<string, string>} details Object with a 'url' key.
712  */
713 chrome.history.addUrl = function(details) {};
714
715
716 /**
717  * @param {function(): void} callback Callback function.
718  */
719 chrome.history.deleteAll = function(callback) {};
720
721
722 /**
723  * @param {Object.<string, string>} range Object with 'startTime'
724  *     and 'endTime' keys.
725  * @param {function(): void} callback Callback function.
726  */
727 chrome.history.deleteRange = function(range, callback) {};
728
729
730 /**
731  * @param {Object.<string, string>} details Object with a 'url' key.
732  */
733 chrome.history.deleteUrl = function(details) {};
734
735
736 /**
737  * @param {Object.<string, string>} details Object with a 'url' key.
738  * @param {function(!Array.<!VisitItem>): void} callback Callback function.
739  * @return {!Array.<!VisitItem>}
740  */
741 chrome.history.getVisits = function(details, callback) {};
742
743
744 /**
745  * @param {Object.<string, string>} query Object with a 'text' (string)
746  *     key and optional 'startTime' (number), 'endTime' (number) and
747  *     'maxResults' keys.
748  * @param {function(!Array.<!HistoryItem>): void} callback Callback function.
749  * @return {!Array.<!HistoryItem>}
750  */
751 chrome.history.search = function(query, callback) {};
752
753
754 /** @type {ChromeEvent} */
755 chrome.history.onVisitRemoved;
756
757
758 /** @type {ChromeEvent} */
759 chrome.history.onVisited;
760
761
762 /**
763  * @const
764  */
765 chrome.permissions = {};
766
767
768 /**
769  * @typedef {{
770  *   permissions: (Array.<string>|undefined),
771  *   origins: (Array.<string>|undefined)
772  * }}
773 * @see http://developer.chrome.com/extensions/permissions.html#type-Permissions
774 */
775 chrome.permissions.Permissions;
776
777
778 /**
779  * @param {!chrome.permissions.Permissions} permissions
780  * @param {function(boolean): void} callback Callback function.
781  */
782 chrome.permissions.contains = function(permissions, callback) {};
783
784
785 /**
786  * @param {function(!chrome.permissions.Permissions): void} callback
787  *     Callback function.
788  */
789 chrome.permissions.getAll = function(callback) {};
790
791
792 /**
793  * @param {!chrome.permissions.Permissions} permissions
794  * @param {function(boolean): void=} opt_callback Callback function.
795  */
796 chrome.permissions.remove = function(permissions, opt_callback) {};
797
798
799 /**
800  * @param {!chrome.permissions.Permissions} permissions
801  * @param {function(boolean): void=} opt_callback Callback function.
802  */
803 chrome.permissions.request = function(permissions, opt_callback) {};
804
805
806 /** @type {!ChromeEvent} */
807 chrome.permissions.onAdded;
808
809
810 /** @type {!ChromeEvent} */
811 chrome.permissions.onRemoved;
812
813
814 /**
815  */
816 chrome.power = {};
817
818
819 /**
820  * @param {string} level A string describing the degree to which power
821  *     management should be disabled, should be either "system" or "display".
822  */
823 chrome.power.requestKeepAwake = function(level) {};
824
825
826 /**
827  * Releases a request previously made via requestKeepAwake().
828  */
829 chrome.power.releaseKeepAwake = function() {};
830
831
832 /**
833  * @constructor
834  */
835 function Tab() {}
836
837
838 /** @type {number} */
839 Tab.prototype.id;
840
841
842 /** @type {number} */
843 Tab.prototype.index;
844
845
846 /** @type {number} */
847 Tab.prototype.windowId;
848
849
850 /** @type {number} */
851 Tab.prototype.openerTabId;
852
853
854 /** @type {boolean} */
855 Tab.prototype.highlighted;
856
857
858 /** @type {boolean} */
859 Tab.prototype.active;
860
861
862 /** @type {boolean} */
863 Tab.prototype.pinned;
864
865
866 /** @type {string} */
867 Tab.prototype.url;
868
869
870 /** @type {string} */
871 Tab.prototype.title;
872
873
874 /** @type {string} */
875 Tab.prototype.favIconUrl;
876
877
878 /** @type {string} */
879 Tab.prototype.status;
880
881
882 /** @type {boolean} */
883 Tab.prototype.incognito;
884
885
886
887 /**
888  * @constructor
889  */
890 function ChromeWindow() {}
891
892
893 /** @type {number} */
894 ChromeWindow.prototype.id;
895
896
897 /** @type {boolean} */
898 ChromeWindow.prototype.focused;
899
900
901 /** @type {number} */
902 ChromeWindow.prototype.top;
903
904
905 /** @type {number} */
906 ChromeWindow.prototype.left;
907
908
909 /** @type {number} */
910 ChromeWindow.prototype.width;
911
912
913 /** @type {number} */
914 ChromeWindow.prototype.height;
915
916
917 /** @type {Array.<Tab>} */
918 ChromeWindow.prototype.tabs;
919
920
921 /** @type {boolean} */
922 ChromeWindow.prototype.incognito;
923
924
925 /** @type {string} */
926 ChromeWindow.prototype.type;
927
928
929 /** @type {string} */
930 ChromeWindow.prototype.state;
931
932
933 /** @type {boolean} */
934 ChromeWindow.prototype.alwaysOnTop;
935
936
937
938 /**
939  * @constructor
940  */
941 function ChromeEvent() {}
942
943
944 /** @param {Function} callback */
945 ChromeEvent.prototype.addListener = function(callback) {};
946
947
948 /** @param {Function} callback */
949 ChromeEvent.prototype.removeListener = function(callback) {};
950
951
952 /**
953  * @param {Function} callback
954  * @return {boolean}
955  */
956 ChromeEvent.prototype.hasListener = function(callback) {};
957
958
959 /** @return {boolean} */
960 ChromeEvent.prototype.hasListeners = function(callback) {};
961
962
963 /**
964  * @constructor
965  */
966 function Port() {}
967
968
969 /** @type {string} */
970 Port.prototype.name;
971
972
973 /** @type {ChromeEvent} */
974 Port.prototype.onDisconnect;
975
976
977 /** @type {ChromeEvent} */
978 Port.prototype.onMessage;
979
980
981 /** @type {MessageSender} */
982 Port.prototype.sender;
983
984
985 /**
986  * @param {Object.<string>} obj Message object.
987  */
988 Port.prototype.postMessage = function(obj) {};
989
990
991 /**
992  * Note: as of 2012-04-12, this function is no longer documented on
993  * the public web pages, but there are still existing usages.
994  */
995 Port.prototype.disconnect = function() {};
996
997
998
999 /**
1000  * @constructor
1001  */
1002 function MessageSender() {}
1003
1004
1005 /** @type {!Tab|undefined} */
1006 MessageSender.prototype.tab;
1007
1008
1009 /** @type {string|undefined} */
1010 MessageSender.prototype.id;
1011
1012
1013 /** @type {string|undefined} */
1014 MessageSender.prototype.url;
1015
1016
1017 /** @type {string|undefined} */
1018 MessageSender.prototype.tlsChannelId;
1019
1020
1021
1022 /**
1023  * @constructor
1024  */
1025 function BookmarkTreeNode() {}
1026
1027
1028 /** @type {string} */
1029 BookmarkTreeNode.prototype.id;
1030
1031
1032 /** @type {string} */
1033 BookmarkTreeNode.prototype.parentId;
1034
1035
1036 /** @type {number} */
1037 BookmarkTreeNode.prototype.index;
1038
1039
1040 /** @type {string} */
1041 BookmarkTreeNode.prototype.url;
1042
1043
1044 /** @type {string} */
1045 BookmarkTreeNode.prototype.title;
1046
1047
1048 /** @type {number} */
1049 BookmarkTreeNode.prototype.dateAdded;
1050
1051
1052 /** @type {number} */
1053 BookmarkTreeNode.prototype.dateGroupModified;
1054
1055
1056 /** @type {Array.<BookmarkTreeNode>} */
1057 BookmarkTreeNode.prototype.children;
1058
1059
1060
1061 /**
1062  * @constructor
1063  */
1064 function Cookie() {}
1065
1066
1067 /** @type {string} */
1068 Cookie.prototype.name;
1069
1070
1071 /** @type {string} */
1072 Cookie.prototype.value;
1073
1074
1075 /** @type {string} */
1076 Cookie.prototype.domain;
1077
1078
1079 /** @type {boolean} */
1080 Cookie.prototype.hostOnly;
1081
1082
1083 /** @type {string} */
1084 Cookie.prototype.path;
1085
1086
1087 /** @type {boolean} */
1088 Cookie.prototype.secure;
1089
1090
1091 /** @type {boolean} */
1092 Cookie.prototype.httpOnly;
1093
1094
1095 /** @type {boolean} */
1096 Cookie.prototype.session;
1097
1098
1099 /** @type {number} */
1100 Cookie.prototype.expirationDate;
1101
1102
1103 /** @type {string} */
1104 Cookie.prototype.storeId;
1105
1106
1107
1108 /**
1109  * @constructor
1110  */
1111 function Debuggee() {}
1112
1113
1114 /** @type {number} */
1115 Debuggee.prototype.tabId;
1116
1117
1118 /**
1119  * @constructor
1120  */
1121 function HistoryItem() {}
1122
1123
1124 /** @type {string} */
1125 HistoryItem.prototype.id;
1126
1127
1128 /** @type {string} */
1129 HistoryItem.prototype.url;
1130
1131
1132 /** @type {string} */
1133 HistoryItem.prototype.title;
1134
1135
1136 /** @type {number} */
1137 HistoryItem.prototype.lastVisitTime;
1138
1139
1140 /** @type {number} */
1141 HistoryItem.prototype.visitCount;
1142
1143
1144 /** @type {number} */
1145 HistoryItem.prototype.typedCount;
1146
1147
1148
1149 /**
1150  * @constructor
1151  */
1152 function VisitItem() {}
1153
1154
1155 /** @type {string} */
1156 VisitItem.prototype.id;
1157
1158
1159 /** @type {string} */
1160 VisitItem.prototype.visitId;
1161
1162
1163 /** @type {number} */
1164 VisitItem.prototype.visitTime;
1165
1166
1167 /** @type {string} */
1168 VisitItem.prototype.referringVisitId;
1169
1170
1171 /** @type {string} */
1172 VisitItem.prototype.transition;
1173
1174
1175 /**
1176  * @const
1177  */
1178 chrome.storage = {};
1179
1180
1181 /**
1182  * @const
1183  */
1184 chrome.storage.local = {};
1185
1186
1187 /**
1188  * @param {string|!Object|null} keys
1189  * @param {function(Object, string)} callback
1190  */
1191 chrome.storage.local.get = function(keys, callback) {};
1192
1193
1194 /**
1195  * @param {Object} items
1196  * @param {function()=} opt_callback
1197  */
1198 chrome.storage.local.set = function(items, opt_callback) {};
1199
1200
1201 /**
1202  * @param {string|!Object|null} keys
1203  * @param {function()=} opt_callback
1204  */
1205 chrome.storage.local.remove = function(keys, opt_callback) {};
1206
1207
1208 /**
1209  * @type {ChromeEvent}
1210  */
1211 chrome.storage.onChanged;