diff options
Diffstat (limited to 'webkit/glue/webframe.h')
-rw-r--r-- | webkit/glue/webframe.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/webkit/glue/webframe.h b/webkit/glue/webframe.h index 0557e35..9fd4daf 100644 --- a/webkit/glue/webframe.h +++ b/webkit/glue/webframe.h @@ -284,14 +284,18 @@ class WebFrame : public base::RefCounted<WebFrame> { // Paints the contents of this web view in a bitmapped image. This image // will not have plugins drawn. Devices are cheap to copy because the data is - // internally refcounted, so we return by value. + // internally refcounted so we allocate and return a new copy // // Set scroll_to_zero to force all frames to be scrolled to 0,0 before // being painted into the image. This will not send DOM events because it // just draws the contents at a different place, but it does mean the // scrollbars in the resulting image will appear to be wrong (they'll be // painted as if the content was scrolled). - virtual gfx::BitmapPlatformDevice CaptureImage(bool scroll_to_zero) = 0; + // + // Returns false on failure. CaptureImage can fail if 'image' argument + // is not valid or due to failure to allocate a canvas. + virtual bool CaptureImage(scoped_ptr<gfx::BitmapPlatformDevice>* image, + bool scroll_to_zero) = 0; // This function sets a flag within WebKit to instruct it to render the page // as View-Source (showing the HTML source for the page). |