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

Unified Diff: third_party/WebKit/Source/web/AssociatedURLLoader.h

Issue 1862073002: Let AssociatedURLLoader listen to destruction of the Document used for loading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed #37 Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/AssociatedURLLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/AssociatedURLLoader.h
diff --git a/third_party/WebKit/Source/web/AssociatedURLLoader.h b/third_party/WebKit/Source/web/AssociatedURLLoader.h
index 4f22667855cf4999bb79e569a1d85b6fbfec67a1..eb884dbc866a7d9fe6d1e990fa231c3a3e5e513f 100644
--- a/third_party/WebKit/Source/web/AssociatedURLLoader.h
+++ b/third_party/WebKit/Source/web/AssociatedURLLoader.h
@@ -57,15 +57,26 @@ public:
void setDefersLoading(bool) override;
void setLoadingTaskRunner(blink::WebTaskRunner*) override;
-private:
+ // Called by |m_observer| to handle destruction of the Document associated
+ // with the frame given to the constructor.
+ void documentDestroyed();
+ void disposeObserver();
+private:
class ClientAdapter;
+ class Observer;
- Persistent<WebLocalFrameImpl> m_frameImpl;
- WebURLLoaderOptions m_options;
WebURLLoaderClient* m_client;
+ WebURLLoaderOptions m_options;
+
+ // An adapter which converts the DocumentThreadableLoaderClient method
+ // calls into the WebURLLoaderClient method calls.
OwnPtr<ClientAdapter> m_clientAdapter;
OwnPtr<DocumentThreadableLoader> m_loader;
+
+ // A ContextLifecycleObserver for cancelling |m_loader| when the Document
+ // is detached.
+ Persistent<Observer> m_observer;
};
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/AssociatedURLLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698