| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 class WebPerformance; | 54 class WebPerformance; |
| 55 class WebRemoteFrame; | 55 class WebRemoteFrame; |
| 56 class WebSecurityOrigin; | 56 class WebSecurityOrigin; |
| 57 class WebString; | 57 class WebString; |
| 58 class WebURL; | 58 class WebURL; |
| 59 class WebURLRequest; | 59 class WebURLRequest; |
| 60 class WebView; | 60 class WebView; |
| 61 enum class WebSandboxFlags; | 61 enum class WebSandboxFlags; |
| 62 struct WebFrameOwnerProperties; | 62 struct WebFrameOwnerProperties; |
| 63 struct WebRect; | 63 struct WebRect; |
| 64 struct WebSize; | |
| 65 | 64 |
| 66 // Frames may be rendered in process ('local') or out of process ('remote'). | 65 // Frames may be rendered in process ('local') or out of process ('remote'). |
| 67 // A remote frame is always cross-site; a local frame may be either same-site or | 66 // A remote frame is always cross-site; a local frame may be either same-site or |
| 68 // cross-site. | 67 // cross-site. |
| 69 // WebFrame is the base class for both WebLocalFrame and WebRemoteFrame and | 68 // WebFrame is the base class for both WebLocalFrame and WebRemoteFrame and |
| 70 // contains methods that are valid on both local and remote frames, such as | 69 // contains methods that are valid on both local and remote frames, such as |
| 71 // getting a frame's parent or its opener. | 70 // getting a frame's parent or its opener. |
| 72 class BLINK_EXPORT WebFrame { | 71 class BLINK_EXPORT WebFrame { |
| 73 public: | 72 public: |
| 74 // FIXME: We already have blink::TextGranularity. For now we support only | 73 // FIXME: We already have blink::TextGranularity. For now we support only |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // another process and it dynamically updates these properties. | 130 // another process and it dynamically updates these properties. |
| 132 // TODO(dcheng): Currently, the update only takes effect on next frame | 131 // TODO(dcheng): Currently, the update only takes effect on next frame |
| 133 // navigation. This matches the in-process frame behavior. | 132 // navigation. This matches the in-process frame behavior. |
| 134 void SetFrameOwnerProperties(const WebFrameOwnerProperties&); | 133 void SetFrameOwnerProperties(const WebFrameOwnerProperties&); |
| 135 | 134 |
| 136 // Geometry ----------------------------------------------------------- | 135 // Geometry ----------------------------------------------------------- |
| 137 | 136 |
| 138 // NOTE: These routines do not force page layout so their results may | 137 // NOTE: These routines do not force page layout so their results may |
| 139 // not be accurate if the page layout is out-of-date. | 138 // not be accurate if the page layout is out-of-date. |
| 140 | 139 |
| 141 // The size of the contents area. | |
| 142 virtual WebSize ContentsSize() const = 0; | |
| 143 | |
| 144 // Returns true if the contents (minus scrollbars) has non-zero area. | |
| 145 virtual bool HasVisibleContent() const = 0; | |
| 146 | |
| 147 // Returns the visible content rect (minus scrollbars, in absolute coordinate) | 140 // Returns the visible content rect (minus scrollbars, in absolute coordinate) |
| 148 virtual WebRect VisibleContentRect() const = 0; | 141 virtual WebRect VisibleContentRect() const = 0; |
| 149 | 142 |
| 150 // Whether to collapse the frame's owner element in the embedder document, | 143 // Whether to collapse the frame's owner element in the embedder document, |
| 151 // that is, to remove it from the layout as if it did not exist. Only works | 144 // that is, to remove it from the layout as if it did not exist. Only works |
| 152 // for <iframe> owner elements. | 145 // for <iframe> owner elements. |
| 153 void Collapse(bool); | 146 void Collapse(bool); |
| 154 | 147 |
| 155 // Hierarchy ---------------------------------------------------------- | 148 // Hierarchy ---------------------------------------------------------- |
| 156 | 149 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 WebFrame* first_child_; | 280 WebFrame* first_child_; |
| 288 WebFrame* last_child_; | 281 WebFrame* last_child_; |
| 289 | 282 |
| 290 WebFrame* opener_; | 283 WebFrame* opener_; |
| 291 std::unique_ptr<OpenedFrameTracker> opened_frame_tracker_; | 284 std::unique_ptr<OpenedFrameTracker> opened_frame_tracker_; |
| 292 }; | 285 }; |
| 293 | 286 |
| 294 } // namespace blink | 287 } // namespace blink |
| 295 | 288 |
| 296 #endif | 289 #endif |
| OLD | NEW |