OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WEBKIT_GLUE_WEBFRAME_H_ | 5 #ifndef WEBKIT_GLUE_WEBFRAME_H_ |
6 #define WEBKIT_GLUE_WEBFRAME_H_ | 6 #define WEBKIT_GLUE_WEBFRAME_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 // internally refcounted so we allocate and return a new copy | 285 // internally refcounted so we allocate and return a new copy |
286 // | 286 // |
287 // Set scroll_to_zero to force all frames to be scrolled to 0,0 before | 287 // Set scroll_to_zero to force all frames to be scrolled to 0,0 before |
288 // being painted into the image. This will not send DOM events because it | 288 // being painted into the image. This will not send DOM events because it |
289 // just draws the contents at a different place, but it does mean the | 289 // just draws the contents at a different place, but it does mean the |
290 // scrollbars in the resulting image will appear to be wrong (they'll be | 290 // scrollbars in the resulting image will appear to be wrong (they'll be |
291 // painted as if the content was scrolled). | 291 // painted as if the content was scrolled). |
292 // | 292 // |
293 // Returns false on failure. CaptureImage can fail if 'image' argument | 293 // Returns false on failure. CaptureImage can fail if 'image' argument |
294 // is not valid or due to failure to allocate a canvas. | 294 // is not valid or due to failure to allocate a canvas. |
295 virtual bool CaptureImage(scoped_ptr<gfx::BitmapPlatformDevice>* image, | 295 virtual bool CaptureImage(scoped_ptr<skia::BitmapPlatformDevice>* image, |
296 bool scroll_to_zero) = 0; | 296 bool scroll_to_zero) = 0; |
297 | 297 |
298 // This function sets a flag within WebKit to instruct it to render the page | 298 // This function sets a flag within WebKit to instruct it to render the page |
299 // as View-Source (showing the HTML source for the page). | 299 // as View-Source (showing the HTML source for the page). |
300 virtual void SetInViewSourceMode(bool enable) = 0; | 300 virtual void SetInViewSourceMode(bool enable) = 0; |
301 | 301 |
302 // This function returns whether this frame is in "view-source" mode. | 302 // This function returns whether this frame is in "view-source" mode. |
303 virtual bool GetInViewSourceMode() const = 0; | 303 virtual bool GetInViewSourceMode() const = 0; |
304 | 304 |
305 // Returns the frame name. | 305 // Returns the frame name. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 // Layouts the web page on paper. Calculates the rectangle of the web page | 345 // Layouts the web page on paper. Calculates the rectangle of the web page |
346 // each pages will "see". Then you can retrieve the exact view of a paper page | 346 // each pages will "see". Then you can retrieve the exact view of a paper page |
347 // with GetPageRect. | 347 // with GetPageRect. |
348 // Returns the number of printed pages computed. | 348 // Returns the number of printed pages computed. |
349 virtual int ComputePageRects(const gfx::Size& page_size_px) = 0; | 349 virtual int ComputePageRects(const gfx::Size& page_size_px) = 0; |
350 | 350 |
351 // Retrieves the paper page's view of the web page. | 351 // Retrieves the paper page's view of the web page. |
352 virtual void GetPageRect(int page, gfx::Rect* page_size) const = 0; | 352 virtual void GetPageRect(int page, gfx::Rect* page_size) const = 0; |
353 | 353 |
354 // Prints one page. |page| is 0-based. | 354 // Prints one page. |page| is 0-based. |
355 virtual bool SpoolPage(int page, gfx::PlatformCanvas* canvas) = 0; | 355 virtual bool SpoolPage(int page, skia::PlatformCanvas* canvas) = 0; |
356 | 356 |
357 // Is this frame reloading with allowing stale data? This will be true when | 357 // Is this frame reloading with allowing stale data? This will be true when |
358 // the encoding of the page is changed and it needs to be re-interpreted, | 358 // the encoding of the page is changed and it needs to be re-interpreted, |
359 // but no additional loads should occur. | 359 // but no additional loads should occur. |
360 virtual bool IsReloadAllowingStaleData() const = 0; | 360 virtual bool IsReloadAllowingStaleData() const = 0; |
361 | 361 |
362 // Only for test_shell | 362 // Only for test_shell |
363 virtual int PendingFrameUnloadEventCount() const = 0; | 363 virtual int PendingFrameUnloadEventCount() const = 0; |
364 | 364 |
365 private: | 365 private: |
366 DISALLOW_COPY_AND_ASSIGN(WebFrame); | 366 DISALLOW_COPY_AND_ASSIGN(WebFrame); |
367 }; | 367 }; |
368 | 368 |
369 #endif // WEBKIT_GLUE_WEBFRAME_H_ | 369 #endif // WEBKIT_GLUE_WEBFRAME_H_ |
OLD | NEW |