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

Unified Diff: content/public/renderer/content_renderer_client.h

Issue 1642283002: Deal with frame removal by content scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add AfterDidCreateDocumentElement/AfterDidFinishDocumentLoad Created 4 years, 10 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: content/public/renderer/content_renderer_client.h
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index 241d95b535d65e592f5c9c4bb5faa36588d9b09c..cd1d1fc69603bebca36bc8d0ecef31e526fb5051 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -305,6 +305,17 @@ class CONTENT_EXPORT ContentRendererClient {
const blink::WebURLResponse& response,
std::map<std::string, std::string>* properties) {}
+ // Notifies that a document element has been inserted in the frame's document.
+ // This may be called multiple times for the same document. This method may
+ // invalidate the frame, which resets the weak pointer.
+ virtual void AfterDidCreateDocumentElement(
nasko 2016/02/11 16:49:01 Why the "After" prefix? It is called from DidCreat
robwu 2016/02/11 17:51:08 It is called after the DidCreateDocumentElement ob
+ const base::WeakPtr<RenderFrame>& render_frame) {}
+
+ // Notifies that the DOM is ready in the frame's document.
+ // This method may invalidate the frame, which resets the weak pointer.
+ virtual void AfterDidFinishDocumentLoad(
+ const base::WeakPtr<RenderFrame>& render_frame) {}
+
// Notifies that a service worker context has been created. This function
// is called from the worker thread.
virtual void DidInitializeServiceWorkerContextOnWorkerThread(

Powered by Google App Engine
This is Rietveld 408576698