| Index: extensions/renderer/extension_frame_helper.h
|
| diff --git a/extensions/renderer/extension_frame_helper.h b/extensions/renderer/extension_frame_helper.h
|
| index 518e9ca48510fd5edeab686658f27449acf1ec90..d4fc8d6ad21e885f6c9ce21f9c48597acdaa8bad 100644
|
| --- a/extensions/renderer/extension_frame_helper.h
|
| +++ b/extensions/renderer/extension_frame_helper.h
|
| @@ -73,6 +73,9 @@ class ExtensionFrameHelper
|
| // Called after the DOMContentLoaded event has fired.
|
| void RunScriptsAtDocumentEnd();
|
|
|
| + // Called before the window.onload event is fired.
|
| + void RunScriptsAtDocumentIdle();
|
| +
|
| // Schedule a callback, to be run at the next RunScriptsAtDocumentStart
|
| // notification. Only call this when you are certain that there will be such a
|
| // notification, e.g. from RenderFrameObserver::DidCreateDocumentElement.
|
| @@ -83,6 +86,9 @@ class ExtensionFrameHelper
|
| // Schedule a callback, to be run at the next RunScriptsAtDocumentEnd call.
|
| void ScheduleAtDocumentEnd(const base::Closure& callback);
|
|
|
| + // Schedule a callback, to be run at the next RunScriptsAtDocumentIdle call.
|
| + void ScheduleAtDocumentIdle(const base::Closure& callback);
|
| +
|
| private:
|
| // RenderFrameObserver implementation.
|
| void DidCreateDocumentElement() override;
|
| @@ -142,6 +148,9 @@ class ExtensionFrameHelper
|
| // Callbacks to be run at the next RunScriptsAtDocumentEnd notification.
|
| std::vector<base::Closure> document_load_finished_callbacks_;
|
|
|
| + // Callbacks to be run at the next RunScriptsAtDocumentIdle notification.
|
| + std::vector<base::Closure> document_idle_callbacks_;
|
| +
|
| bool delayed_main_world_script_initialization_ = false;
|
|
|
| base::WeakPtrFactory<ExtensionFrameHelper> weak_ptr_factory_;
|
|
|