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

Unified Diff: Source/web/WebFrameImpl.h

Issue 117493002: Invert the owning relationship between WebFrame and Frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comment clarity? Created 7 years 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: Source/web/WebFrameImpl.h
diff --git a/Source/web/WebFrameImpl.h b/Source/web/WebFrameImpl.h
index 03eb06434022d5321dbfd51e08e16ac2858e60a6..8602f52e4b138f5736bd0ac174d1e0cdfc372e2f 100644
--- a/Source/web/WebFrameImpl.h
+++ b/Source/web/WebFrameImpl.h
@@ -35,7 +35,6 @@
#include "FrameLoaderClientImpl.h"
#include "core/frame/Frame.h"
-#include "core/frame/FrameDestructionObserver.h"
#include "platform/geometry/FloatRect.h"
#include "public/platform/WebFileSystemType.h"
#include "wtf/Compiler.h"
@@ -73,8 +72,7 @@ template <typename T> class WebVector;
// Implementation of WebFrame, note that this is a reference counted object.
class WebFrameImpl
: public WebFrame
- , public RefCounted<WebFrameImpl>
- , public WebCore::FrameDestructionObserver {
+ , public RefCounted<WebFrameImpl> {
public:
// WebFrame methods:
virtual void close();
@@ -237,8 +235,7 @@ public:
virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const;
virtual WebString layerTreeAsText(bool showDebugInfo = false) const;
- // WebCore::FrameDestructionObserver methods.
- virtual void willDetachFrameHost();
+ void willDetachParent();
static WebFrameImpl* create(WebFrameClient*);
// FIXME: Move the embedderIdentifier concept fully to the embedder and
@@ -301,6 +298,7 @@ public:
// Otherwise, disallow scrolling.
void setCanHaveScrollbars(bool);
+ WebCore::Frame* frame() const { return m_frame.get(); }
WebFrameClient* client() const { return m_client; }
void setClient(WebFrameClient* client) { m_client = client; }
@@ -340,7 +338,7 @@ private:
WebFrameImpl(WebFrameClient*, long long frame_identifier);
// Sets the local WebCore frame and registers destruction observers.
- void setWebCoreFrame(WebCore::Frame*);
+ void setWebCoreFrame(PassRefPtr<WebCore::Frame>);
// Notifies the delegate about a new selection rect.
void reportFindInPageSelection(
@@ -438,6 +436,9 @@ private:
};
RefPtr<WebFrameInit> m_frameInit;
+ // The cycle of madness.
eseidel 2013/12/21 01:17:34 Something a bit more informative. :)
dcheng 2013/12/28 01:04:29 Oops. This was a leftover comment from my initial
+ RefPtr<WebCore::Frame> m_frame;
+
WebFrameClient* m_client;
WebPermissionClient* m_permissionClient;
OwnPtr<SharedWorkerRepositoryClientImpl> m_sharedWorkerRepositoryClient;

Powered by Google App Engine
This is Rietveld 408576698