Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: chrome/common/extensions/api/webview_tag.json

Issue 2973903002: [Extensions Bindings] Introduce a supportsLazyListeners property (Closed)
Patch Set: onMessage event fix Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 [ 5 [
6 { 6 {
7 "namespace": "webviewTag", 7 "namespace": "webviewTag",
8 "description": "Use the <code>webview</code> tag to actively load live conte nt from the web over the network and embed it in your Chrome App. Your app can c ontrol the appearance of the <code>webview</code> and interact with the web cont ent, initiate navigations in an embedded web page, react to error events that ha ppen within it, and more (see <a href=\"#usage\">Usage</a>).", 8 "description": "Use the <code>webview</code> tag to actively load live conte nt from the web over the network and embed it in your Chrome App. Your app can c ontrol the appearance of the <code>webview</code> and interact with the web cont ent, initiate navigations in an embedded web page, react to error events that ha ppen within it, and more (see <a href=\"#usage\">Usage</a>).",
9 "documentation_options": { 9 "documentation_options": {
10 "title": "<webview> Tag", 10 "title": "<webview> Tag",
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 { 1076 {
1077 "name": "terminate", 1077 "name": "terminate",
1078 "type": "function", 1078 "type": "function",
1079 "description": "Forcibly kills the guest web page's renderer process. Th is may affect multiple <code>webview</code> tags in the current app if they shar e the same process, but it will not affect <code>webview</code> tags in other ap ps.", 1079 "description": "Forcibly kills the guest web page's renderer process. Th is may affect multiple <code>webview</code> tags in the current app if they shar e the same process, but it will not affect <code>webview</code> tags in other ap ps.",
1080 "parameters": [] 1080 "parameters": []
1081 } 1081 }
1082 ], 1082 ],
1083 "events": [ 1083 "events": [
1084 { 1084 {
1085 "name": "close", 1085 "name": "close",
1086 "options": { "supportsDom": true }, 1086 "options": { "supportsDom": true, "supportsLazyListeners": false },
1087 "description": "Fired when the guest window attempts to close itself.<p> The following example code navigates the <code>webview</code> to <code>about:bla nk</code> when the guest attempts to close itself.</p><pre>webview.addEventListe ner('close', function() {\r webview.src = 'about:blank';\r});</pre>", 1087 "description": "Fired when the guest window attempts to close itself.<p> The following example code navigates the <code>webview</code> to <code>about:bla nk</code> when the guest attempts to close itself.</p><pre>webview.addEventListe ner('close', function() {\r webview.src = 'about:blank';\r});</pre>",
1088 "parameters": [] 1088 "parameters": []
1089 }, 1089 },
1090 { 1090 {
1091 "name": "consolemessage", 1091 "name": "consolemessage",
1092 "options": { "supportsDom": true }, 1092 "options": { "supportsDom": true, "supportsLazyListeners": false },
1093 "description": "Fired when the guest window logs a console message.<p>Th e following example code forwards all log messages to the embedder's console wit hout regard for log level or other properties.</p><pre>webview.addEventListener( 'consolemessage', function(e) {\r console.log('Guest page logged a message: ', e.message);\r});</pre>", 1093 "description": "Fired when the guest window logs a console message.<p>Th e following example code forwards all log messages to the embedder's console wit hout regard for log level or other properties.</p><pre>webview.addEventListener( 'consolemessage', function(e) {\r console.log('Guest page logged a message: ', e.message);\r});</pre>",
1094 "parameters": [ 1094 "parameters": [
1095 { 1095 {
1096 "name": "level", 1096 "name": "level",
1097 "description": "The severity level of the log message. Ranges from - 1 to 2. LOG_VERBOSE (console.debug) = -1, LOG_INFO (console.log, console.info) = 0, LOG_WARNING (console.warn) = 1, LOG_ERROR (console.error) = 2.", 1097 "description": "The severity level of the log message. Ranges from - 1 to 2. LOG_VERBOSE (console.debug) = -1, LOG_INFO (console.log, console.info) = 0, LOG_WARNING (console.warn) = 1, LOG_ERROR (console.error) = 2.",
1098 "type": "integer" 1098 "type": "integer"
1099 }, 1099 },
1100 { 1100 {
1101 "name": "message", 1101 "name": "message",
1102 "description": "The logged message contents.", 1102 "description": "The logged message contents.",
1103 "type": "string" 1103 "type": "string"
1104 }, 1104 },
1105 { 1105 {
1106 "name": "line", 1106 "name": "line",
1107 "description": "The line number of the message source.", 1107 "description": "The line number of the message source.",
1108 "type": "integer" 1108 "type": "integer"
1109 }, 1109 },
1110 { 1110 {
1111 "name": "sourceId", 1111 "name": "sourceId",
1112 "description": "A string identifying the resource which logged the m essage.", 1112 "description": "A string identifying the resource which logged the m essage.",
1113 "type": "string" 1113 "type": "string"
1114 } 1114 }
1115 ] 1115 ]
1116 }, 1116 },
1117 { 1117 {
1118 "name": "contentload", 1118 "name": "contentload",
1119 "options": { "supportsDom": true }, 1119 "options": { "supportsDom": true, "supportsLazyListeners": false},
1120 "description": "Fired when the guest window fires a <code>load</code> ev ent, i.e., when a new document is loaded. This does <em>not</em> include page na vigation within the current document or asynchronous resource loads. <p>The foll owing example code modifies the default font size of the guest's <code>body</cod e> element after the page loads:</p><pre>webview.addEventListener('contentload', function() {\r webview.executeScript({ code: 'document.body.style.fontSize = \ "42px\"' });\r});</pre>", 1120 "description": "Fired when the guest window fires a <code>load</code> ev ent, i.e., when a new document is loaded. This does <em>not</em> include page na vigation within the current document or asynchronous resource loads. <p>The foll owing example code modifies the default font size of the guest's <code>body</cod e> element after the page loads:</p><pre>webview.addEventListener('contentload', function() {\r webview.executeScript({ code: 'document.body.style.fontSize = \ "42px\"' });\r});</pre>",
1121 "parameters": [] 1121 "parameters": []
1122 }, 1122 },
1123 { 1123 {
1124 "name": "dialog", 1124 "name": "dialog",
1125 "options": { "supportsDom": true }, 1125 "options": { "supportsDom": true, "supportsLazyListeners": false },
1126 "description": "Fired when the guest window attempts to open a modal dia log via <code>window.alert</code>, <code>window.confirm</code>, or <code>window. prompt</code>.<p>Handling this event will block the guest process until each eve nt listener returns or the <code>dialog</code> object becomes unreachable (if <c ode>preventDefault()</code> was called.)</p><p>The default behavior is to cancel the dialog.</p>", 1126 "description": "Fired when the guest window attempts to open a modal dia log via <code>window.alert</code>, <code>window.confirm</code>, or <code>window. prompt</code>.<p>Handling this event will block the guest process until each eve nt listener returns or the <code>dialog</code> object becomes unreachable (if <c ode>preventDefault()</code> was called.)</p><p>The default behavior is to cancel the dialog.</p>",
1127 "parameters": [ 1127 "parameters": [
1128 { 1128 {
1129 "name": "messageType", 1129 "name": "messageType",
1130 "type": "string", 1130 "type": "string",
1131 "enum": ["alert", "confirm", "prompt"], 1131 "enum": ["alert", "confirm", "prompt"],
1132 "description": "The type of modal dialog requested by the guest." 1132 "description": "The type of modal dialog requested by the guest."
1133 }, 1133 },
1134 { 1134 {
1135 "name": "messageText", 1135 "name": "messageText",
1136 "type": "string", 1136 "type": "string",
1137 "description": "The text the guest attempted to display in the modal dialog." 1137 "description": "The text the guest attempted to display in the modal dialog."
1138 }, 1138 },
1139 { 1139 {
1140 "name": "dialog", 1140 "name": "dialog",
1141 "$ref": "DialogController", 1141 "$ref": "DialogController",
1142 "description": "An interface that can be used to respond to the gues t's modal request." 1142 "description": "An interface that can be used to respond to the gues t's modal request."
1143 } 1143 }
1144 ] 1144 ]
1145 }, 1145 },
1146 { 1146 {
1147 "name": "exit", 1147 "name": "exit",
1148 "options": { "supportsDom": true }, 1148 "options": { "supportsDom": true, "supportsLazyListeners": false },
1149 "description": "Fired when the process rendering the guest web content h as exited.<p>The following example code will show a farewell message whenever th e guest page crashes:</p><pre>webview.addEventListener('exit', function(e) {\r if (e.reason === 'crash') {\r webview.src = 'data:text/plain,Goodbye, world!' ;\r }\r});</pre>", 1149 "description": "Fired when the process rendering the guest web content h as exited.<p>The following example code will show a farewell message whenever th e guest page crashes:</p><pre>webview.addEventListener('exit', function(e) {\r if (e.reason === 'crash') {\r webview.src = 'data:text/plain,Goodbye, world!' ;\r }\r});</pre>",
1150 "parameters": [ 1150 "parameters": [
1151 { 1151 {
1152 "name": "processID", 1152 "name": "processID",
1153 "description": "Chrome's internal ID of the process that exited.", 1153 "description": "Chrome's internal ID of the process that exited.",
1154 "type": "integer" 1154 "type": "integer"
1155 }, 1155 },
1156 { 1156 {
1157 "name": "reason", 1157 "name": "reason",
1158 "description": "String indicating the reason for the exit.", 1158 "description": "String indicating the reason for the exit.",
1159 "type": "string", 1159 "type": "string",
1160 "enum": ["normal", "abnormal", "crash", "kill"] 1160 "enum": ["normal", "abnormal", "crash", "kill"]
1161 } 1161 }
1162 ] 1162 ]
1163 }, 1163 },
1164 { 1164 {
1165 "name": "findupdate", 1165 "name": "findupdate",
1166 "options": { "supportsDom": true }, 1166 "options": { "supportsDom": true, "supportsLazyListeners": false },
1167 "description": "Fired when new find results are available for an active find request. This might happen multiple times for a single find request as matc hes are found.", 1167 "description": "Fired when new find results are available for an active find request. This might happen multiple times for a single find request as matc hes are found.",
1168 "parameters": [ 1168 "parameters": [
1169 { 1169 {
1170 "name": "searchText", 1170 "name": "searchText",
1171 "type": "string", 1171 "type": "string",
1172 "description": "The string that is being searched for in the page." 1172 "description": "The string that is being searched for in the page."
1173 }, 1173 },
1174 { 1174 {
1175 "name": "numberOfMatches", 1175 "name": "numberOfMatches",
1176 "type": "integer", 1176 "type": "integer",
(...skipping 16 matching lines...) Expand all
1193 }, 1193 },
1194 { 1194 {
1195 "name": "finalUpdate", 1195 "name": "finalUpdate",
1196 "type": "string", 1196 "type": "string",
1197 "description": "Indicates that all find requests have completed and that no more <code>findupdate</code> events will be fired until more find reques ts are made." 1197 "description": "Indicates that all find requests have completed and that no more <code>findupdate</code> events will be fired until more find reques ts are made."
1198 } 1198 }
1199 ] 1199 ]
1200 }, 1200 },
1201 { 1201 {
1202 "name": "loadabort", 1202 "name": "loadabort",
1203 "options": { "supportsDom": true }, 1203 "options": { "supportsDom": true, "supportsLazyListeners": false },
1204 "description": "Fired when a top-level load has aborted without committi ng. An error message will be printed to the console unless the event is default- prevented. <p class=\"note\"><strong>Note:</strong> When a resource load is abor ted, a <code>loadabort</code> event will eventually be followed by a <code>loads top</code> event, even if all committed loads since the last <code>loadstop</cod e> event (if any) were aborted.</p><p class=\"note\"><strong>Note:</strong> When the load of either an about URL or a JavaScript URL is aborted, <code>loadabort </code> will be fired and then the <code>webview</code> will be navigated to 'ab out:blank'.</p>", 1204 "description": "Fired when a top-level load has aborted without committi ng. An error message will be printed to the console unless the event is default- prevented. <p class=\"note\"><strong>Note:</strong> When a resource load is abor ted, a <code>loadabort</code> event will eventually be followed by a <code>loads top</code> event, even if all committed loads since the last <code>loadstop</cod e> event (if any) were aborted.</p><p class=\"note\"><strong>Note:</strong> When the load of either an about URL or a JavaScript URL is aborted, <code>loadabort </code> will be fired and then the <code>webview</code> will be navigated to 'ab out:blank'.</p>",
1205 "parameters": [ 1205 "parameters": [
1206 { 1206 {
1207 "name": "url", 1207 "name": "url",
1208 "description": "Requested URL.", 1208 "description": "Requested URL.",
1209 "type": "string" 1209 "type": "string"
1210 }, 1210 },
1211 { 1211 {
1212 "name": "isTopLevel", 1212 "name": "isTopLevel",
1213 "description": "Whether the load was top-level or in a subframe.", 1213 "description": "Whether the load was top-level or in a subframe.",
1214 "type": "boolean" 1214 "type": "boolean"
1215 }, 1215 },
1216 { 1216 {
1217 "name": "code", 1217 "name": "code",
1218 "description": "Unique integer ID for the type of abort. Note that t his ID is <em>not</em> guaranteed to remain backwards compatible between release s. You must not act based upon this specific integer.", 1218 "description": "Unique integer ID for the type of abort. Note that t his ID is <em>not</em> guaranteed to remain backwards compatible between release s. You must not act based upon this specific integer.",
1219 "type": "integer" 1219 "type": "integer"
1220 }, 1220 },
1221 { 1221 {
1222 "name": "reason", 1222 "name": "reason",
1223 "description": "String indicating what type of abort occurred. This string is <em>not</em> guaranteed to remain backwards compatible between release s. You must not parse and act based upon its content. It is also possible that, in some cases, an error not listed here could be reported.", 1223 "description": "String indicating what type of abort occurred. This string is <em>not</em> guaranteed to remain backwards compatible between release s. You must not parse and act based upon its content. It is also possible that, in some cases, an error not listed here could be reported.",
1224 "type": "string", 1224 "type": "string",
1225 "enum": ["ERR_ABORTED", "ERR_INVALID_URL", "ERR_DISALLOWED_URL_SCHEM E", "ERR_BLOCKED_BY_CLIENT", "ERR_ADDRESS_UNREACHABLE", "ERR_EMPTY_RESPONSE", "E RR_FILE_NOT_FOUND", "ERR_UNKNOWN_URL_SCHEME"] 1225 "enum": ["ERR_ABORTED", "ERR_INVALID_URL", "ERR_DISALLOWED_URL_SCHEM E", "ERR_BLOCKED_BY_CLIENT", "ERR_ADDRESS_UNREACHABLE", "ERR_EMPTY_RESPONSE", "E RR_FILE_NOT_FOUND", "ERR_UNKNOWN_URL_SCHEME"]
1226 } 1226 }
1227 ] 1227 ]
1228 }, 1228 },
1229 { 1229 {
1230 "name": "loadcommit", 1230 "name": "loadcommit",
1231 "options": { "supportsDom": true }, 1231 "options": { "supportsDom": true, "supportsLazyListeners": false },
1232 "description": "Fired when a load has committed. This includes navigatio n within the current document as well as subframe document-level loads, but does <em>not</em> include asynchronous resource loads.", 1232 "description": "Fired when a load has committed. This includes navigatio n within the current document as well as subframe document-level loads, but does <em>not</em> include asynchronous resource loads.",
1233 "parameters": [ 1233 "parameters": [
1234 { 1234 {
1235 "name": "url", 1235 "name": "url",
1236 "description": "The URL that committed.", 1236 "description": "The URL that committed.",
1237 "type": "string" 1237 "type": "string"
1238 }, 1238 },
1239 { 1239 {
1240 "name": "isTopLevel", 1240 "name": "isTopLevel",
1241 "description": "Whether the load is top-level or in a subframe.", 1241 "description": "Whether the load is top-level or in a subframe.",
1242 "type": "boolean" 1242 "type": "boolean"
1243 } 1243 }
1244 ] 1244 ]
1245 }, 1245 },
1246 { 1246 {
1247 "name": "loadredirect", 1247 "name": "loadredirect",
1248 "options": { "supportsDom": true }, 1248 "options": { "supportsDom": true, "supportsLazyListeners": false },
1249 "description": "Fired when a top-level load request has redirected to a different URL.", 1249 "description": "Fired when a top-level load request has redirected to a different URL.",
1250 "parameters": [ 1250 "parameters": [
1251 { 1251 {
1252 "name": "oldUrl", 1252 "name": "oldUrl",
1253 "description": "The requested URL before the redirect.", 1253 "description": "The requested URL before the redirect.",
1254 "type": "string" 1254 "type": "string"
1255 }, 1255 },
1256 { 1256 {
1257 "name": "newUrl", 1257 "name": "newUrl",
1258 "description": "The new URL after the redirect.", 1258 "description": "The new URL after the redirect.",
1259 "type": "string" 1259 "type": "string"
1260 }, 1260 },
1261 { 1261 {
1262 "name": "isTopLevel", 1262 "name": "isTopLevel",
1263 "description": "Whether or not the redirect happened at top-level or in a subframe.", 1263 "description": "Whether or not the redirect happened at top-level or in a subframe.",
1264 "type": "boolean" 1264 "type": "boolean"
1265 } 1265 }
1266 ] 1266 ]
1267 }, 1267 },
1268 { 1268 {
1269 "name": "loadstart", 1269 "name": "loadstart",
1270 "options": { "supportsDom": true }, 1270 "options": { "supportsDom": true, "supportsLazyListeners": false },
1271 "description": "Fired when a load has begun.", 1271 "description": "Fired when a load has begun.",
1272 "parameters": [ 1272 "parameters": [
1273 { 1273 {
1274 "name": "url", 1274 "name": "url",
1275 "description": "Requested URL.", 1275 "description": "Requested URL.",
1276 "type": "string" 1276 "type": "string"
1277 }, 1277 },
1278 { 1278 {
1279 "name": "isTopLevel", 1279 "name": "isTopLevel",
1280 "description": "Whether the load is top-level or in a subframe.", 1280 "description": "Whether the load is top-level or in a subframe.",
1281 "type": "boolean" 1281 "type": "boolean"
1282 } 1282 }
1283 ] 1283 ]
1284 }, 1284 },
1285 { 1285 {
1286 "name": "loadstop", 1286 "name": "loadstop",
1287 "options": { "supportsDom": true }, 1287 "options": { "supportsDom": true, "supportsLazyListeners": false },
1288 "description": "Fired when all frame-level loads in a guest page (includ ing all its subframes) have completed. This includes navigation within the curre nt document as well as subframe document-level loads, but does <em>not</em> incl ude asynchronous resource loads. This event fires every time the number of docum ent-level loads transitions from one (or more) to zero. For example, if a page t hat has already finished loading (i.e., <code>loadstop</code> already fired once ) creates a new iframe which loads a page, then a second <code>loadstop</code> w ill fire when the iframe page load completes. This pattern is commonly observed on pages that load ads. <p class=\"note\"><strong>Note:</strong> When a committe d load is aborted, a <code>loadstop</code> event will eventually follow a <code> loadabort</code> event, even if all committed loads since the last <code>loadsto p</code> event (if any) were aborted.</p>", 1288 "description": "Fired when all frame-level loads in a guest page (includ ing all its subframes) have completed. This includes navigation within the curre nt document as well as subframe document-level loads, but does <em>not</em> incl ude asynchronous resource loads. This event fires every time the number of docum ent-level loads transitions from one (or more) to zero. For example, if a page t hat has already finished loading (i.e., <code>loadstop</code> already fired once ) creates a new iframe which loads a page, then a second <code>loadstop</code> w ill fire when the iframe page load completes. This pattern is commonly observed on pages that load ads. <p class=\"note\"><strong>Note:</strong> When a committe d load is aborted, a <code>loadstop</code> event will eventually follow a <code> loadabort</code> event, even if all committed loads since the last <code>loadsto p</code> event (if any) were aborted.</p>",
1289 "parameters": [] 1289 "parameters": []
1290 }, 1290 },
1291 { 1291 {
1292 "name": "newwindow", 1292 "name": "newwindow",
1293 "options": { "supportsDom": true }, 1293 "options": { "supportsDom": true, "supportsLazyListeners": false },
1294 "description": "Fired when the guest page attempts to open a new browser window.<p>The following example code will create and navigate a new <code>webvi ew</code> in the embedder for each requested new window:</p><pre>webview.addEven tListener('newwindow', function(e) {\r var newWebview = document.createElement( 'webview');\r document.body.appendChild(newWebview);\r e.window.attach(newWebv iew);\r});</pre>", 1294 "description": "Fired when the guest page attempts to open a new browser window.<p>The following example code will create and navigate a new <code>webvi ew</code> in the embedder for each requested new window:</p><pre>webview.addEven tListener('newwindow', function(e) {\r var newWebview = document.createElement( 'webview');\r document.body.appendChild(newWebview);\r e.window.attach(newWebv iew);\r});</pre>",
1295 "parameters": [ 1295 "parameters": [
1296 { 1296 {
1297 "name": "window", 1297 "name": "window",
1298 "description": "An interface that can be used to either attach the r equested target page to an existing <code>webview</code> element or explicitly d iscard the request.", 1298 "description": "An interface that can be used to either attach the r equested target page to an existing <code>webview</code> element or explicitly d iscard the request.",
1299 "$ref": "NewWindow" 1299 "$ref": "NewWindow"
1300 }, 1300 },
1301 { 1301 {
1302 "name": "targetUrl", 1302 "name": "targetUrl",
1303 "description": "The target URL requested for the new window.", 1303 "description": "The target URL requested for the new window.",
(...skipping 17 matching lines...) Expand all
1321 { 1321 {
1322 "name": "windowOpenDisposition", 1322 "name": "windowOpenDisposition",
1323 "description": "The requested disposition of the new window.", 1323 "description": "The requested disposition of the new window.",
1324 "type": "string", 1324 "type": "string",
1325 "enum": ["ignore", "save_to_disk", "current_tab", "new_background_ta b", "new_foreground_tab", "new_window", "new_popup"] 1325 "enum": ["ignore", "save_to_disk", "current_tab", "new_background_ta b", "new_foreground_tab", "new_window", "new_popup"]
1326 } 1326 }
1327 ] 1327 ]
1328 }, 1328 },
1329 { 1329 {
1330 "name": "permissionrequest", 1330 "name": "permissionrequest",
1331 "options": { "supportsDom": true }, 1331 "options": { "supportsDom": true, "supportsLazyListeners": false },
1332 "description": "Fired when the guest page needs to request special permi ssion from the embedder.<p>The following example code will grant the guest page access to the <code>webkitGetUserMedia</code> API. Note that an app using this e xample code must itself specify <code>audioCapture</code> and/or <code>videoCapt ure</code> manifest permissions:</p><pre>webview.addEventListener('permissionreq uest', function(e) {\r if (e.permission === 'media') {\r e.request.allow();\ r }\r});</pre>", 1332 "description": "Fired when the guest page needs to request special permi ssion from the embedder.<p>The following example code will grant the guest page access to the <code>webkitGetUserMedia</code> API. Note that an app using this e xample code must itself specify <code>audioCapture</code> and/or <code>videoCapt ure</code> manifest permissions:</p><pre>webview.addEventListener('permissionreq uest', function(e) {\r if (e.permission === 'media') {\r e.request.allow();\ r }\r});</pre>",
1333 "parameters": [ 1333 "parameters": [
1334 { 1334 {
1335 "name": "permission", 1335 "name": "permission",
1336 "description": "The type of permission being requested.", 1336 "description": "The type of permission being requested.",
1337 "type": "string", 1337 "type": "string",
1338 "enum": ["media", "geolocation", "pointerLock", "download", "loadplu gin", "filesystem", "fullscreen"] 1338 "enum": ["media", "geolocation", "pointerLock", "download", "loadplu gin", "filesystem", "fullscreen"]
1339 }, 1339 },
1340 { 1340 {
1341 "name": "request", 1341 "name": "request",
1342 "type": "object", 1342 "type": "object",
1343 "properties": {}, 1343 "properties": {},
1344 "description": "An object which holds details of the requested permi ssion. Depending on the type of permission requested, this may be a $(ref:webvie wTag.MediaPermissionRequest), $(ref:webviewTag.GeolocationPermissionRequest), $( ref:webviewTag.PointerLockPermissionRequest), $(ref:webviewTag.DownloadPermissio nRequest), $(ref:webviewTag.LoadPluginPermissionRequest), or $(ref:webviewTag.Fu llscreenPermissionRequest)." 1344 "description": "An object which holds details of the requested permi ssion. Depending on the type of permission requested, this may be a $(ref:webvie wTag.MediaPermissionRequest), $(ref:webviewTag.GeolocationPermissionRequest), $( ref:webviewTag.PointerLockPermissionRequest), $(ref:webviewTag.DownloadPermissio nRequest), $(ref:webviewTag.LoadPluginPermissionRequest), or $(ref:webviewTag.Fu llscreenPermissionRequest)."
1345 } 1345 }
1346 ] 1346 ]
1347 }, 1347 },
1348 { 1348 {
1349 "name": "responsive", 1349 "name": "responsive",
1350 "options": { "supportsDom": true }, 1350 "options": { "supportsDom": true, "supportsLazyListeners": false },
1351 "description": "Fired when the process rendering the guest web content h as become responsive again after being unresponsive.<p>The following example cod e will fade the <code>webview</code> element in or out as it becomes responsive or unresponsive:</p><pre>webview.style.webkitTransition = 'opacity 250ms';\rwebv iew.addEventListener('unresponsive', function() {\r webview.style.opacity = '0. 5';\r});\rwebview.addEventListener('responsive', function() {\r webview.style.o pacity = '1';\r});</pre>", 1351 "description": "Fired when the process rendering the guest web content h as become responsive again after being unresponsive.<p>The following example cod e will fade the <code>webview</code> element in or out as it becomes responsive or unresponsive:</p><pre>webview.style.webkitTransition = 'opacity 250ms';\rwebv iew.addEventListener('unresponsive', function() {\r webview.style.opacity = '0. 5';\r});\rwebview.addEventListener('responsive', function() {\r webview.style.o pacity = '1';\r});</pre>",
1352 "parameters": [ 1352 "parameters": [
1353 { 1353 {
1354 "name": "processID", 1354 "name": "processID",
1355 "description": "Chrome's internal ID of the process that became resp onsive.", 1355 "description": "Chrome's internal ID of the process that became resp onsive.",
1356 "type": "integer" 1356 "type": "integer"
1357 } 1357 }
1358 ] 1358 ]
1359 }, 1359 },
1360 { 1360 {
1361 "name": "sizechanged", 1361 "name": "sizechanged",
1362 "options": { "supportsDom": true }, 1362 "options": { "supportsDom": true, "supportsLazyListeners": false },
1363 "description": "Fired when the embedded web content has been resized via <code>autosize</code>. Only fires if <code>autosize</code> is enabled.", 1363 "description": "Fired when the embedded web content has been resized via <code>autosize</code>. Only fires if <code>autosize</code> is enabled.",
1364 "parameters": [ 1364 "parameters": [
1365 { 1365 {
1366 "name": "oldWidth", 1366 "name": "oldWidth",
1367 "description": "Old width of embedded web content.", 1367 "description": "Old width of embedded web content.",
1368 "type": "number" 1368 "type": "number"
1369 }, 1369 },
1370 { 1370 {
1371 "name": "oldHeight", 1371 "name": "oldHeight",
1372 "description": "Old height of embedded web content.", 1372 "description": "Old height of embedded web content.",
1373 "type": "number" 1373 "type": "number"
1374 }, 1374 },
1375 { 1375 {
1376 "name": "newWidth", 1376 "name": "newWidth",
1377 "description": "New width of embedded web content.", 1377 "description": "New width of embedded web content.",
1378 "type": "number" 1378 "type": "number"
1379 }, 1379 },
1380 { 1380 {
1381 "name": "newHeight", 1381 "name": "newHeight",
1382 "description": "New height of embedded web content.", 1382 "description": "New height of embedded web content.",
1383 "type": "number" 1383 "type": "number"
1384 } 1384 }
1385 ] 1385 ]
1386 }, 1386 },
1387 { 1387 {
1388 "name": "unresponsive", 1388 "name": "unresponsive",
1389 "options": { "supportsDom": true }, 1389 "options": { "supportsDom": true, "supportsLazyListeners": false },
1390 "description": "Fired when the process rendering the guest web content h as become unresponsive. This event will be generated once with a matching respon sive event if the guest begins to respond again.", 1390 "description": "Fired when the process rendering the guest web content h as become unresponsive. This event will be generated once with a matching respon sive event if the guest begins to respond again.",
1391 "parameters": [ 1391 "parameters": [
1392 { 1392 {
1393 "name": "processID", 1393 "name": "processID",
1394 "description": "Chrome's internal ID of the process that has become unresponsive.", 1394 "description": "Chrome's internal ID of the process that has become unresponsive.",
1395 "type": "integer" 1395 "type": "integer"
1396 } 1396 }
1397 ] 1397 ]
1398 }, 1398 },
1399 { 1399 {
1400 "name": "zoomchange", 1400 "name": "zoomchange",
1401 "options": { "supportsDom": true }, 1401 "options": { "supportsDom": true, "supportsLazyListeners": false },
1402 "description": "Fired when the page's zoom changes.", 1402 "description": "Fired when the page's zoom changes.",
1403 "parameters": [ 1403 "parameters": [
1404 { 1404 {
1405 "name": "oldZoomFactor", 1405 "name": "oldZoomFactor",
1406 "type": "number", 1406 "type": "number",
1407 "description": "The page's previous zoom factor." 1407 "description": "The page's previous zoom factor."
1408 }, 1408 },
1409 { 1409 {
1410 "name": "newZoomFactor", 1410 "name": "newZoomFactor",
1411 "type": "number", 1411 "type": "number",
(...skipping 11 matching lines...) Expand all
1423 "$ref": "WebRequestEventInterface", 1423 "$ref": "WebRequestEventInterface",
1424 "description": "Interface which provides access to webRequest events on the guest page." 1424 "description": "Interface which provides access to webRequest events on the guest page."
1425 }, 1425 },
1426 "contextMenus": { 1426 "contextMenus": {
1427 "$ref": "ContextMenus", 1427 "$ref": "ContextMenus",
1428 "description": "Similar to <a href='contextMenus'>chrome's ContextMenus API</a>, but applies to <code>webview</code> instead of browser. Use the <code>w ebview.contextMenus</code> API to add items to <code>webview</code>'s context me nu. You can choose what types of objects your context menu additions apply to, s uch as images, hyperlinks, and pages." 1428 "description": "Similar to <a href='contextMenus'>chrome's ContextMenus API</a>, but applies to <code>webview</code> instead of browser. Use the <code>w ebview.contextMenus</code> API to add items to <code>webview</code>'s context me nu. You can choose what types of objects your context menu additions apply to, s uch as images, hyperlinks, and pages."
1429 } 1429 }
1430 } 1430 }
1431 } 1431 }
1432 ] 1432 ]
OLDNEW
« no previous file with comments | « chrome/browser/extensions/events_apitest.cc ('k') | chrome/renderer/resources/extensions/web_view/chrome_web_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698