New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 600493 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jul 30
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

<webivew> OOPIF: Implement capture api

Project Member Reported by aval...@chromium.org, Apr 4 2016

Issue description

Implement for oopif based webview.

From  issue #326755 , c#21:
  Here's a snippet of code you can run in the console in Developer Tools that demonstrate how the screen capture works. It will print a data-url in the console that you can cut and paste into the location bar on a new tab, and it will show the captured image.

wv = document.getElementById('webview-element');  // replace 'webview-element' with 
                                                  // the WebView element's id.
wv.captureVisibleRegion({}, function(imgdata) { if (chrome.runtime.lastError) { console.log("Error: " + chrome.runtime.lastError.message); } else console.log("imgdata: " + imgdata); });
 

Comment 1 by creis@chromium.org, Apr 4 2016

Just curious-- what still needs to be done to support this?  The CL description for https://codereview.chromium.org/1635513003/ said "The surfaces contents capture has been plumbed via RenderWidgetHostViewChildFrame so this implementation should not require changes when WebView switches to using OOPIF."
When using --use-cross-process-frames-for-guests, I get this crash:

#0 0x7f9231a7e18e base::debug::StackTrace::StackTrace()
#1 0x7f9231ade9ef logging::LogMessage::~LogMessage()
#2 0x7f922b545e32 content::RenderWidgetHostViewChildFrame::GetNativeView()
#3 0x7f92346ee796 extensions::WebContentsCaptureClient::CaptureAsync()
#4 0x7f923460773f extensions::WebViewInternalCaptureVisibleRegionFunction::RunAsyncSafe()
#5 0x7f9234607428 extensions::WebViewInternalExtensionFunction::RunAsync()
#6 0x7f923479428b AsyncExtensionFunction::Run()
#7 0x7f92347970c5 extensions::ExtensionFunctionDispatcher::DispatchWithCallbackInternal()
#8 0x7f923479694a extensions::ExtensionFunctionDispatcher::Dispatch()
#9 0x7f92347edb64 extensions::ExtensionWebContentsObserver::OnRequest()
...


As discussed offline, RenderWidgetHostViewChildFrame::GetNativeView() needs to be implemented, along similar lines to RenderWidgetHostViewGuest::GetNativeView(), but using cross_frame_process_connector & parent_view in place of guest_ and its parent view.

Comment 4 by lfg@chromium.org, Apr 4 2016

RenderWidgetHostViewChildFrames don't have a NativeView (a window), so I'm not sure it makes sense to return the parent window there. It seems that it's only used to get the device scale factor, which is available in CrossProcessFrameConnector::device_scale_factor(). Alternatively, calling GetPhysicalBackingSize() on RWHV instead of doing the multiplication in CaptureAsync could work.

Status: Assigned (was: Started)
Status: Started (was: Assigned)
Status: Assigned (was: Started)
Cc: aval...@chromium.org
Owner: ----
Status: Available (was: Assigned)
Project Member

Comment 9 by sheriffbot@chromium.org, Jul 11

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: mcnee@chromium.org
Components: Platform>Apps>BrowserTag
Status: WontFix (was: Untriaged)
This appears to work now.

I visited the signin page at chrome://chrome-signin/ and ran the code snippet in the description with the signin-frame webview to produce a data url representing the image capture of the webview.

Sign in to add a comment