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

Unified Diff: chrome/browser/extensions/api/capture_web_contents_function.cc

Issue 259523008: Remove RenderWidgetHost::GetSnapshotFromRenderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: getsnapshotfromrenderer: rm Created 6 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: chrome/browser/extensions/api/capture_web_contents_function.cc
diff --git a/chrome/browser/extensions/api/capture_web_contents_function.cc b/chrome/browser/extensions/api/capture_web_contents_function.cc
index a2f65b35ae2c8f1a8b40ef2aaeb5890b2bb0ade6..65908569c865c69db5b666a9cef26e63bffdea3e 100644
--- a/chrome/browser/extensions/api/capture_web_contents_function.cc
+++ b/chrome/browser/extensions/api/capture_web_contents_function.cc
@@ -88,28 +88,7 @@ void CaptureWebContentsFunction::CopyFromBackingStoreComplete(
OnCaptureSuccess(bitmap);
return;
}
-
- WebContents* contents = GetWebContentsForID(context_id_);
- if (!contents) {
- OnCaptureFailure(FAILURE_REASON_CONTENT_NOT_FOUND);
- return;
- }
-
- // Ask the renderer for a snapshot of the page.
- RenderWidgetHost* render_widget_host = contents->GetRenderViewHost();
- render_widget_host->GetSnapshotFromRenderer(
- gfx::Rect(),
- base::Bind(&CaptureWebContentsFunction::GetSnapshotFromRendererComplete,
- this));
-}
-
-void CaptureWebContentsFunction::GetSnapshotFromRendererComplete(
- bool succeeded,
- const SkBitmap& bitmap) {
- if (succeeded)
- OnCaptureSuccess(bitmap);
- else
- OnCaptureFailure(FAILURE_REASON_UNKNOWN);
+ OnCaptureFailure(FAILURE_REASON_UNKNOWN);
}
void CaptureWebContentsFunction::OnCaptureSuccess(const SkBitmap& bitmap) {
« no previous file with comments | « chrome/browser/extensions/api/capture_web_contents_function.h ('k') | chrome/browser/thumbnails/thumbnail_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698