|
<webview>: Implement ExecuteScript
This patch implements executeScript for <webview> by using extensions bindings for forwarding requests to the browser process from the app process.
The <webview> shim passes the ProcessId and the RouteID of the guest process to the ExecuteScriptFunction object in the browser process. From there, ExecuteScriptFunction grabs the guest web contents, and creates a ScriptExecutor object attached to the guest WebContents.
The callback is supported trivially through the extension bindings.
When a new guest web contents is created, we inject the Chrome App's extension information into the guest process, so that executeScript knows to bypass permission requests when attempting to execute script within the guest (as suggested by mpcomplete@).
BUG= 153530
Test=WebViewTest.Shim, webViewExecuteScript
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=178520
Total comments: 18
Total comments: 6
Total comments: 4
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+294 lines, -8 lines) |
Patch |
 |
M |
chrome/browser/chrome_content_browser_client.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chrome_content_browser_client.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+18 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/tabs/tabs_api.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/extensions/api/webview/webview_api.h
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+31 lines, -0 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/extensions/api/webview/webview_api.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+88 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/extension_function_histogram_value.h
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/script_executor.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/script_executor.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/chrome_browser_extensions.gypi
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/common/extensions/api/api.gyp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
A |
chrome/common/extensions/api/webview.json
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+72 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/common/extensions/extension_messages.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/renderer/extensions/user_script_scheduler.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+2 lines, -1 line |
1 comment
|
Download
|
 |
M |
chrome/renderer/resources/extensions/web_view.js
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+7 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/test/data/extensions/platform_apps/web_view/main.js
|
View
|
1
2
3
|
1 chunk |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/browser/browser_plugin/browser_plugin_guest.cc
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/common/browser_plugin_messages.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/public/browser/content_browser_client.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/renderer/browser_plugin/browser_plugin.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/renderer/browser_plugin/browser_plugin.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/renderer/browser_plugin/browser_plugin_bindings.cc
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+23 lines, -1 line |
0 comments
|
Download
|
Total messages: 15 (0 generated)
|