| 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 virtual WebRect selectionBoundsRect() const = 0; | 666 virtual WebRect selectionBoundsRect() const = 0; |
| 667 | 667 |
| 668 // Only for testing purpose: | 668 // Only for testing purpose: |
| 669 // Returns true if selection.anchorNode has a marker on range from |from| wi
th |length|. | 669 // Returns true if selection.anchorNode has a marker on range from |from| wi
th |length|. |
| 670 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const
= 0; | 670 virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const
= 0; |
| 671 | 671 |
| 672 // Dumps the layer tree, used by the accelerated compositor, in | 672 // Dumps the layer tree, used by the accelerated compositor, in |
| 673 // text form. This is used only by layout tests. | 673 // text form. This is used only by layout tests. |
| 674 virtual WebString layerTreeAsText(bool showDebugInfo = false) const = 0; | 674 virtual WebString layerTreeAsText(bool showDebugInfo = false) const = 0; |
| 675 | 675 |
| 676 #if BLINK_IMPLEMENTATION |
| 677 static WebFrame* fromFrame(WebCore::Frame*); |
| 678 #endif |
| 679 |
| 676 protected: | 680 protected: |
| 677 explicit WebFrame(); | 681 explicit WebFrame(); |
| 678 virtual ~WebFrame(); | 682 virtual ~WebFrame(); |
| 679 | 683 |
| 680 private: | 684 private: |
| 681 friend class OpenedFrameTracker; | 685 friend class OpenedFrameTracker; |
| 682 | 686 |
| 683 WebFrame* m_parent; | 687 WebFrame* m_parent; |
| 684 WebFrame* m_previousSibling; | 688 WebFrame* m_previousSibling; |
| 685 WebFrame* m_nextSibling; | 689 WebFrame* m_nextSibling; |
| 686 WebFrame* m_firstChild; | 690 WebFrame* m_firstChild; |
| 687 WebFrame* m_lastChild; | 691 WebFrame* m_lastChild; |
| 688 | 692 |
| 689 WebFrame* m_opener; | 693 WebFrame* m_opener; |
| 690 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker; | 694 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker; |
| 691 }; | 695 }; |
| 692 | 696 |
| 693 #if BLINK_IMPLEMENTATION | 697 #if BLINK_IMPLEMENTATION |
| 694 WebCore::Frame* toWebCoreFrame(WebFrame*); | 698 WebCore::Frame* toWebCoreFrame(const WebFrame*); |
| 695 #endif | 699 #endif |
| 696 | 700 |
| 697 } // namespace blink | 701 } // namespace blink |
| 698 | 702 |
| 699 #endif | 703 #endif |
| OLD | NEW |