<webivew> OOPIF: Implement capture api |
||||||||
Issue descriptionImplement 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); });
,
Apr 4 2016
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() ...
,
Apr 4 2016
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.
,
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.
,
Apr 7 2016
,
Apr 7 2016
,
Apr 7 2016
,
Jul 10 2017
,
Jul 11
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
,
Jul 30
,
Jul 30
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 |
||||||||
Comment 1 by creis@chromium.org
, Apr 4 2016