summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/resources
Commit message (Collapse)AuthorAgeFilesLines
* Pull out synchronous extension apis to extensions_api.json, add custom ↵rafaelw@chromium.org2009-07-271-54/+73
| | | | | | | | | | handling for calls R=aa Review URL: http://codereview.chromium.org/160129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21703 0039d316-1c4b-4281-b951-d872f2087c98
* Fix port disconnect so that it's refcounted. This fixes a bug where a channelmpcomplete@chromium.org2009-07-271-1/+4
| | | | | | | | | | | would close if any one listener on the channel called "disconnect()". BUG=16644 TEST=no Review URL: http://codereview.chromium.org/155476 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21678 0039d316-1c4b-4281-b951-d872f2087c98
* Push bookmarks.remove/removeAll polymorphism into c++. fix bookmarks id ↵rafaelw@chromium.org2009-07-241-26/+0
| | | | | | | | | | | schema issues (http://code.google.com/p/chromium/issues/detail?id=17562 failed to update schema types from int to string). R=erikkay BUG=17417 Review URL: http://codereview.chromium.org/160064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21503 0039d316-1c4b-4281-b951-d872f2087c98
* Step 2 in abstracting Extension APIs to shared "IDL".rafaelw@chromium.org2009-07-222-443/+81
| | | | | | | | | | In this step, all "normal" async extension apis have been pulled out into extension_api.json which is loaded in the renderer, and dynamic bindings are created for extension functions & events in extension_process_bindings.js. R=aa Review URL: http://codereview.chromium.org/155741 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21313 0039d316-1c4b-4281-b951-d872f2087c98
* Changed the extension.connect() API not to broadcast to all tabs. Added ampcomplete@chromium.org2009-07-201-1/+13
| | | | | | | | | | | | | more specific tabs.connect(tabId) API to connect to a specific tab. Also changed the ExtensionMessageService from a singleton to a Profile-owned object. BUG=12461 TEST=no Review URL: http://codereview.chromium.org/155707 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21102 0039d316-1c4b-4281-b951-d872f2087c98
* Fix merge error (benign) from r20910rafaelw@chromium.org2009-07-171-1/+0
| | | | | | | | TBR=mpcomplete Review URL: http://codereview.chromium.org/149783 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20948 0039d316-1c4b-4281-b951-d872f2087c98
* First step in abstracting extension api to common/shared "IDL" files ↵rafaelw@chromium.org2009-07-161-68/+45
| | | | | | | | | | | | | | (jsonschema). In this step, All "normal" api calls and events (those that arrive or originate from the browser process) are routed through a single v8::Extension API Call ("StartRequest"). Additionally, internal string names for methods and events now match the js namespace (i.e. "RemoveTab" -> "tabs.remove"), in anticipation of having names be implicit from their api module & name in the api "IDL". TBR=aa,mpcomplete Review URL: http://codereview.chromium.org/149730 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20910 0039d316-1c4b-4281-b951-d872f2087c98
* Change getLanguage to detectLanguage, and incorporate corresponding changes, ↵sidchat@google.com2009-07-161-4/+4
| | | | | | | | | | in tab extensions. Also, use ISO language (e.g. "fr" instead of "French") as return language. BUG=none TEST=Enable extensions, add the given toolstrip as extension. For a page, the language of the page should be returned as ISO language (e.g., "french" as "fr") Review URL: http://codereview.chromium.org/149627 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20895 0039d316-1c4b-4281-b951-d872f2087c98
* Retrying this patch. This was already reviewed by mpcomplete and thefinnur@chromium.org2009-07-151-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | only change is a fix for the UI test that broke and a small change to event_bindings.cc (reviewed in-person). ExtensionFunctionDispatcher now notifies ExtensionProcessManager of renderviews created, which in turn notifies the renderer of page actions that it knows about. Remove generic event "page-action-executed" in favor of page action specific event (sent as extension_id/page_action_id). In the bindings, we now setup events for each page action we know about so we can register for specific events, and not receive broadcast events from all page actions. To setup these events I added a GetCurrentPageActions() to extension_process_bindings.cc and a helper function GetCurrentExtensionId(). And, finally, I simplified the page action background page by removing the check to see if we are already subscribed to the feed (since we now support multiple feed readers, it doesn't make sense anymore to always check Google Reader). This check might make a comeback later in a different form. TBR=mpcomplete BUG=13936 TEST=The RSS sample extension should work as before. Review URL: http://codereview.chromium.org/149683 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20782 0039d316-1c4b-4281-b951-d872f2087c98
* Various minor fixes:aa@chromium.org2009-07-151-67/+1
| | | | | | | | | | | | | | | | * --load-extension no longer requires --enable-extensions * No longer support chrome:// URLs for user scripts * Remove old unused Greasemonkey test * Enable Greasemonkey API emulation in linux/mac BUG=16720,16007,4476 TEST=Added several unit tests Original review: http://codereview.chromium.org/149619 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20719 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 20714.finnur@chromium.org2009-07-151-13/+3
| | | | | | | Rietveld showed all green try bots, but looks like one ui test is failing Review URL: http://codereview.chromium.org/149668 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20715 0039d316-1c4b-4281-b951-d872f2087c98
* EFD now notifies EPM of renderviews created, which in turn notifies the ↵finnur@chromium.org2009-07-151-3/+13
| | | | | | | | | | | | | | | | renderer of page actions that it knows about. Remove generic event "page-action-executed" in favor of page action specific event (sent as extension_id/page_action_id). In the bindings, we now setup events for each page action we know about so we can register for specific events, and not receive broadcast events from all page actions. To setup these events I added a GetCurrentPageActions() to extension_process_bindings.cc and a helper function GetCurrentExtensionId(). And, finally, I simplified the page action background page by removing the check to see if we are already subscribed to the feed (since we now support multiple feed readers, it doesn't make sense anymore to always check Google Reader). This check might make a comeback later in a different form. BUG=13936 TEST=The RSS sample extension should work as before. Review URL: http://codereview.chromium.org/155514 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20714 0039d316-1c4b-4281-b951-d872f2087c98
* This provides a simpler js template engine than JsTemplate. It has beenarv@google.com2009-07-142-25/+22
| | | | | | | | | | | | | | | | | | optimized for the way we do internationalization with JST before and is about 4 times faster (average 4.8ms vs 22.8ms) for the history page. The syntax for this is very similar to JsTemplates. It uses the attributes i18n-values and i18n-content which worls like jsvalues and jscontent except that it does not allow arbitrary expressions. BUG=None TEST=All UI pages should work as before Review URL: http://codereview.chromium.org/149420 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20590 0039d316-1c4b-4281-b951-d872f2087c98
* Add an optional channel name to the extension message connect event.mpcomplete@chromium.org2009-07-132-8/+20
| | | | | | | | | | | Also changed the way port IDs work internally to reduce confusion. Each end of the port has its own ID, not the ID of its opposite end. BUG=13706 TEST=no Review URL: http://codereview.chromium.org/155381 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20519 0039d316-1c4b-4281-b951-d872f2087c98
* Add getLanguage function to tab extension.sidchat@google.com2009-07-101-0/+11
| | | | | | | | BUG=none TEST=enable extensions using the toolstip.html code (added with this CL) and load pages in different languages. The corresponding language should appear in the bottom left after the page is loadedm or when the button is clicked, or when you navigate back to that tab after visiting some other tab. Review URL: http://codereview.chromium.org/150062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20378 0039d316-1c4b-4281-b951-d872f2087c98
* Make the API to open a message channel symmetric, so it works the same ↵mpcomplete@chromium.org2009-07-093-53/+66
| | | | | | | | | | | | | | | whether opening from a tab or extension. Also, move the callback handling back to extension_process_bindings, since I didn't need it in event_bindings to implement this, and it didn't make sense there anyway. BUG=12461 TEST=no Review URL: http://codereview.chromium.org/149237 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20296 0039d316-1c4b-4281-b951-d872f2087c98
* linux: implement the sad pluginevan@chromium.org2009-07-091-0/+0
| | | | | | | | | | | | | | This required moving the sad plugin resource out of the Windows-specific code. Note that it doesn't display right yet, since the place to display is covered by the GtkSocket that used to host the plugin. But that is a separate issue. (I had it draw to the side to verify the image was correctly getting loaded.) BUG=16158 Review URL: http://codereview.chromium.org/155262 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20264 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some issues with extension messaging:mpcomplete@chromium.org2009-07-023-12/+34
| | | | | | | | | | | | | | - Disconnect ports properly (javascript mistake). - Use the right port ID when dispatching the disconnect event. - Fix a bug with 2 extensions loaded in the same process. BUG=12686 BUG=15798 TEST=Load an extension that uses messaging, and make sure it disconnects when you navigate or close the connecting. Review URL: http://codereview.chromium.org/152003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19844 0039d316-1c4b-4281-b951-d872f2087c98
* PageActions can now specify multiple icons and switch between themfinnur@chromium.org2009-07-011-1/+3
| | | | | | | | | | | using optional parameters to enableForTab. BUG=http://crbug.com/11906 TEST=None Review URL: http://codereview.chromium.org/149046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19772 0039d316-1c4b-4281-b951-d872f2087c98
* In this episode, we implement the DOMUI interface for extension views that ↵aa@chromium.org2009-07-011-1/+1
| | | | | | | | | | are rendered in the main tab contents area. This gets us loaded and unloaded at the right place and removes many special cases for extensions from the RenderViewHost and RenderViewHostDelegate hierarchy. BUG=13936 Review URL: http://codereview.chromium.org/126137 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19717 0039d316-1c4b-4281-b951-d872f2087c98
* Send port disconnect events when a frame is unloaded.mpcomplete@chromium.org2009-07-011-1/+2
| | | | | | | | | | | | This is the other half of CL http://codereview.chromium.org/125280, which I split into http://codereview.chromium.org/147033 and this CL. BUG=12686 TEST=no Review URL: http://codereview.chromium.org/150125 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19686 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor extension bindings to share code, avoid exposing hidden variablesmpcomplete@chromium.org2009-06-304-83/+111
| | | | | | | | | | | | | | | | | globally, and avoid using the DOM load/unload events. - moved callback handling into event_bindings.js (ports will use it). - added chromeHidden, a V8 hidden value, to keep all internal variables that need to be accessible to native code. - changed context registration to occur always at extension load, instead of DOM load. - added an internal unload event that doesn't disable SuddenTermination. This is a rework of my earlier CL http://codereview.chromium.org/125280 which was reverted because of a perf regression. I believe the perf problem was caused by the call into javascript I did on page load to handle context registration - this CL avoids that. Review URL: http://codereview.chromium.org/147033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19634 0039d316-1c4b-4281-b951-d872f2087c98
* a few minor tweaks the bookmarks API:erikkay@google.com2009-06-291-2/+3
| | | | | | | | | | | | | | | | * change name "childrenIds" to "children" * add dateAdded and dateGroupModified properties * add id to onRemoved BUG=13994 BUG=14581 BUG=12217 TEST=load sample bookmarks extension and play around with Dump Bookmarks Review URL: http://codereview.chromium.org/151032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19536 0039d316-1c4b-4281-b951-d872f2087c98
* Adding the ability to remove page actions.BUG=NoneTEST=unit test.finnur@chromium.org2009-06-221-22/+40
| | | | | | Review URL: http://codereview.chromium.org/131003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18910 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 18765 to try to repair perf regressionjar@chromium.org2009-06-194-68/+34
| | | | | | | TBR=mpcomplete Review URL: http://codereview.chromium.org/131093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18784 0039d316-1c4b-4281-b951-d872f2087c98
* Send port-closed notification when a frame with ports unloads.mpcomplete@google.com2009-06-184-34/+68
| | | | | | | | | | | | | Also add onLoad and onUnload chrome Event to our bindings, so we can add listeners to these events without needing a DOM. These don't hook into the window "unload" event, so we no longer prevent Chrome's sudden termination of tabs on shutdown. BUG=12686 TEST=no Review URL: http://codereview.chromium.org/125280 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18765 0039d316-1c4b-4281-b951-d872f2087c98
* Add a port disconnect event for when one side of an extension message portmpcomplete@google.com2009-06-171-5/+12
| | | | | | | | | | | | | goes away. Combine the various ExtensionMessageService IPC message into a single "Invoke" message. BUG=12686 TEST=no Review URL: http://codereview.chromium.org/126234 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18645 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up bookmark API to match style of other extension APIserikkay@google.com2009-06-102-29/+30
| | | | | | | | | | BUG=11823 TEST=--load-extension test/data/extensions/samples/bookmarks TEST=unit_tests.exe --gtest_filter=ExtensionAPIClientTest.* Review URL: http://codereview.chromium.org/118209 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18056 0039d316-1c4b-4281-b951-d872f2087c98
* BUG=12192rafaelw@chromium.org2009-05-303-6/+12
| | | | | | | | R=aa Review URL: http://codereview.chromium.org/115681 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17269 0039d316-1c4b-4281-b951-d872f2087c98
* extensions chrome.self.getViews():rafaelw@chromium.org2009-05-161-1/+16
| | | | | | | | | | extension toolstrips and background pages can now retrieve a list of the other "views" (window objects) in their extension and script them directly R=mpComplete Review URL: http://codereview.chromium.org/115419 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16222 0039d316-1c4b-4281-b951-d872f2087c98
* Uploaded & applied on behalf of Roger Tawa (rogerta@google.com).rafaelw@chromium.org2009-05-151-0/+3
| | | | | | | | | | | BUG=11200 R=aa,rafaelw http://codereview.chromium.org/115250 Review URL: http://codereview.chromium.org/113442 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16146 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Revert "implemented extensions api windows.update().""aa@chromium.org2009-05-141-1/+20
| | | | | | | | | | This reverts commit 81242e3b9c6e6fbc42ccf5f973b27ed4cf4401d6. This wasn't the cause of the breakage. Review URL: http://codereview.chromium.org/115337 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16032 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "implemented extensions api windows.update()."aa@chromium.org2009-05-141-20/+1
| | | | | | | | This reverts commit f2d9a44f3886aeab1378c8dbc1ce445202bc0ca5. Review URL: http://codereview.chromium.org/115335 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16030 0039d316-1c4b-4281-b951-d872f2087c98
* implemented extensions api windows.update().rafaelw@chromium.org2009-05-141-1/+20
| | | | | | | | | | | | | currently only supports {left, top, width, height}. Also, added extensions_api_client_unittest tests for CreateWindow, UpdateWindow & RemoveWindow BUG=11200 R=mpComplete Review URL: http://codereview.chromium.org/115316 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16029 0039d316-1c4b-4281-b951-d872f2087c98
* FormatErrorMessage() functions are now publicly available from ↵rafaelw@chromium.org2009-05-121-22/+33
| | | | | | | | | | | | ExtensionErrorUtils. ExtensionTabsModule implements a bunch of error_messages. Extension Calls now always deliver a response to the calling context and route error messages if any to the window.console.error log. Review URL: http://codereview.chromium.org/113105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15853 0039d316-1c4b-4281-b951-d872f2087c98
* Remove executable bit from a bunch of files that shouldn't have it.evan@chromium.org2009-05-111-0/+0
| | | | | | | | | | (No code change.) git ls-tree -r HEAD | grep '^100755' | cut -f2 | egrep '\.(png|txt|mm|cc|h|checksum|asm|js|html|c|css|xml|grd|json)$' | xargs chmod a-x git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15809 0039d316-1c4b-4281-b951-d872f2087c98
* BUG=11200rafaelw@chromium.org2009-05-054-207/+207
| | | | | | | | R=aa Review URL: http://codereview.chromium.org/110001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15310 0039d316-1c4b-4281-b951-d872f2087c98
* implemented API style/convention changes, including:rafaelw@chromium.org2009-05-051-55/+93
| | | | | | | | | | | | | | | | | | | | | | | | -tabs.update() -tabs.move() -tabs.remove() -tabs.update() -tabs.create() -tabs.get() -all tab events, except onUpdated implemented -tabs.getSelected() -tabs.getAllInWindow() -windows.getCurrent() -windows.getFocused() -windows.getAll(populate) -windows.onFocusedChanged() -ExtensionBrowserEventRouter now uses BrowserList::Observer Review URL: http://codereview.chromium.org/100345 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15271 0039d316-1c4b-4281-b951-d872f2087c98
* This is the first part of the PageAction implementation. More work is ↵finnur@chromium.org2009-05-011-12/+38
| | | | | | | | | | | | | | | | required, but this is a good checkpoint. Design doc: http://dev.chromium.org/developers/design-documents/extensions/page-actions-api This checkin only covers Tab scoped page actions (not type "permanent"). It works end to end (if you have an extension that supplies the page action info -- I created an RSS page action that links to Google Reader). Please note that TabIndex is hard coded to 0 until the extension system can provide the tab id to the extensions (which I understand is in progress). This means that page action(s) only show up for the first tab in the tabstrip. :) BUG=None TEST=There is a unit test for the API, but apart from that it is not possible to test this manually without writing an extension that adds a PageAction. My RSS page action is not ready to be checked in but I can provide it if there is interest in a sneak preview during review/QA. Review URL: http://codereview.chromium.org/99253 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15105 0039d316-1c4b-4281-b951-d872f2087c98
* Pass down the opener tab when a message channel is opened to an extension.mpcomplete@google.com2009-05-011-1/+5
| | | | | | | | | | | Also did a bunch of cleanup of ExtensionMessageService. I converted it to primarily UI-thread habitation, with one function that needs to be on the IO thread so it can handle a synchronous IPC message. TEST=N/A Review URL: http://codereview.chromium.org/99261 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15097 0039d316-1c4b-4281-b951-d872f2087c98
* Implement removeWindow, onWindowCreated, onWindowRemoved.rafaelw@chromium.org2009-04-301-6/+32
| | | | | | | | | BUG=11200 R=aa Review URL: http://codereview.chromium.org/100164 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14924 0039d316-1c4b-4281-b951-d872f2087c98
* more extensions bookmarks changes:* add schema verification* add unit tests ↵erikkay@google.com2009-04-291-12/+56
| | | | | | | | for schema* add a few new methods (getTree, getChildren)* add events Review URL: http://codereview.chromium.org/102009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14877 0039d316-1c4b-4281-b951-d872f2087c98
* Add a few extra error messages to help catch typos in schemas.erikkay@google.com2009-04-291-2/+11
| | | | | | Review URL: http://codereview.chromium.org/100113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14850 0039d316-1c4b-4281-b951-d872f2087c98
* Implement tabs.createWindow extension api call. Required: (a) new ↵rafaelw@chromium.org2009-04-281-0/+20
| | | | | | | | | | | RVHDelegate & TabContentsDelegate method(s) CreateExtensionFunctionDispatcher() so that the dispatcher could be created with (an optional) browser attached to it, while avoiding having render_host depend on browser.h BUG=11092: R=aa,mpComplete,darin,pkasting Review URL: http://codereview.chromium.org/79070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14710 0039d316-1c4b-4281-b951-d872f2087c98
* implement remaining tab events (except for onTabUpdated).rafaelw@chromium.org2009-04-221-2/+24
| | | | | | Review URL: http://codereview.chromium.org/88053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14255 0039d316-1c4b-4281-b951-d872f2087c98
* Change extension event bindings to auto-detach events when the window unloads.mpcomplete@google.com2009-04-201-0/+3
| | | | | | | | | Also added code to DetachEvent to unregister the context when no events are attached. This allows us to remove contexts from our list immediately when their frames are unloaded. Review URL: http://codereview.chromium.org/79057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14049 0039d316-1c4b-4281-b951-d872f2087c98
* Several minor changes to API framework.aa@chromium.org2009-04-182-59/+96
| | | | | | | | | | - Implement 'choices' JSON schema feature - Made 'additionalProperties' false by default - Made all API requests flow through one native function Review URL: http://codereview.chromium.org/77020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13988 0039d316-1c4b-4281-b951-d872f2087c98
* A subset of the bookmarks API- missing events- missing unit tests- missing ↵erikkay@google.com2009-04-171-1/+112
| | | | | | | | ability to change URL Review URL: http://codereview.chromium.org/77003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13977 0039d316-1c4b-4281-b951-d872f2087c98
* Adding a comment stating what needs to be recompiled in orderfor changes to ↵finnur@chromium.org2009-04-175-0/+41
| | | | | | | | | | take effect. Also added a copyright message,while I was at it.Eventually, we want to fix the dependencies, but since multiple people are tripping over this, I think this is a good short term measure. Review URL: http://codereview.chromium.org/69045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13962 0039d316-1c4b-4281-b951-d872f2087c98
* added windows.getWindows() and tabs.moveTab()rafaelw@chromium.org2009-04-171-1/+40
| | | | | | Review URL: http://codereview.chromium.org/79026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13919 0039d316-1c4b-4281-b951-d872f2087c98