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

Unified Diff: chrome/common/extensions/api/webview_tag.json

Issue 1614703003: Revert of Implement webview.captureVisibleRegion() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_api.cc ('k') | content/browser/compositor/delegated_frame_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/webview_tag.json
diff --git a/chrome/common/extensions/api/webview_tag.json b/chrome/common/extensions/api/webview_tag.json
index 0263954cd0eb1cfe9f43135dc14f55c2f48b6afb..8828eb3b21920c404984bf36ec35632fdcfc3a9b 100644
--- a/chrome/common/extensions/api/webview_tag.json
+++ b/chrome/common/extensions/api/webview_tag.json
@@ -676,28 +676,6 @@
],
"functions": [
{
- "name": "captureVisibleRegion",
- "type": "function",
- "description": "Captures the visible region of the webview.",
- "parameters": [
- {
- "$ref": "extensionTypes.ImageDetails",
- "name": "options",
- "optional": true
- },
- {
- "type": "function",
- "name": "callback",
- "parameters": [
- {"type": "string",
- "name": "dataUrl",
- "description": "A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display."
- }
- ]
- }
- ]
- },
- {
"name": "addContentScripts",
"type": "function",
"description": "<p>Adds content script injection rules to the <code>webview</code>. When the <code>webview</code> navigates to a page matching one or more rules, the associated scripts will be injected. You can programmatically add rules or update existing rules.</p><p>The following example adds two rules to the <code>webview</code>: 'myRule' and 'anotherRule'.</p><pre>webview.addContentScripts([\r {\r name: 'myRule',\r matches: ['http://www.foo.com/*'],\r css: { files: ['mystyles.css'] },\r js: { files: ['jquery.js', 'myscript.js'] },\r run_at: 'document_start'\r },\r {\r name: 'anotherRule',\r matches: ['http://www.bar.com/*'],\r js: { code: \"document.body.style.backgroundColor = 'red';\" },\r run_at: 'document_end'\r }]);\r ...\r\r// Navigates webview.\rwebview.src = 'http://www.foo.com';</pre><p>You can defer addContentScripts call until you needs to inject scripts.</p><p>The following example shows how to overwrite an existing rule.</p><pre>webview.addContentScripts([{\r name: 'rule',\r matches: ['http://www.foo.com/*'],\r js: { files: ['scriptA.js'] },\r run_at: 'document_start'}]);\r\r// Do something.\rwebview.src = 'http://www.foo.com/*';\r ...\r// Overwrite 'rule' defined before.\rwebview.addContentScripts([{\r name: 'rule',\r matches: ['http://www.bar.com/*'],\r js: { files: ['scriptB.js'] },\r run_at: 'document_end'}]);</pre><p>If <code>webview</code> has been naviagted to the origin (e.g., foo.com) and calls <code>webview.addContentScripts</code> to add 'myRule', you need to wait for next navigation to make the scripts injected. If you want immediate injection, <code>executeScript</code> will do the right thing.</p><p>Rules are preserved even if the guest process crashes or is killed or even if the <code>webview</code> is reparented.</p><p>Refer to the <a href='/extensions/content_scripts'>content scripts</a> documentation for more details.</p>",
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_api.cc ('k') | content/browser/compositor/delegated_frame_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698