OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WebLocalFrame_h | 5 #ifndef WebLocalFrame_h |
6 #define WebLocalFrame_h | 6 #define WebLocalFrame_h |
7 | 7 |
8 // FIXME: There is currently just a forwarding header until Chrome is updated to | |
9 // use these types. | |
10 #include "WebFrame.h" | 8 #include "WebFrame.h" |
11 | 9 |
| 10 namespace blink { |
| 11 |
| 12 class WebLocalFrame : public WebFrame { |
| 13 public: |
| 14 // Creates a WebFrame. Delete this WebFrame by calling WebFrame::close(). |
| 15 // It is valid to pass a null client pointer. |
| 16 BLINK_EXPORT static WebLocalFrame* create(WebFrameClient*); |
| 17 |
| 18 // Returns the WebFrame associated with the current V8 context. This |
| 19 // function can return 0 if the context is associated with a Document that |
| 20 // is not currently being displayed in a Frame. |
| 21 BLINK_EXPORT static WebLocalFrame* frameForCurrentContext(); |
| 22 |
| 23 // Returns the frame corresponding to the given context. This can return 0 |
| 24 // if the context is detached from the frame, or if the context doesn't |
| 25 // correspond to a frame (e.g., workers). |
| 26 BLINK_EXPORT static WebLocalFrame* frameForContext(v8::Handle<v8::Context>); |
| 27 |
| 28 // Returns the frame inside a given frame or iframe element. Returns 0 if |
| 29 // the given element is not a frame, iframe or if the frame is empty. |
| 30 BLINK_EXPORT static WebLocalFrame* fromFrameOwnerElement(const WebElement&); |
| 31 }; |
| 32 |
| 33 } // namespace blink |
| 34 |
12 #endif // WebLocalFrame_h | 35 #endif // WebLocalFrame_h |
OLD | NEW |