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

Unified Diff: extensions/browser/api/guest_view/web_view/web_view_internal_api.cc

Issue 1863953002: <webview>: Fix missing transparency in captureVisibleRegion(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply wjmaclean's comments. Created 4 years, 8 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
Index: extensions/browser/api/guest_view/web_view/web_view_internal_api.cc
diff --git a/extensions/browser/api/guest_view/web_view/web_view_internal_api.cc b/extensions/browser/api/guest_view/web_view/web_view_internal_api.cc
index 0b8d4afe4189b786f959568c532e1069c369ebe4..0514fa2865ea2919c9f22e3bd9c0884fff78af51 100644
--- a/extensions/browser/api/guest_view/web_view/web_view_internal_api.cc
+++ b/extensions/browser/api/guest_view/web_view/web_view_internal_api.cc
@@ -273,6 +273,7 @@ bool WebViewInternalCaptureVisibleRegionFunction::RunAsyncSafe(
image_details = ImageDetails::FromValue(*spec);
}
+ is_guest_transparent_ = guest->allow_transparency();
return CaptureAsync(guest->web_contents(), image_details.get(),
base::Bind(&WebViewInternalCaptureVisibleRegionFunction::
CopyFromBackingStoreComplete,
@@ -283,6 +284,10 @@ bool WebViewInternalCaptureVisibleRegionFunction::IsScreenshotEnabled() {
return true;
}
+bool WebViewInternalCaptureVisibleRegionFunction::ClientAllowsTransparency() {
+ return is_guest_transparent_;
+}
+
void WebViewInternalCaptureVisibleRegionFunction::OnCaptureSuccess(
const SkBitmap& bitmap) {
std::string base64_result;

Powered by Google App Engine
This is Rietveld 408576698