2 * Copyright 2013 The Closure Compiler Authors
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @fileoverview Definitions for globals in Chrome. This file describes the
19 * externs API for the chrome.* object when running in a normal browser
20 * context. For APIs available in Chrome Extensions, see chrome_extensions.js
35 * Returns an object representing current load times. Note that the properties
36 * on the object do not change and the function must be called again to get
39 * @see http://goto.google.com/chromeloadtimesextension
41 * @return {!ChromeLoadTimes}
43 chrome.loadTimes = function() {};
48 * The data object given by chrome.loadTimes().
51 function ChromeLoadTimes() {}
55 ChromeLoadTimes.prototype.requestTime;
59 ChromeLoadTimes.prototype.startLoadTime;
63 ChromeLoadTimes.prototype.commitLoadTime;
67 ChromeLoadTimes.prototype.finishDocumentLoadTime;
71 ChromeLoadTimes.prototype.finishLoadTime;
75 ChromeLoadTimes.prototype.firstPaintTime;
79 ChromeLoadTimes.prototype.firstPaintAfterLoadTime;
83 ChromeLoadTimes.prototype.navigationType;
87 * True iff the resource was fetched over SPDY.
90 ChromeLoadTimes.prototype.wasFetchedViaSpdy;
93 /** @type {boolean} */
94 ChromeLoadTimes.prototype.wasNpnNegotiated;
98 ChromeLoadTimes.prototype.npnNegotiatedProtocol;
101 /** @type {boolean} */
102 ChromeLoadTimes.prototype.wasAlternateProtocolAvailable;
105 /** @type {string} */
106 ChromeLoadTimes.prototype.connectionInfo;
110 * Returns an object containing timing information.
111 * @return {!ChromeCsiInfo}
113 chrome.csi = function() {};
118 * The data object given by chrome.csi().
121 function ChromeCsiInfo() {}
125 * Same as chrome.loadTimes().requestTime, if defined.
126 * Otherwise, gives the same value as chrome.loadTimes().startLoadTime.
127 * In milliseconds, truncated.
130 ChromeCsiInfo.prototype.startE;
134 * Same as chrome.loadTimes().finishDocumentLoadTime but in milliseconds and
138 ChromeCsiInfo.prototype.onloadT;
142 * The time since startE in milliseconds.
145 ChromeCsiInfo.prototype.pageT;
148 /** @type {number} */
149 ChromeCsiInfo.prototype.tran;
153 * @param {string|!ArrayBuffer|!Object} message
154 * @see https://developers.google.com/native-client/devguide/tutorial
156 HTMLEmbedElement.prototype.postMessage = function(message) {};