summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/user_script.h
Commit message (Collapse)AuthorAgeFilesLines
* Initial work on making extensions work in incognito mode.mpcomplete@chromium.org2010-02-111-1/+7
| | | | | | | | | | | | This merely adds a way to enable content scripts and browser actions in incognito windows. They still don't work properly because none of the APIs work with incognito tabs. The way to enable an extension is to add an "incognito" bit in the user prefs file. My plan is to add UI for this later. BUG=32365 Review URL: http://codereview.chromium.org/567037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38852 0039d316-1c4b-4281-b951-d872f2087c98
* linux: build with -Wextraevan@chromium.org2010-02-051-1/+1
| | | | | | | | | | | | 95% of this is removing "const" from return types, but turning this on found one bug! (A "for" loop that expected its iterator to go negative but which was using an unsigned type.) BUG=34160 Review URL: http://codereview.chromium.org/570012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38266 0039d316-1c4b-4281-b951-d872f2087c98
* Removing unnecessary includes.mad@chromium.org2010-01-281-1/+0
| | | | | | | | | BUG=0 TEST=none Review URL: http://codereview.chromium.org/549186 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37378 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce a new 'all_frames' property to content scripts andaa@chromium.org2009-11-251-1/+10
| | | | | | | | | | | default it to false. This should improve performance in sites that use frames and elimiate confusion, since in most cases developers *don't* expect content scripts to match frames. Review URL: http://codereview.chromium.org/412008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33035 0039d316-1c4b-4281-b951-d872f2087c98
* Add first class support for user scripts.aa@chromium.org2009-11-041-4/+51
| | | | | | | | | | | | Original review: http://codereview.chromium.org/340057 TBR=mpcomplete@chromium.org BUG=22103 TEST=Install a user script (such as from userscripts.org). You should get the extension install UI and the script should show up in the extension management UI. It should also work, though some scripts use Firefox-specific APIs and those won't work in Chromium. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30925 0039d316-1c4b-4281-b951-d872f2087c98
* Re-commit "Add new user script injection point:aa@chromium.org2009-11-031-3/+8
| | | | | | | | | | | document_idle." Original code review: http://codereview.chromium.org/339064 BUG=26126 TBR=rafaelw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30796 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r30784aa@chromium.org2009-11-031-8/+3
| | | | | | TBR=rafaelw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30787 0039d316-1c4b-4281-b951-d872f2087c98
* Add new user script injection point "document_idle" and make it the default.aa@chromium.org2009-11-031-3/+8
| | | | | | | | | | | | | 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
* Minimize dependency of user scripts.mad@chromium.org2009-10-201-10/+12
| | | | | | | | | | | And made some minor lint fixes and code refactoring on the way, based on CR comments of previous attempt. BUG=none TEST=Make sure that the extension resources can still be properly localized and that they also load correctly when they are not localized. Review URL: http://codereview.chromium.org/267051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29512 0039d316-1c4b-4281-b951-d872f2087c98
* Loads local resources from current locale subtree if available, if not it ↵cira@chromium.org2009-10-071-7/+10
| | | | | | | | | | | | | | | | | falls back to extension subtree. We look for ext_root/foo/bar.js under ext_root/_locales/fr/foo/bar.js if current locale is fr. If there is no fr specific resource we load ext_root/foo/bar.js instead. Lots of small refactoring to replace FilePath with ExtensionResource. BUG=12131 TEST=See unittest for sample tree. Review URL: http://codereview.chromium.org/256022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28333 0039d316-1c4b-4281-b951-d872f2087c98
* Move StringPiece into the base namespace. It is collidingtony@chromium.org2009-09-101-4/+4
| | | | | | | | | | with the StringPiece class in icu4.2, which is a problem when trying to use the system version of icu. Review URL: http://codereview.chromium.org/193072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25920 0039d316-1c4b-4281-b951-d872f2087c98
* Update of the extension install UI:aa@chromium.org2009-08-271-2/+4
| | | | | | | | | | | | | | | | | - Give the user more information about which hosts an extension can access. - Remove the red severe warning because it doesn't play well with themes and because it adds nothing when the other text is more specific. - Make the image a bit smaller. Also integrate this new idea with the silent/not-silent update flow. BUG=12129,12140,19582 Review URL: http://codereview.chromium.org/173463 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24599 0039d316-1c4b-4281-b951-d872f2087c98
* Small cleanup of constness.mad@google.com2009-06-181-2/+2
| | | | | | | | | | | | | Added const to methods not changing the state, except for the lazy setting of an escaped version of a path which is now mutable. Also made some lint fixes. BUG=none TEST=none Review URL: http://codereview.chromium.org/132024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18733 0039d316-1c4b-4281-b951-d872f2087c98
* Try one more time to check in http://codereview.chromium.org/60112aa@chromium.org2009-04-081-0/+9
| | | | | | | | | | | | Added this test to the list of skipped purify tests as it is experience the same issue as ExtensionView test. I also found an unrelated memory leak and created a patch separately: http://codereview.chromium.org/63073 Review URL: http://codereview.chromium.org/63075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13369 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Implement chromium.self in content scripts..."aa@chromium.org2009-04-071-9/+0
| | | | | | | | | | This reverts commit 61ab30f52667e739602ab2af4fd8f2d8a0a2a2f0. Still seeing memory errors. Review URL: http://codereview.chromium.org/63056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13243 0039d316-1c4b-4281-b951-d872f2087c98
* Implement chromium.self in content scripts, so that developers don'taa@chromium.org2009-04-071-0/+9
| | | | | | | | | | | | | | | | | | | | | have to know and copy/paste their extension ID. This required moving the code that defaults the extension ID earlier in the load process. Also fixed some bugs: * fixed a bug that was causing all user scripts to get executed in the same context. * made the greasemonkey api only available in 'standalone' user scripts. * re-added the anonymous function wrapper that is supposed to wrap content scripts. Also added unit tests for the fixed bugs. Review URL: http://codereview.chromium.org/60112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13238 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unneeded uses of base/pickle.h. Add some explicit #includes.thestig@chromium.org2009-04-031-1/+2
| | | | | | Review URL: http://codereview.chromium.org/60095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13093 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/42288georged@chromium.org2009-03-181-16/+70
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12016 0039d316-1c4b-4281-b951-d872f2087c98
* Add early-injection capability to user scripts.aa@chromium.org2009-02-141-1/+20
| | | | | | Review URL: http://codereview.chromium.org/19624 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9822 0039d316-1c4b-4281-b951-d872f2087c98
* Integrate URLPattern with Extension user scripts.aa@chromium.org2009-02-051-0/+74
Also refactored the UserScript class in UserScriptSlave and the UserScriptInfo structure in UserScriptMaster into a common location. Review URL: http://codereview.chromium.org/21070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9270 0039d316-1c4b-4281-b951-d872f2087c98