Chromium Code Reviews| 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 "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
| 10 #include "skia/ext/bitmap_platform_device.h" | 10 #include "skia/ext/bitmap_platform_device.h" |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 370 | 370 |
| 371 // Reformats the web frame for printing. |page_size_px| is the page size in | 371 // Reformats the web frame for printing. |page_size_px| is the page size in |
| 372 // pixels. | 372 // pixels. |
| 373 // |width| is the resulting document width in pixel. | 373 // |width| is the resulting document width in pixel. |
| 374 // |page_count| is the number of printed pages. | 374 // |page_count| is the number of printed pages. |
| 375 // Returns false if it fails. It'll fail if the main frame failed to load but | 375 // Returns false if it fails. It'll fail if the main frame failed to load but |
| 376 // will succeed even if a child frame failed to load. | 376 // will succeed even if a child frame failed to load. |
| 377 virtual bool BeginPrint(const WebKit::WebSize& page_size_px, | 377 virtual bool BeginPrint(const WebKit::WebSize& page_size_px, |
| 378 int* page_count) = 0; | 378 int* page_count) = 0; |
| 379 | 379 |
| 380 // Returns the page shrinking factor calculated by webkit (usually between | |
| 381 // 1/1.25 and 1/2). Returns 0 if the page number is invalid or not in printing | |
| 382 // mode. | |
| 383 virtual float GetPrintPageShrink(int page) =0; | |
|
M-A Ruel
2009/04/27 18:41:13
spacing is "...) = 0;"
| |
| 384 | |
| 380 // Prints one page. |page| is 0-based. | 385 // Prints one page. |page| is 0-based. |
| 381 // Returns the page shrinking factor calculated by webkit (usually between | 386 // Returns the page shrinking factor calculated by webkit (usually between |
| 382 // 1/1.25 and 1/2). Returns 0 if the page number is invalid or not in printing | 387 // 1/1.25 and 1/2). Returns 0 if the page number is invalid or not in printing |
| 383 // mode. | 388 // mode. |
| 384 virtual float PrintPage(int page, skia::PlatformCanvas* canvas) = 0; | 389 virtual float PrintPage(int page, skia::PlatformCanvas* canvas) = 0; |
| 385 | 390 |
| 386 // Reformats the web frame for screen display. | 391 // Reformats the web frame for screen display. |
| 387 virtual void EndPrint() = 0; | 392 virtual void EndPrint() = 0; |
| 388 | 393 |
| 389 // Initiates app cache selection for the context with the resource currently | 394 // Initiates app cache selection for the context with the resource currently |
| 390 // committed in the webframe. | 395 // committed in the webframe. |
| 391 virtual void SelectAppCacheWithoutManifest() = 0; | 396 virtual void SelectAppCacheWithoutManifest() = 0; |
| 392 virtual void SelectAppCacheWithManifest(const GURL& manifest_url) = 0; | 397 virtual void SelectAppCacheWithManifest(const GURL& manifest_url) = 0; |
| 393 | 398 |
| 394 // Returns a pointer to the WebAppCacheContext for this frame. | 399 // Returns a pointer to the WebAppCacheContext for this frame. |
| 395 virtual WebAppCacheContext* GetAppCacheContext() const = 0; | 400 virtual WebAppCacheContext* GetAppCacheContext() const = 0; |
| 396 | 401 |
| 397 // Only for test_shell | 402 // Only for test_shell |
| 398 virtual int PendingFrameUnloadEventCount() const = 0; | 403 virtual int PendingFrameUnloadEventCount() const = 0; |
| 399 | 404 |
| 400 protected: | 405 protected: |
| 401 virtual ~WebFrame() {} | 406 virtual ~WebFrame() {} |
| 402 | 407 |
| 403 private: | 408 private: |
| 404 DISALLOW_COPY_AND_ASSIGN(WebFrame); | 409 DISALLOW_COPY_AND_ASSIGN(WebFrame); |
| 405 }; | 410 }; |
| 406 | 411 |
| 407 #endif // WEBKIT_GLUE_WEBFRAME_H_ | 412 #endif // WEBKIT_GLUE_WEBFRAME_H_ |
| OLD | NEW |