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

Unified Diff: public/web/WebLocalFrame.h

Issue 232133004: Split WebLocalFrame into a distinct subclass of WebFrame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« Source/web/WebFrameImpl.h ('K') | « public/web/WebFrame.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebLocalFrame.h
diff --git a/public/web/WebLocalFrame.h b/public/web/WebLocalFrame.h
index 9197a462a5f478ac885d6037d9a73731a02e1dcf..07891b922801a459c83e5c9b0e0b1f5dddc0f1ed 100644
--- a/public/web/WebLocalFrame.h
+++ b/public/web/WebLocalFrame.h
@@ -5,8 +5,31 @@
#ifndef WebLocalFrame_h
#define WebLocalFrame_h
-// FIXME: There is currently just a forwarding header until Chrome is updated to
-// use these types.
#include "WebFrame.h"
+namespace blink {
+
+class WebLocalFrame : public WebFrame {
+public:
+ // Creates a WebFrame. Delete this WebFrame by calling WebFrame::close().
+ // It is valid to pass a null client pointer.
+ BLINK_EXPORT static WebLocalFrame* create(WebFrameClient*);
+
+ // Returns the WebFrame associated with the current V8 context. This
+ // function can return 0 if the context is associated with a Document that
+ // is not currently being displayed in a Frame.
+ BLINK_EXPORT static WebLocalFrame* frameForCurrentContext();
+
+ // Returns the frame corresponding to the given context. This can return 0
+ // if the context is detached from the frame, or if the context doesn't
+ // correspond to a frame (e.g., workers).
+ BLINK_EXPORT static WebLocalFrame* frameForContext(v8::Handle<v8::Context>);
+
+ // Returns the frame inside a given frame or iframe element. Returns 0 if
+ // the given element is not a frame, iframe or if the frame is empty.
+ BLINK_EXPORT static WebLocalFrame* fromFrameOwnerElement(const WebElement&);
+};
+
+} // namespace blink
+
#endif // WebLocalFrame_h
« Source/web/WebFrameImpl.h ('K') | « public/web/WebFrame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698