|
Implement webview.captureVisibleRegion()
This CL implements webview.captureVisibleRegion(), an extension/apps
API to allow WebView users to capture screenshots of the contents
displayed in a WebView. The surfaces contents capture has been plumbed
via RenderWidgetHostViewChildFrame so this implementation should not
require changes when WebView switches to using OOPIF.
As part of the implementation, there are two notable refactors:
1) CaptureWebContentsFunction has been refactored into
WebContentsCaptureClient to remove the extensions::AsyncExtensionFunction
dependence so that this code can be used by both tabs.captureVisibleTab
and webview.captureVisibleRegion, and
2) common code from DelegatedFrameHost has ben moved to
content/browser/compositor/surface_utils.* in order to avoid duplication
as both DelegatedFrameHost and RenderWidgetHostViewChildFrame now
use the code.
BUG= 326755
Committed: https://crrev.com/5b8cdcc82fc9da7bab15fd3dbf65df843dc73589
Cr-Commit-Position: refs/heads/master@{#370565}
Total comments: 1
Total comments: 6
Total comments: 22
Total comments: 14
Total comments: 2
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+558 lines, -466 lines) |
Patch |
 |
M |
chrome/browser/extensions/api/tabs/tabs_api.h
|
View
|
1
2
|
2 chunks |
+12 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/tabs/tabs_api.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+38 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/common/extensions/api/webview_tag.json
|
View
|
|
1 chunk |
+22 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/browser/compositor/delegated_frame_host.h
|
View
|
1
2
3
4
5
|
1 chunk |
+0 lines, -15 lines |
0 comments
|
Download
|
 |
M |
content/browser/compositor/delegated_frame_host.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+5 lines, -153 lines |
0 comments
|
Download
|
 |
M |
content/browser/compositor/surface_utils.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/browser/compositor/surface_utils.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+170 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/browser/frame_host/render_widget_host_view_child_frame.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+16 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/public/test/browser_test_utils.h
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/public/test/browser_test_utils.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+13 lines, -0 lines |
0 comments
|
Download
|
 |
D |
extensions/browser/api/capture_web_contents_function.h
|
View
|
|
1 chunk |
+0 lines, -67 lines |
0 comments
|
Download
|
 |
D |
extensions/browser/api/capture_web_contents_function.cc
|
View
|
|
1 chunk |
+0 lines, -150 lines |
0 comments
|
Download
|
 |
M |
extensions/browser/api/guest_view/extension_view/extension_view_internal_api.h
|
View
|
1
2
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
extensions/browser/api/guest_view/web_view/web_view_internal_api.h
|
View
|
1
2
|
2 chunks |
+24 lines, -1 line |
0 comments
|
Download
|
 |
M |
extensions/browser/api/guest_view/web_view/web_view_internal_api.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+56 lines, -0 lines |
0 comments
|
Download
|
 |
A + |
extensions/browser/api/web_contents_capture_client.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+14 lines, -23 lines |
0 comments
|
Download
|
 |
A + |
extensions/browser/api/web_contents_capture_client.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
6 chunks |
+39 lines, -45 lines |
1 comment
|
Download
|
 |
M |
extensions/browser/guest_view/web_view/web_view_apitest.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+29 lines, -0 lines |
1 comment
|
Download
|
 |
M |
extensions/common/api/_api_features.json
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/common/api/web_view_internal.json
|
View
|
|
1 chunk |
+27 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/extensions.gypi
|
View
|
1
2
3
4
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/dispatcher.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/resources/extensions_renderer_resources.grd
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/renderer/resources/guest_view/web_view/web_view.js
|
View
|
1
2
3
4
|
2 chunks |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
A |
extensions/renderer/resources/guest_view/web_view/web_view_experimental.js
|
View
|
1
2
3
4
|
1 chunk |
+24 lines, -0 lines |
0 comments
|
Download
|
 |
M |
extensions/test/data/web_view/apitest/main.js
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+33 lines, -1 line |
0 comments
|
Download
|
Total messages: 44 (19 generated)
|