diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-03 01:29:39 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-03 01:29:39 +0000 |
commit | 5442dafd85700e323fe6c332eeec0f17de6f7891 (patch) | |
tree | 9e065d301222177c4371e0522424deb8f07ba488 /chrome/renderer/render_view.h | |
parent | 40fc8b766191d37dbcbcb67894d233da2899821c (diff) | |
download | chromium_src-5442dafd85700e323fe6c332eeec0f17de6f7891.zip chromium_src-5442dafd85700e323fe6c332eeec0f17de6f7891.tar.gz chromium_src-5442dafd85700e323fe6c332eeec0f17de6f7891.tar.bz2 |
Add new user script injection point "document_idle" and make it the default.
Semantically, document-idle means "when the DOM is ready and layout has been idle for awhile", or more loosely, "as soon as we get around to it".
Right now this uses a simple heuristic. It injects scripts 200ms after DOMContentLoaded, or immediately after onload, whichever happens first.
BUG=26126
TEST=Manual. Extensions with content scripts should work.
Review URL: http://codereview.chromium.org/339064
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30784 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_view.h')
-rw-r--r-- | chrome/renderer/render_view.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index 900cb2c..814d8bd 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -435,6 +435,10 @@ class RenderView : public RenderWidget, // Sends a message and runs a nested message loop. bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message); + // Called when the "idle" user script state has been reached. See + // UserScript::DOCUMENT_IDLE. + void OnUserScriptIdleTriggered(WebKit::WebFrame* frame); + protected: // RenderWidget overrides: virtual void Close(); @@ -620,6 +624,11 @@ class RenderView : public RenderWidget, const std::string& extension_id, bool is_js_code, const std::string& code_string); + void ExecuteCodeImpl(WebKit::WebFrame* frame, + int request_id, + const std::string& extension_id, + bool is_js_code, + const std::string& code_string); void OnUpdateBackForwardListCount(int back_list_count, int forward_list_count); void OnGetAccessibilityInfo( |