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

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

Issue 338993003: Cleanup various WebView/WebFrame APIs to properly handle remote frames. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Throw in a call to relaxAdoptionRequirement Created 6 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 | Annotate | Revision Log
« Source/core/frame/Frame.cpp ('K') | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 BLINK_EXPORT WebFrame* opener() const; 195 BLINK_EXPORT WebFrame* opener() const;
196 196
197 // Sets the frame that opened this one or 0 if there is none. 197 // Sets the frame that opened this one or 0 if there is none.
198 virtual void setOpener(WebFrame*); 198 virtual void setOpener(WebFrame*);
199 199
200 // Reset the frame that opened this frame to 0. 200 // Reset the frame that opened this frame to 0.
201 // This is executed between layout tests runs 201 // This is executed between layout tests runs
202 void clearOpener() { setOpener(0); } 202 void clearOpener() { setOpener(0); }
203 203
204 // Adds the given frame as a child of this frame. 204 // Adds the given frame as a child of this frame.
205 virtual void appendChild(WebFrame*); 205 BLINK_EXPORT void appendChild(WebFrame*);
206 206
207 // Removes the given child from this frame. 207 // Removes the given child from this frame.
208 virtual void removeChild(WebFrame*); 208 virtual void removeChild(WebFrame*);
209 209
210 // Returns the parent frame or 0 if this is a top-most frame. 210 // Returns the parent frame or 0 if this is a top-most frame.
211 BLINK_EXPORT WebFrame* parent() const; 211 BLINK_EXPORT WebFrame* parent() const;
212 212
213 // Returns the top-most frame in the hierarchy containing this frame. 213 // Returns the top-most frame in the hierarchy containing this frame.
214 BLINK_EXPORT WebFrame* top() const; 214 BLINK_EXPORT WebFrame* top() const;
215 215
216 // Returns the first/last child frame. 216 // Returns the first/last child frame.
217 BLINK_EXPORT WebFrame* firstChild() const; 217 BLINK_EXPORT WebFrame* firstChild() const;
218 BLINK_EXPORT WebFrame* lastChild() const; 218 BLINK_EXPORT WebFrame* lastChild() const;
219 219
220 // Returns the previous/next sibling frame. 220 // Returns the previous/next sibling frame.
221 BLINK_EXPORT WebFrame* previousSibling() const; 221 BLINK_EXPORT WebFrame* previousSibling() const;
222 BLINK_EXPORT WebFrame* nextSibling() const; 222 BLINK_EXPORT WebFrame* nextSibling() const;
223 223
224 // Returns the next/previous frame in "frame traversal order" 224 // Returns the previous/next frame in "frame traversal order",
225 // optionally wrapping around. 225 // optionally wrapping around.
226 virtual WebFrame* traverseNext(bool wrap) const = 0; 226 BLINK_EXPORT WebFrame* traversePrevious(bool wrap) const;
227 virtual WebFrame* traversePrevious(bool wrap) const = 0; 227 BLINK_EXPORT WebFrame* traverseNext(bool wrap) const;
228 228
229 // Returns the child frame identified by the given name. 229 // Returns the child frame identified by the given name.
230 virtual WebFrame* findChildByName(const WebString& name) const = 0; 230 BLINK_EXPORT WebFrame* findChildByName(const WebString& name) const;
231 231
232 232
233 // Content ------------------------------------------------------------ 233 // Content ------------------------------------------------------------
234 234
235 virtual WebDocument document() const = 0; 235 virtual WebDocument document() const = 0;
236 236
237 virtual WebPerformance performance() const = 0; 237 virtual WebPerformance performance() const = 0;
238 238
239 239
240 // Closing ------------------------------------------------------------- 240 // Closing -------------------------------------------------------------
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 virtual WebRect selectionBoundsRect() const = 0; 670 virtual WebRect selectionBoundsRect() const = 0;
671 671
672 // Only for testing purpose: 672 // Only for testing purpose:
673 // Returns true if selection.anchorNode has a marker on range from |from| wi th |length|. 673 // Returns true if selection.anchorNode has a marker on range from |from| wi th |length|.
674 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const = 0; 674 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const = 0;
675 675
676 // Dumps the layer tree, used by the accelerated compositor, in 676 // Dumps the layer tree, used by the accelerated compositor, in
677 // text form. This is used only by layout tests. 677 // text form. This is used only by layout tests.
678 virtual WebString layerTreeAsText(bool showDebugInfo = false) const = 0; 678 virtual WebString layerTreeAsText(bool showDebugInfo = false) const = 0;
679 679
680 #if BLINK_IMPLEMENTATION
681 static WebFrame* fromFrame(WebCore::Frame*);
682 #endif
683
680 protected: 684 protected:
681 explicit WebFrame(); 685 explicit WebFrame();
682 virtual ~WebFrame(); 686 virtual ~WebFrame();
683 687
684 private: 688 private:
685 friend class OpenedFrameTracker; 689 friend class OpenedFrameTracker;
686 690
687 WebFrame* m_parent; 691 WebFrame* m_parent;
688 WebFrame* m_previousSibling; 692 WebFrame* m_previousSibling;
689 WebFrame* m_nextSibling; 693 WebFrame* m_nextSibling;
690 WebFrame* m_firstChild; 694 WebFrame* m_firstChild;
691 WebFrame* m_lastChild; 695 WebFrame* m_lastChild;
692 696
693 WebFrame* m_opener; 697 WebFrame* m_opener;
694 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker; 698 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker;
695 }; 699 };
696 700
697 #if BLINK_IMPLEMENTATION 701 #if BLINK_IMPLEMENTATION
698 WebCore::Frame* toWebCoreFrame(WebFrame*); 702 WebCore::Frame* toWebCoreFrame(const WebFrame*);
699 #endif 703 #endif
700 704
701 } // namespace blink 705 } // namespace blink
702 706
703 #endif 707 #endif
OLDNEW
« Source/core/frame/Frame.cpp ('K') | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698