summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/extensions
Commit message (Collapse)AuthorAgeFilesLines
* Refactoring of the chrome.experimental.popup API implementation to allow ↵twiz@google.com2009-11-161-3/+3
| | | | | | | | | | | | | | | | display of pop-ups for extensions viewed through a tab-contents view.I added a new class, ExtensionPopupHost. This class implements the necessary environment for managing child popup windows from either an ExtensionHost, or an ExtensionDOMUI. Note that this class is added as a member to ExtensionHost and ExtensionDOMUI. I decided to take this approach to prevent multiple inheritance of the NotificationObserver class: Both ExtensionPopupHost and ExtensionHost must inherit from this class, and I was uncertain of how the system would behave wrt virtual inheritance. Please comment on if I should have used the inheritance approach. I also removed the customHandler tag (in extension_api.json) that I had added in the initial submission. The arguments in the schema are now those that users of the API see. The nodocs tags were also removed. The api experimental.popup.getAnchorWindow() has been renamed to popup.getParentWindow, as per a suggestion from Erik K. BUG=none TEST=extension_popup_apitest.cc Review URL: http://codereview.chromium.org/385061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32120 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes almost all of the rest of lint errors in the chrome/ directory (minus ↵erg@google.com2009-11-132-2/+2
| | | | | | | | the really hard ones which will need actual review instead of rubber-stamping.) Review URL: http://codereview.chromium.org/386026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31932 0039d316-1c4b-4281-b951-d872f2087c98
* Upstreaming WebKit.gypyaar@chromium.org2009-11-123-8/+8
| | | | | | | | | | | | This mega patch contains a few simple but tightly dependent changes: 1. Deletion of webkit/api/WebKit.gyp. The file now lives in webkit.org. 2. Rename of webkit/webkit.gyp to webkit/webkit_glue.gyp. Having two webkit.gyp was a source of developer confusion. 3. Gyp dependencies are updated across chromium to point at the upstream WebKit.gyp and the renamed webkit_glue.gyp. 4. Some 200+ files include paths fixed to point to third_party/WebKit/WebKit/chromium instead of webkit/api. The later will be deleted in a subsequent patch. Review URL: http://codereview.chromium.org/387020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31749 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up extension message port data in the renderer.mpcomplete@chromium.org2009-11-031-3/+18
| | | | | | | | BUG=26262 Review URL: http://codereview.chromium.org/344044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30884 0039d316-1c4b-4281-b951-d872f2087c98
* Submitting change from http://codereview.chromium.org/276029/showmad@chromium.org2009-11-031-12/+80
| | | | | | | | BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30778 0039d316-1c4b-4281-b951-d872f2087c98
* Convert ReplaceStringPlaceholders(std::string...) to take atony@chromium.org2009-10-291-5/+5
| | | | | | | | | | | | | | StringPiece as the format string instead. This allows us to save a string copy in the new tab page. Also clean up some code in the extensions process binding that was doing excess string conversions. BUG=26228 Review URL: http://codereview.chromium.org/347019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30491 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor BrowserActions, and add support foraa@chromium.org2009-10-241-2/+5
| | | | | | | | | | | | | | | | | tab-specific state. Future changelists will move Page Actions over to ExtensionAction2, then replace ExtensionAction and ExtensionActionState with ExtensionAction2. Also, fix a bug in setIcon({path:...}) where it would work only the first time. BUG=24669,24472 Review URL: http://codereview.chromium.org/306044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29997 0039d316-1c4b-4281-b951-d872f2087c98
* Fix premultiplication mismatch inaa@chromium.org2009-10-241-2/+3
| | | | | | | | | | | | | | | chrome.browserAction.setIcon(). SkBitmap expects premultiplied values, canvas returns them not premultiplied. BUG=24643 TEST=install gmail browser action sample. Should not have weird colorful artifacts around edges. Review URL: http://codereview.chromium.org/333011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29996 0039d316-1c4b-4281-b951-d872f2087c98
* Move the json-related files into a separate json directory. This hopefully alsobrettw@chromium.org2009-10-232-6/+6
| | | | | | | | | | | makes the naming of string_escape more clear (it's actually JSON-specific). Move the files into the base namespace. TEST=none BUG=none Review URL: http://codereview.chromium.org/316016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29934 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce WebSecurityPolicy for security related methods.mhm@chromium.org2009-10-221-1/+3
| | | | | | | | | | | | | | | | | Move security related methods out of WebKit.h into its own class WebSecurityPolicy. This involves these functions: - registerURLSchemeAsLocal - registerURLSchemeAsNoAccess - whiteListAccessFromOrigin - resetOriginAccessWhiteLists BUG=24601 TEST=Compiled locally, try bot'ed. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29639 Review URL: http://codereview.chromium.org/293021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29758 0039d316-1c4b-4281-b951-d872f2087c98
* TBR: darinmhm@chromium.org2009-10-211-3/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29642 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce WebSecurityPolicy for security related methods.mhm@chromium.org2009-10-211-1/+3
| | | | | | | | | | | | | | | Move security related methods out of WebKit.h into its own class WebSecurityPolicy. This involves these functions: - registerURLSchemeAsLocal - registerURLSchemeAsNoAccess - whiteListAccessFromOrigin - resetOriginAccessWhiteLists BUG=24601 TEST=Compiled locally, try bot'ed. Review URL: http://codereview.chromium.org/293021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29639 0039d316-1c4b-4281-b951-d872f2087c98
* Delete glue/webview{_delegate}.hdarin@chromium.org2009-10-193-1/+6
| | | | | | | | | | R=dglazkov BUG=10033 TEST=none Review URL: http://codereview.chromium.org/293001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29390 0039d316-1c4b-4281-b951-d872f2087c98
* Implement new page action API.mpcomplete@chromium.org2009-10-161-7/+11
| | | | | | | | | | | Still no actual drawing code for badges, though. BUG=24635 TEST=Load the sample test_page_action extension and click the page action to cycle through various states. Review URL: http://codereview.chromium.org/269079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29335 0039d316-1c4b-4281-b951-d872f2087c98
* Update browser actions api to be like new design doc.aa@chromium.org2009-10-151-1/+3
| | | | | | | | | BUG=23879 TEST=Install sample gmail browser action sample. Review URL: http://codereview.chromium.org/264046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29068 0039d316-1c4b-4281-b951-d872f2087c98
* Implement chrome.extension.connectExternal and fix various API inconsistencies.mpcomplete@chromium.org2009-10-092-4/+12
| | | | | | | | | | BUG=23583 BUG=17910 TEST=no Review URL: http://codereview.chromium.org/262016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28565 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate WebView::GetDelegate and replace RenderViewSet with a map fromdarin@chromium.org2009-10-093-61/+78
| | | | | | | | | | | | WebView to RenderView. R=mpcomplete BUG=10033 TEST=none Review URL: http://codereview.chromium.org/265044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28515 0039d316-1c4b-4281-b951-d872f2087c98
* Fix memory leak in ExtensionAPIClientTest.mpcomplete@chromium.org2009-10-061-2/+2
| | | | | | TBR=aa git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28151 0039d316-1c4b-4281-b951-d872f2087c98
* Implement browserAction.setIcon(ImageData) for extensions.mpcomplete@chromium.org2009-10-061-20/+67
| | | | | | | | | BUG=23269 TEST=load the test_browser_action sample extension, and click the browser action. Watch it dynamically update. Review URL: http://codereview.chromium.org/242150 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28136 0039d316-1c4b-4281-b951-d872f2087c98
* Modify extension request IPC messages to pass a ListValue instead of a string.mpcomplete@chromium.org2009-10-062-3/+28
| | | | | | | | | | | | This allows us to pass binary values through extension requests. I use this in my next CL to pass SkBitmaps. BUG=23269 TEST=no Review URL: http://codereview.chromium.org/251093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28130 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up webkit/api/public/WebView.hdarin@chromium.org2009-09-301-4/+4
| | | | | | | | | | | | | | This change does not completely eliminate webkit/glue/webview.h. Instead, the old WebView extends from the new WebView temporarily as we complete the transition. R=dglazkov BUG=10033 TEST=none Review URL: http://codereview.chromium.org/257001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27620 0039d316-1c4b-4281-b951-d872f2087c98
* Use the current frame's URL when initializing the extension framework for a ↵mpcomplete@chromium.org2009-09-291-5/+4
| | | | | | | | | | | | | frame. Previously we were using the toplevel frame's URL. BUG=22658 TEST=no Review URL: http://codereview.chromium.org/249026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27440 0039d316-1c4b-4281-b951-d872f2087c98
* Implementing chrome.i18n.getMessage call, that loads message from the ↵cira@chromium.org2009-09-283-2/+108
| | | | | | | | | | | | | | | | | | | extension catalog, and if necessary replaces placeholders (up to 9). I have 3 forms of getMessage call: getMessage("name") for simple messages without placeholders. getMessage("name", "one param") for messages with only one placeholder. getMessage("name", ["one", "two"]) for messages with only one or more placeholders. getMessage returns string. BUG=12131 TEST=Load samples/i18n extension (switch Chrome to sr locale) and observe ext. name, description and toolstrip texts should be in Serbian. Review URL: http://codereview.chromium.org/225009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27393 0039d316-1c4b-4281-b951-d872f2087c98
* Force garbage collection after running any unit tests that initialize WebViews.jorlow@chromium.org2009-09-251-14/+11
| | | | | | | | | | | | | It's quite possible that we just plain shouldn't allow any unit tests to initialize WebKit for philosophical and theoretical reasons. But this does seem to work, so I guess we should just go this route for now. BUG=22971 TEST=none Review URL: http://codereview.chromium.org/240001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27239 0039d316-1c4b-4281-b951-d872f2087c98
* Disable the json_schema_unittest since it crashes after a WebKit deps roll.jorlow@chromium.org2009-09-241-12/+14
| | | | | | | | | | TBR=nsylvain TEST=Unit tests now work. BUG=22971 Review URL: http://codereview.chromium.org/231024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27144 0039d316-1c4b-4281-b951-d872f2087c98
* Change the view mode when switching between moles and toolstrips, anderikkay@chromium.org2009-09-192-2/+53
| | | | | | | | | | | | | | propogate this into the class of the document element so that it's possible to use CSS rules to control the display of your toolstrip/mole. BUG=21939,15494 TEST=run the Mappy extension and verify it can open and close Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=26635 Review URL: http://codereview.chromium.org/208020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26654 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 26635 - Change the view mode when switching between moles and ↵mbelshe@google.com2009-09-182-53/+2
| | | | | | | | | | | | | | | | | | toolstrips, and propogate this into the class of the document element so that it's possible to use CSS rules to control the display of your toolstrip/mole. BUG=21939,15494 TEST=run the Mappy extension and verify it can open and close Review URL: http://codereview.chromium.org/208020 TBR=erikkay@chromium.org Review URL: http://codereview.chromium.org/210024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26636 0039d316-1c4b-4281-b951-d872f2087c98
* Change the view mode when switching between moles and toolstrips, anderikkay@chromium.org2009-09-182-2/+53
| | | | | | | | | | | | propogate this into the class of the document element so that it's possible to use CSS rules to control the display of your toolstrip/mole. BUG=21939,15494 TEST=run the Mappy extension and verify it can open and close Review URL: http://codereview.chromium.org/208020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26635 0039d316-1c4b-4281-b951-d872f2087c98
* ExtensionAPIClientTest.GetLastFocusedWindow is flakymaruel@chromium.org2009-09-181-1/+2
| | | | | | | | | TBR=rafaelw TEST=ExtensionAPIClientTest.GetLastFocusedWindow in unit_tests BUG=22248 Review URL: http://codereview.chromium.org/207029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26565 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bug where content scripts can get GC'd if they don'taa@chromium.org2009-09-143-7/+34
| | | | | | | | | | | attach to any DOM events. BUG=17410 TEST=none Review URL: http://codereview.chromium.org/200116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26136 0039d316-1c4b-4281-b951-d872f2087c98
* add mole collapse/expand events. convert mappy to use this.erikkay@chromium.org2009-09-111-0/+9
| | | | | | | | | BUG=15494 TEST=browser_tests.exe --gtest_filter=ExtensionApiTest.Toolstrip Review URL: http://codereview.chromium.org/203023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25976 0039d316-1c4b-4281-b951-d872f2087c98
* Added chrome.i18n extension API.xji@chromium.org2009-09-091-0/+16
| | | | | | | | | | | | | | | | | | The API proposal doc is http://sites.google.com/a/chromium.org/dev/developers/design-documents/extensions/i18n-api This CL only adds the getter of accept languages: chrome.i18n.getAcceptLanguages(). The setter of accept languages will be added in a separate CL. BUG=http://crbug.com/14574 TEST=TEST=There is an extension in chrome\test\data\extensions\samples\i18n. Load this extension. It creates a toolstrip button. Click this button, you should get chrome's accept languages. Review URL: http://codereview.chromium.org/174116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25810 0039d316-1c4b-4281-b951-d872f2087c98
* share extension API test frameworkerikkay@chromium.org2009-08-313-0/+16
| | | | | | | | | BUG=18442 TEST=ExtensionApiTest.* Review URL: http://codereview.chromium.org/173622 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24892 0039d316-1c4b-4281-b951-d872f2087c98
* Make a bunch of backlogged breaking changes to the extensions API in prep ↵aa@chromium.org2009-08-281-27/+1
| | | | | | | | | | | | | | | for dev: * Enforce permissions on cross-origin XHR * Enforce module-level permissions * Decided not to completely remove chrome.self since it is so widely used, but removed all references to it from samples and docs. BUG=16356,12129,12140 TEST=Sample extensions on http://dev.chromium.org/developers/design-documents/extensions/samples should still work Review URL: http://codereview.chromium.org/179027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24816 0039d316-1c4b-4281-b951-d872f2087c98
* Extension API Renaming/Consistency changesrafaelw@chromium.org2009-08-281-21/+35
| | | | | | | | BUG=20288 Review URL: http://codereview.chromium.org/180016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24770 0039d316-1c4b-4281-b951-d872f2087c98
* Try again to commit r24174: Change the way json_schema.js is loaded.aa@chromium.org2009-08-255-5/+69
| | | | | | TBR=mpcomplete@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24224 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r24217.aa@chromium.org2009-08-254-56/+2
| | | | | | TBR=mpcomplete@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24218 0039d316-1c4b-4281-b951-d872f2087c98
* Change the way json_schema.js is loaded. This is required soaa@chromium.org2009-08-254-2/+56
| | | | | | | | | | that ChromeOS can use extension-style bindings without polluting the global scope of webpages. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=24174 Review URL: http://codereview.chromium.org/173263 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24217 0039d316-1c4b-4281-b951-d872f2087c98
* Revert breakage from r24174.aa@chromium.org2009-08-243-55/+1
| | | | | | TBR=tony@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24175 0039d316-1c4b-4281-b951-d872f2087c98
* Change the way json_schema.js is loaded. This is required soaa@chromium.org2009-08-243-1/+55
| | | | | | | | that ChromeOS can use extension-style bindings without polluting the global scope of webpages. Review URL: http://codereview.chromium.org/173263 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24174 0039d316-1c4b-4281-b951-d872f2087c98
* Implement granular cross-origin XHR for extensions.aa@chromium.org2009-08-232-5/+28
| | | | | | | | | | | | | I left the temporary hack that allows all origins until we are ready to break everything all at once. Also, I still need to devise some way to test this. BUG=12129 Review URL: http://codereview.chromium.org/173166 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24089 0039d316-1c4b-4281-b951-d872f2087c98
* Validation of extension api callbacks and event parameters in DEBUGrafaelw@chromium.org2009-08-226-13/+49
| | | | | | | | BUG=18711 Review URL: http://codereview.chromium.org/173034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24068 0039d316-1c4b-4281-b951-d872f2087c98
* Async extension callbacks now always fire and set chrome.extension.lastError ↵rafaelw@chromium.org2009-08-181-1/+1
| | | | | | | | | | | | on error. Includes doc changes for extension.lastError and a browsertest. BUG=17381 Review URL: http://codereview.chromium.org/172078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23676 0039d316-1c4b-4281-b951-d872f2087c98
* Implementation of getBackgroundPage(), getToolstrips(), andaa@chromium.org2009-08-142-17/+61
| | | | | | | | | | | | | | | getTabContentses(). This lands http://codereview.chromium.org/159067. Raf, the only thing you need to look at is the changes to extensions_process_bindings.js and extension_api.json. BUG=13577 TEST=Browser tests added Review URL: http://codereview.chromium.org/164458 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23422 0039d316-1c4b-4281-b951-d872f2087c98
* I have taken over this patch, original authored by Adam Hunter (adamhunter).rafaelw@chromium.org2009-08-131-0/+12
| | | | | | | | | | | | | | | | | | | | | | | The original issue is: http://codereview.chromium.org/144019 -------------- Functionality has been requested in the Extension API for Javascript to take screenshots of the currently visible tab. This changelist builds this function, chrome.tabs.getVisibleScreenCapture. This function takes a single callback function and returns to that function a data URL of a JPEG image of the current screen. A simple sample extension is provided as a use case. BUG=14760 TEST=There is an extension in chrome\test\data\extensions\samples\screenshot, load this extension. It creates a toolstrip button. Click this button, you should get a page with a screenshot of the active tab. The API function is found at chrome.tabs.getVisibleScreenCapture. Review URL: http://codereview.chromium.org/160228 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23259 0039d316-1c4b-4281-b951-d872f2087c98
* Allow extensions to use APIs that they didn't ask permission to use.mpcomplete@chromium.org2009-08-122-2/+12
| | | | | | | | | BUG=no TEST=no Review URL: http://codereview.chromium.org/165408 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23245 0039d316-1c4b-4281-b951-d872f2087c98
* Switch to WebFrame from the WebKit API.darin@chromium.org2009-08-105-19/+25
| | | | | | | | | | | | | | | I tried to avoid unnecessary changes in this CL to help make it easier to review. As part of this CL, glue/webtextinput* are folded into WebFrame / WebFrameImpl. R=dglazkov BUG=10034 TEST=none Review URL: http://codereview.chromium.org/164225 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22896 0039d316-1c4b-4281-b951-d872f2087c98
* Add module-level permissions to extensions.mpcomplete@chromium.org2009-08-073-14/+128
| | | | | | | | | | | | | | This first pass is fairly simple. If a permission is not specified in the manifest, the corresponding module will not be exposed to script. For example, without specifying the "tabs" permission, chrome.tabs and chrome.windows will not be available. BUG=12140 TEST=no Review URL: http://codereview.chromium.org/164039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22745 0039d316-1c4b-4281-b951-d872f2087c98
* Support for referenced schema types in json_schema.rafaelw@chromium.org2009-08-051-0/+5
| | | | | | | | Schema types can be referenced with "$ref" to either internal types or explicitly added types via addTypes() that define their typename via an "id" property. Review URL: http://codereview.chromium.org/159868 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22451 0039d316-1c4b-4281-b951-d872f2087c98
* mole API - take 2erikkay@chromium.org2009-08-041-0/+41
| | | | | | | | | | originally reviewed / committed as http://codereview.chromium.org/160276 TBR=mpcomplete,phadjan.jr Review URL: http://codereview.chromium.org/159854 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22382 0039d316-1c4b-4281-b951-d872f2087c98