OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 WebLocalFrame_h | 5 #ifndef WebLocalFrame_h |
6 #define WebLocalFrame_h | 6 #define WebLocalFrame_h |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 | 10 |
11 #include "WebCompositionUnderline.h" | 11 #include "WebCompositionUnderline.h" |
12 #include "WebFrame.h" | 12 #include "WebFrame.h" |
13 #include "WebFrameLoadType.h" | 13 #include "WebFrameLoadType.h" |
14 #include "WebHistoryItem.h" | 14 #include "WebHistoryItem.h" |
15 #include "public/platform/WebCachePolicy.h" | 15 #include "public/platform/WebCachePolicy.h" |
| 16 #include "public/platform/WebSize.h" |
16 #include "public/platform/WebURLError.h" | 17 #include "public/platform/WebURLError.h" |
17 #include "public/platform/WebURLRequest.h" | 18 #include "public/platform/WebURLRequest.h" |
18 #include "public/platform/site_engagement.mojom-shared.h" | 19 #include "public/platform/site_engagement.mojom-shared.h" |
19 #include "v8/include/v8.h" | 20 #include "v8/include/v8.h" |
20 | 21 |
21 namespace base { | 22 namespace base { |
22 class SingleThreadTaskRunner; | 23 class SingleThreadTaskRunner; |
23 } | 24 } |
24 | 25 |
25 namespace blink { | 26 namespace blink { |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 // This is used for situations where we want to reload a different URL because | 698 // This is used for situations where we want to reload a different URL because |
698 // of a redirect. | 699 // of a redirect. |
699 virtual void ReloadWithOverrideURL(const WebURL& override_url, | 700 virtual void ReloadWithOverrideURL(const WebURL& override_url, |
700 WebFrameLoadType) = 0; | 701 WebFrameLoadType) = 0; |
701 | 702 |
702 // Load the given URL. | 703 // Load the given URL. |
703 virtual void LoadRequest(const WebURLRequest&) = 0; | 704 virtual void LoadRequest(const WebURLRequest&) = 0; |
704 | 705 |
705 // Geometry ----------------------------------------------------------------- | 706 // Geometry ----------------------------------------------------------------- |
706 | 707 |
| 708 // NOTE: These routines do not force page layout so their results may |
| 709 // not be accurate if the page layout is out-of-date. |
| 710 |
707 // The scroll offset from the top-left corner of the frame in pixels. | 711 // The scroll offset from the top-left corner of the frame in pixels. |
708 virtual WebSize GetScrollOffset() const = 0; | 712 virtual WebSize GetScrollOffset() const = 0; |
709 virtual void SetScrollOffset(const WebSize&) = 0; | 713 virtual void SetScrollOffset(const WebSize&) = 0; |
710 | 714 |
711 // If set to false, do not draw scrollbars on this frame's view. | 715 // If set to false, do not draw scrollbars on this frame's view. |
712 virtual void SetCanHaveScrollbars(bool) = 0; | 716 virtual void SetCanHaveScrollbars(bool) = 0; |
713 | 717 |
| 718 // The size of the contents area. |
| 719 virtual WebSize ContentsSize() const = 0; |
| 720 |
| 721 // Returns true if the contents (minus scrollbars) has non-zero area. |
| 722 virtual bool HasVisibleContent() const = 0; |
| 723 |
714 // Printing ------------------------------------------------------------ | 724 // Printing ------------------------------------------------------------ |
715 | 725 |
716 // Reformats the WebFrame for printing. WebPrintParams specifies the printable | 726 // Reformats the WebFrame for printing. WebPrintParams specifies the printable |
717 // content size, paper size, printable area size, printer DPI and print | 727 // content size, paper size, printable area size, printer DPI and print |
718 // scaling option. If constrainToNode node is specified, then only the given | 728 // scaling option. If constrainToNode node is specified, then only the given |
719 // node is printed (for now only plugins are supported), instead of the entire | 729 // node is printed (for now only plugins are supported), instead of the entire |
720 // frame. | 730 // frame. |
721 // Returns the number of pages that can be printed at the given | 731 // Returns the number of pages that can be printed at the given |
722 // page size. | 732 // page size. |
723 virtual int PrintBegin(const WebPrintParams&, | 733 virtual int PrintBegin(const WebPrintParams&, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 // to call these on a WebLocalFrame. | 775 // to call these on a WebLocalFrame. |
766 bool IsWebLocalFrame() const override = 0; | 776 bool IsWebLocalFrame() const override = 0; |
767 WebLocalFrame* ToWebLocalFrame() override = 0; | 777 WebLocalFrame* ToWebLocalFrame() override = 0; |
768 bool IsWebRemoteFrame() const override = 0; | 778 bool IsWebRemoteFrame() const override = 0; |
769 WebRemoteFrame* ToWebRemoteFrame() override = 0; | 779 WebRemoteFrame* ToWebRemoteFrame() override = 0; |
770 }; | 780 }; |
771 | 781 |
772 } // namespace blink | 782 } // namespace blink |
773 | 783 |
774 #endif // WebLocalFrame_h | 784 #endif // WebLocalFrame_h |
OLD | NEW |