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

Unified Diff: public/web/WebFrame.h

Issue 23506013: Make the embedder responsible for creating the WebFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add WebViewHelper for unittests. Created 7 years, 3 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
Index: public/web/WebFrame.h
diff --git a/public/web/WebFrame.h b/public/web/WebFrame.h
index 211def68aed06bc968232765d3d6b6d4962f7ed1..07b62e8a32e7f298c27763f8ca6331ee2ac86a08 100644
--- a/public/web/WebFrame.h
+++ b/public/web/WebFrame.h
@@ -59,6 +59,7 @@ class WebDataSource;
class WebDocument;
class WebElement;
class WebFormElement;
+class WebFrameClient;
class WebHistoryItem;
class WebInputElement;
class WebPerformance;
@@ -92,6 +93,21 @@ public:
};
typedef unsigned RenderAsTextControls;
+ // Creates a WebFrame with a self references. Call close() to release
+ // this reference. It is valid to pass null client pointers.
+ WEBKIT_EXPORT static WebFrame* create(WebFrameClient*);
+
+ // Same as create(WebFrameClient*) except the embedder may explicitly pass
+ // in the identifier for the WebFrame. This can be used with
+ // generateFrameIdentifier() if constructing the WebFrameClient for this
+ // frame requires the identifier.
+ WEBKIT_EXPORT static WebFrame* create(WebFrameClient*,
+ long long identifier);
+
+ // Generates an identifier suitable for use with create() above.
+ // Never returns -1.
+ WEBKIT_EXPORT static long long generateFrameIdentifier();
+
// Returns the number of live WebFrame objects, used for leak checking.
WEBKIT_EXPORT static int instanceCount();
@@ -110,6 +126,9 @@ public:
WEBKIT_EXPORT static WebFrame* fromFrameOwnerElement(const WebElement&);
+ // This method closes and deletes the WebFrame.
+ virtual void close() = 0;
darin (slow to review) 2013/09/13 04:02:47 nit: two new lines below, one new line above.
+
// Basic properties ---------------------------------------------------
// The unique name of this frame.

Powered by Google App Engine
This is Rietveld 408576698