OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 virtual void ClosePage() = 0; | 385 virtual void ClosePage() = 0; |
386 | 386 |
387 // The current scroll offset from the top of frame in pixels. | 387 // The current scroll offset from the top of frame in pixels. |
388 virtual WebKit::WebSize ScrollOffset() const = 0; | 388 virtual WebKit::WebSize ScrollOffset() const = 0; |
389 | 389 |
390 // Reformats the WebFrame for printing. page_size is the page size in | 390 // Reformats the WebFrame for printing. page_size is the page size in |
391 // pixels. Returns the number of pages that can be printed at the given page | 391 // pixels. Returns the number of pages that can be printed at the given page |
392 // size. | 392 // size. |
393 virtual int PrintBegin(const WebKit::WebSize& page_size) = 0; | 393 virtual int PrintBegin(const WebKit::WebSize& page_size) = 0; |
394 | 394 |
| 395 // Returns the page shrinking factor calculated by webkit (usually between |
| 396 // 1/1.25 and 1/2). Returns 0 if the page number is invalid or not in printing |
| 397 // mode. |
| 398 virtual float GetPrintPageShrink(int page) = 0; |
| 399 |
395 // Prints one page, and returns the calculated page shrinking factor (usually | 400 // Prints one page, and returns the calculated page shrinking factor (usually |
396 // between 1/1.25 and 1/2). Returns 0 if the page number is invalid or not | 401 // between 1/1.25 and 1/2). Returns 0 if the page number is invalid or not |
397 // in printing mode. | 402 // in printing mode. |
398 virtual float PrintPage(int page_to_print, WebKit::WebCanvas* canvas) = 0; | 403 virtual float PrintPage(int page_to_print, WebKit::WebCanvas* canvas) = 0; |
399 | 404 |
400 // Reformats the WebFrame for screen display. | 405 // Reformats the WebFrame for screen display. |
401 virtual void PrintEnd() = 0; | 406 virtual void PrintEnd() = 0; |
402 | 407 |
403 // Only for test_shell | 408 // Only for test_shell |
404 virtual int PendingFrameUnloadEventCount() const = 0; | 409 virtual int PendingFrameUnloadEventCount() const = 0; |
405 | 410 |
406 protected: | 411 protected: |
407 virtual ~WebFrame() {} | 412 virtual ~WebFrame() {} |
408 | 413 |
409 private: | 414 private: |
410 DISALLOW_COPY_AND_ASSIGN(WebFrame); | 415 DISALLOW_COPY_AND_ASSIGN(WebFrame); |
411 }; | 416 }; |
412 | 417 |
413 #endif // WEBKIT_GLUE_WEBFRAME_H_ | 418 #endif // WEBKIT_GLUE_WEBFRAME_H_ |
OLD | NEW |