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

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

Issue 1041473002: Detach old frame on WebFrame::swap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | Source/core/frame/Frame.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/Frame.h
diff --git a/Source/core/frame/Frame.h b/Source/core/frame/Frame.h
index 2bdfd460cef7a7b0a9ae3e8bc800dc332a701d27..77ed43bfdf68fab5c7a64f7c273a3c2822b84595 100644
--- a/Source/core/frame/Frame.h
+++ b/Source/core/frame/Frame.h
@@ -55,6 +55,8 @@ class WindowProxy;
class WindowProxyManager;
struct FrameLoadRequest;
+enum class FrameDetachType { Remove, Swap };
+
// Status of user gesture.
enum class UserGestureStatus { Active, None };
@@ -76,7 +78,7 @@ public:
virtual void navigate(const FrameLoadRequest&) = 0;
virtual void reload(FrameLoadType, ClientRedirectPolicy) = 0;
- virtual void detach();
+ virtual void detach(FrameDetachType);
void detachChildren();
virtual void disconnectOwnerElement();
@@ -103,6 +105,12 @@ public:
Frame* findFrameForNavigation(const AtomicString& name, Frame& activeFrame);
Frame* findUnsafeParentScrollPropagationBoundary();
+ // This prepares the Frame for the next commit. It will detach children,
+ // dispatch unload events, abort XHR requests and detach the document.
+ // Returns true if the frame is ready to receive the next commit, or false
+ // otherwise.
+ virtual bool prepareForCommit() = 0;
+ void prepareSwapFrom(Frame*);
void finishSwapFrom(Frame*);
bool canNavigate(const Frame&);
« no previous file with comments | « no previous file | Source/core/frame/Frame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698