Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1126)

Side by Side Diff: third_party/WebKit/public/web/WebFrame.h

Issue 2953193002: Move ContentsSize and HasVisibleContent methods from WebFrame to WebLocalFrame. (Closed)
Patch Set: . Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 class WebPerformance; 55 class WebPerformance;
56 class WebRemoteFrame; 56 class WebRemoteFrame;
57 class WebSecurityOrigin; 57 class WebSecurityOrigin;
58 class WebString; 58 class WebString;
59 class WebURL; 59 class WebURL;
60 class WebURLRequest; 60 class WebURLRequest;
61 class WebView; 61 class WebView;
62 enum class WebSandboxFlags; 62 enum class WebSandboxFlags;
63 struct WebFrameOwnerProperties; 63 struct WebFrameOwnerProperties;
64 struct WebRect; 64 struct WebRect;
65 struct WebSize;
66 65
67 // Frames may be rendered in process ('local') or out of process ('remote'). 66 // Frames may be rendered in process ('local') or out of process ('remote').
68 // A remote frame is always cross-site; a local frame may be either same-site or 67 // A remote frame is always cross-site; a local frame may be either same-site or
69 // cross-site. 68 // cross-site.
70 // WebFrame is the base class for both WebLocalFrame and WebRemoteFrame and 69 // WebFrame is the base class for both WebLocalFrame and WebRemoteFrame and
71 // contains methods that are valid on both local and remote frames, such as 70 // contains methods that are valid on both local and remote frames, such as
72 // getting a frame's parent or its opener. 71 // getting a frame's parent or its opener.
73 class BLINK_EXPORT WebFrame { 72 class BLINK_EXPORT WebFrame {
74 public: 73 public:
75 // FIXME: We already have blink::TextGranularity. For now we support only 74 // FIXME: We already have blink::TextGranularity. For now we support only
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // another process and it dynamically updates these properties. 131 // another process and it dynamically updates these properties.
133 // TODO(dcheng): Currently, the update only takes effect on next frame 132 // TODO(dcheng): Currently, the update only takes effect on next frame
134 // navigation. This matches the in-process frame behavior. 133 // navigation. This matches the in-process frame behavior.
135 void SetFrameOwnerProperties(const WebFrameOwnerProperties&); 134 void SetFrameOwnerProperties(const WebFrameOwnerProperties&);
136 135
137 // Geometry ----------------------------------------------------------- 136 // Geometry -----------------------------------------------------------
138 137
139 // NOTE: These routines do not force page layout so their results may 138 // NOTE: These routines do not force page layout so their results may
140 // not be accurate if the page layout is out-of-date. 139 // not be accurate if the page layout is out-of-date.
141 140
142 // The size of the contents area.
143 virtual WebSize ContentsSize() const = 0;
144
145 // Returns true if the contents (minus scrollbars) has non-zero area.
146 virtual bool HasVisibleContent() const = 0;
147
148 // Returns the visible content rect (minus scrollbars, in absolute coordinate) 141 // Returns the visible content rect (minus scrollbars, in absolute coordinate)
149 virtual WebRect VisibleContentRect() const = 0; 142 virtual WebRect VisibleContentRect() const = 0;
150 143
151 // Whether to collapse the frame's owner element in the embedder document, 144 // Whether to collapse the frame's owner element in the embedder document,
152 // that is, to remove it from the layout as if it did not exist. Only works 145 // that is, to remove it from the layout as if it did not exist. Only works
153 // for <iframe> owner elements. 146 // for <iframe> owner elements.
154 void Collapse(bool); 147 void Collapse(bool);
155 148
156 // Hierarchy ---------------------------------------------------------- 149 // Hierarchy ----------------------------------------------------------
157 150
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 WebFrame* first_child_; 282 WebFrame* first_child_;
290 WebFrame* last_child_; 283 WebFrame* last_child_;
291 284
292 WebFrame* opener_; 285 WebFrame* opener_;
293 std::unique_ptr<OpenedFrameTracker> opened_frame_tracker_; 286 std::unique_ptr<OpenedFrameTracker> opened_frame_tracker_;
294 }; 287 };
295 288
296 } // namespace blink 289 } // namespace blink
297 290
298 #endif 291 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698