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

Unified Diff: Source/core/frame/LocalFrame.h

Issue 1017313002: Simplify handling of LocalFrame lifecycle notifications. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: clear context on FDO::contextDestroyed() Created 5 years, 9 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: Source/core/frame/LocalFrame.h
diff --git a/Source/core/frame/LocalFrame.h b/Source/core/frame/LocalFrame.h
index d6af547171633d3b8ab5e9dec57a0658a02407a7..7cfab94a86221cecb18853bdb0d33165d2102dca 100644
--- a/Source/core/frame/LocalFrame.h
+++ b/Source/core/frame/LocalFrame.h
@@ -30,6 +30,8 @@
#include "core/CoreExport.h"
#include "core/frame/Frame.h"
+#include "core/frame/FrameDestructionObserver.h"
+#include "core/frame/LocalFrameLifecycleNotifier.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/NavigationScheduler.h"
#include "core/page/FrameTree.h"
@@ -50,7 +52,6 @@ namespace blink {
class EventHandler;
class FloatSize;
class FrameConsole;
- class FrameDestructionObserver;
class FrameSelection;
class FrameView;
class HTMLPlugInElement;
@@ -68,7 +69,7 @@ namespace blink {
class TreeScope;
class VisiblePosition;
- class CORE_EXPORT LocalFrame : public Frame, public WillBeHeapSupplementable<LocalFrame> {
+ class CORE_EXPORT LocalFrame : public Frame, public LocalFrameLifecycleNotifier, public WillBeHeapSupplementable<LocalFrame> {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(LocalFrame);
public:
static PassRefPtrWillBeRawPtr<LocalFrame> create(FrameLoaderClient*, FrameHost*, FrameOwner*);
@@ -93,9 +94,6 @@ namespace blink {
void printNavigationErrorMessage(const Frame&, const char* reason) override;
bool isLoadingAsChild() const override;
- void addDestructionObserver(FrameDestructionObserver*);
- void removeDestructionObserver(FrameDestructionObserver*);
-
void willDetachFrameHost();
LocalDOMWindow* localDOMWindow() const;
@@ -193,7 +191,6 @@ namespace blink {
// The rect is in the coordinate space of the frame.
PassOwnPtr<DragImage> paintIntoDragImage(DisplayItemClient, DisplayItem::Type, RespectImageOrientationEnum shouldRespectImageOrientation, IntRect paintingRect);
- WillBeHeapHashSet<RawPtrWillBeWeakMember<FrameDestructionObserver>> m_destructionObservers;
mutable FrameLoader m_loader;
mutable NavigationScheduler m_navigationScheduler;

Powered by Google App Engine
This is Rietveld 408576698