New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add <webview>.capturePage([rect,] callback) #6355

Merged
merged 7 commits into from Jul 7, 2016

Conversation

Projects
None yet
2 participants
@kevinsawicki
Contributor

kevinsawicki commented Jul 6, 2016

This pull request moves the capturePage implementation from the window to the web contents so it can be used on a <webview> tag.

Closes #3687

@kevinsawicki kevinsawicki changed the title from Add <webview>.capturePage to Add <webview>.capturePage([rect,] callback) Jul 6, 2016

kBGRA_8888_SkColorType);
}
void WebContents::OnCapturePageDone(

This comment has been minimized.

@zcbenz

zcbenz Jul 6, 2016

Contributor

We can move this function to anonymous namespace since it does not actually need to use the members of WebContents.

const SkBitmap& bitmap,
content::ReadbackResponse response) {
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());

This comment has been minimized.

@zcbenz

zcbenz Jul 6, 2016

Contributor

The Locker and HandleScope can be omitted when we are not explicitly converting types to V8 in this function, the converted base::Callback will take care of it.

@zcbenz

This comment has been minimized.

Contributor

zcbenz commented Jul 7, 2016

👍

@zcbenz zcbenz merged commit bbfdaf7 into master Jul 7, 2016

8 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
electron-linux-arm Build #3602101 succeeded in 47s
Details
electron-linux-ia32 Build #3602102 succeeded in 41s
Details
electron-linux-x64 Build #3602103 succeeded in 126s
Details
electron-mas-x64 Build #1784 succeeded in 6 min 16 sec
Details
electron-osx-x64 Build #1794 succeeded in 6 min 20 sec
Details
electron-win-ia32 Build #798 succeeded in 6 min 12 sec
Details
electron-win-x64 Build #787 succeeded in 6 min 18 sec
Details

@zcbenz zcbenz deleted the webview-capture-page branch Jul 7, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment