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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 struct WebFloatRect; | 78 struct WebFloatRect; |
79 struct WebPoint; | 79 struct WebPoint; |
80 struct WebPrintParams; | 80 struct WebPrintParams; |
81 struct WebRect; | 81 struct WebRect; |
82 struct WebScriptSource; | 82 struct WebScriptSource; |
83 struct WebSize; | 83 struct WebSize; |
84 struct WebURLLoaderOptions; | 84 struct WebURLLoaderOptions; |
85 | 85 |
86 template <typename T> class WebVector; | 86 template <typename T> class WebVector; |
87 | 87 |
| 88 typedef class WebFrame WebLocalFrame; |
| 89 |
88 class WebFrame { | 90 class WebFrame { |
89 public: | 91 public: |
90 // Control of renderTreeAsText output | 92 // Control of renderTreeAsText output |
91 enum RenderAsTextControl { | 93 enum RenderAsTextControl { |
92 RenderAsTextNormal = 0, | 94 RenderAsTextNormal = 0, |
93 RenderAsTextDebug = 1 << 0, | 95 RenderAsTextDebug = 1 << 0, |
94 RenderAsTextPrinting = 1 << 1 | 96 RenderAsTextPrinting = 1 << 1 |
95 }; | 97 }; |
96 typedef unsigned RenderAsTextControls; | 98 typedef unsigned RenderAsTextControls; |
97 | 99 |
98 // Creates a WebFrame. Delete this WebFrame by calling WebFrame::close(). | 100 // Creates a WebFrame. Delete this WebFrame by calling WebFrame::close(). |
99 // It is valid to pass a null client pointer. | 101 // It is valid to pass a null client pointer. |
100 BLINK_EXPORT static WebFrame* create(WebFrameClient*); | 102 BLINK_EXPORT static WebLocalFrame* create(WebFrameClient*); |
101 | 103 |
102 // Returns the number of live WebFrame objects, used for leak checking. | 104 // Returns the number of live WebFrame objects, used for leak checking. |
103 BLINK_EXPORT static int instanceCount(); | 105 BLINK_EXPORT static int instanceCount(); |
104 | 106 |
105 // Returns the WebFrame associated with the current V8 context. This | 107 // Returns the WebFrame associated with the current V8 context. This |
106 // function can return 0 if the context is associated with a Document that | 108 // function can return 0 if the context is associated with a Document that |
107 // is not currently being displayed in a Frame. | 109 // is not currently being displayed in a Frame. |
108 BLINK_EXPORT static WebFrame* frameForCurrentContext(); | 110 BLINK_EXPORT static WebLocalFrame* frameForCurrentContext(); |
109 | 111 |
110 // Returns the frame corresponding to the given context. This can return 0 | 112 // Returns the frame corresponding to the given context. This can return 0 |
111 // if the context is detached from the frame, or if the context doesn't | 113 // if the context is detached from the frame, or if the context doesn't |
112 // correspond to a frame (e.g., workers). | 114 // correspond to a frame (e.g., workers). |
113 BLINK_EXPORT static WebFrame* frameForContext(v8::Handle<v8::Context>); | 115 BLINK_EXPORT static WebLocalFrame* frameForContext(v8::Handle<v8::Context>); |
114 | 116 |
115 // Returns the frame inside a given frame or iframe element. Returns 0 if | 117 // Returns the frame inside a given frame or iframe element. Returns 0 if |
116 // the given element is not a frame, iframe or if the frame is empty. | 118 // the given element is not a frame, iframe or if the frame is empty. |
117 BLINK_EXPORT static WebFrame* fromFrameOwnerElement(const WebElement&); | 119 BLINK_EXPORT static WebLocalFrame* fromFrameOwnerElement(const WebElement&); |
| 120 |
| 121 virtual WebLocalFrame* toWebLocalFrame() = 0; |
118 | 122 |
119 // This method closes and deletes the WebFrame. | 123 // This method closes and deletes the WebFrame. |
120 virtual void close() = 0; | 124 virtual void close() = 0; |
121 | 125 |
122 | 126 |
123 // Basic properties --------------------------------------------------- | 127 // Basic properties --------------------------------------------------- |
124 | 128 |
125 // The unique name of this frame. | 129 // The unique name of this frame. |
126 virtual WebString uniqueName() const = 0; | 130 virtual WebString uniqueName() const = 0; |
127 | 131 |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 // text form. This is used only by layout tests. | 662 // text form. This is used only by layout tests. |
659 virtual WebString layerTreeAsText(bool showDebugInfo = false) const = 0; | 663 virtual WebString layerTreeAsText(bool showDebugInfo = false) const = 0; |
660 | 664 |
661 protected: | 665 protected: |
662 ~WebFrame() { } | 666 ~WebFrame() { } |
663 }; | 667 }; |
664 | 668 |
665 } // namespace blink | 669 } // namespace blink |
666 | 670 |
667 #endif | 671 #endif |
OLD | NEW |