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