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

Unified Diff: third_party/WebKit/public/web/WebFrameClient.h

Issue 1642283002: Deal with frame removal by content scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add more runScriptsAtDocumentElementAvailable + comments 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: third_party/WebKit/public/web/WebFrameClient.h
diff --git a/third_party/WebKit/public/web/WebFrameClient.h b/third_party/WebKit/public/web/WebFrameClient.h
index ae7dddebe25e41584e6f67d3548510559247d4b3..650df9035fcc467505f8696c5a3ec842d4a84806 100644
--- a/third_party/WebKit/public/web/WebFrameClient.h
+++ b/third_party/WebKit/public/web/WebFrameClient.h
@@ -297,8 +297,13 @@ public:
virtual void didClearWindowObject(WebLocalFrame* frame) { }
// The document element has been created.
+ // This method may not invalidate the frame, nor execute JavaScript code.
virtual void didCreateDocumentElement(WebLocalFrame*) { }
+ // Like |didCreateDocumentElement|, except this method may run JavaScript
+ // code (and possibly invalidate the frame).
+ virtual void runScriptsAtDocumentElementAvailable(WebLocalFrame*) { }
+
// The page title is available.
virtual void didReceiveTitle(WebLocalFrame* frame, const WebString& title, WebTextDirection direction) { }
@@ -306,8 +311,13 @@ public:
virtual void didChangeIcon(WebLocalFrame*, WebIconURL::Type) { }
// The frame's document finished loading.
+ // This method may not execute JavaScript code.
virtual void didFinishDocumentLoad(WebLocalFrame*, bool documentIsEmpty) { }
+ // Like |didFinishDocumentLoad|, except this method may run JavaScript
+ // code (and possibly invalidate the frame).
+ virtual void runScriptsAtDocumentReady(WebLocalFrame*) { }
+
// The 'load' event was dispatched.
virtual void didHandleOnloadEvents(WebLocalFrame*) { }

Powered by Google App Engine
This is Rietveld 408576698