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
Showing
- chrome/browser/extensions/user_script_master.cc 5 additions, 0 deletionschrome/browser/extensions/user_script_master.cc
- chrome/chrome.gyp 2 additions, 0 deletionschrome/chrome.gyp
- chrome/common/extensions/docs/content_scripts.html 18 additions, 1 deletionchrome/common/extensions/docs/content_scripts.html
- chrome/common/extensions/docs/static/content_scripts.html 18 additions, 1 deletionchrome/common/extensions/docs/static/content_scripts.html
- chrome/common/extensions/extension.cc 2 additions, 0 deletionschrome/common/extensions/extension.cc
- chrome/common/extensions/extension_constants.cc 1 addition, 0 deletionschrome/common/extensions/extension_constants.cc
- chrome/common/extensions/extension_constants.h 1 addition, 0 deletionschrome/common/extensions/extension_constants.h
- chrome/common/extensions/user_script.h 8 additions, 3 deletionschrome/common/extensions/user_script.h
- chrome/common/extensions/user_script_unittest.cc 1 addition, 1 deletionchrome/common/extensions/user_script_unittest.cc
- chrome/renderer/navigation_state.h 11 additions, 1 deletionchrome/renderer/navigation_state.h
- chrome/renderer/render_view.cc 52 additions, 21 deletionschrome/renderer/render_view.cc
- chrome/renderer/render_view.h 9 additions, 0 deletionschrome/renderer/render_view.h
- chrome/renderer/user_script_idle_scheduler.cc 47 additions, 0 deletionschrome/renderer/user_script_idle_scheduler.cc
- chrome/renderer/user_script_idle_scheduler.h 58 additions, 0 deletionschrome/renderer/user_script_idle_scheduler.h
- chrome/test/data/extensions/good/Extensions/bjafgdebaacbbbecmhlhpofkepfkgcpa/1.0/page.js 17 additions, 21 deletions...d/Extensions/bjafgdebaacbbbecmhlhpofkepfkgcpa/1.0/page.js
Loading
Please register or sign in to comment