summaryrefslogtreecommitdiffstats
path: root/content/common/browser_plugin/browser_plugin_constants.h
Commit message (Collapse)AuthorAgeFilesLines
* <webview>: Move NewWindow API to chromefsamuel@chromium.org2014-05-201-35/+0
| | | | | | | | | | | | | | | This CL moves the New Window API and navigation to chrome. This CL removes a lot of unnecessary content APIs for BrowserPlugin now that permissions no longer live in content. Up next, in a separate CL will be a huge cleanup that removes all WebContentsDelegate code out of BrowserPluginGuest and into WebViewGuest. This should significantly reduce the size of the BrowserPlugin content API. BUG=364141, 330264 TBR=kenrb@chromium.org for trivial browser_plugin_messages.h change. Review URL: https://codereview.chromium.org/272573005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271703 0039d316-1c4b-4281-b951-d872f2087c98
* <webview>: Move JavaScript Dialog API to chromefsamuel@chromium.org2014-04-171-3/+0
| | | | | | | | BUG=330264 Review URL: https://codereview.chromium.org/239143007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264378 0039d316-1c4b-4281-b951-d872f2087c98
* <webview>: Move pointerLock permission to chromefsamuel@chromium.org2014-04-161-1/+0
| | | | | | | | BUG=330264 Review URL: https://codereview.chromium.org/239113007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264236 0039d316-1c4b-4281-b951-d872f2087c98
* <webview>: Expose transparency APIfsamuel@chromium.org2013-12-031-0/+1
| | | | | | | | BUG=157628 Review URL: https://codereview.chromium.org/95693002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238428 0039d316-1c4b-4281-b951-d872f2087c98
* <webview>: Move sizechanged event from content/ to chrome/.lazyboy@chromium.org2013-08-131-7/+0
| | | | | | | | | | | | | | Remove sizechanged event related old code from ad_view.js, they were never being fired since autosize/minwidth/maxwidth/minheight/maxheight attributes are ignored in ad_view. BUG=166165 TEST=WebViewTest.Shim_TestSizeChanged* Review URL: https://chromiumcodereview.appspot.com/22576003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217168 0039d316-1c4b-4281-b951-d872f2087c98
* <webview>: Refactor Permission API to chromefsamuel@chromium.org2013-08-121-6/+1
| | | | | | | | | | | BUG=166165 Test=WebViewTest.*, WebViewInteractiveTest.* TBR=cdn@chromium.org for removing IPCs in browser_plugin_messages.h NOTRY=true, previous patch worked, just merging. Review URL: https://chromiumcodereview.appspot.com/21297005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217057 0039d316-1c4b-4281-b951-d872f2087c98
* Minor cleanup: Remove some unused consts in c/common/browser_plugin/lazyboy@chromium.org2013-08-081-1/+0
| | | | | | | | | BUG=None Test=Compiles, no visible changes. Review URL: https://chromiumcodereview.appspot.com/22325011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216471 0039d316-1c4b-4281-b951-d872f2087c98
* <webview>: Implement dialog APIfsamuel@chromium.org2013-07-241-0/+5
| | | | | | | | | | | | | | | | | This CL implements a JavaScript Dialog API for <webview>. This API allows the embedder to intercept requests for alert/confirm/prompt dialogs, giving the embedder an opportunity to asynchronously display UI to respond to these requests. Note: This API blocks the guest until one of three things happens: 1. The default is not prevented, and so the default action is equivalent to canceling the dialog. 2. The default is prevented and the event.dialog object becomes unreachable in JS and is garbage collected. 3. An action is taken: event.dialog.ok(...) or event.dialog.cancel(); BUG=260745 Test=WebViewTest.Dialog_* Review URL: https://chromiumcodereview.appspot.com/19679002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213369 0039d316-1c4b-4281-b951-d872f2087c98
* BrowserPlugin: Implement internal attach APIfsamuel@chromium.org2013-07-171-1/+2
| | | | | | | | | | | | | | This API permits passing the browser process an arbitrary number of parameters from the *view shims. This enables implementing attributes entirely in the chrome layer. BUG=166165 Test=WebViewTest.*, AdViewTest.* TBR=miket@chromium.org for ad_view.js (which I will be OWNER of soon) Review URL: https://chromiumcodereview.appspot.com/19290003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212167 0039d316-1c4b-4281-b951-d872f2087c98
* <webview> Move exit event to chromefsamuel@chromium.org2013-07-171-2/+0
| | | | | | | | | | BUG=166165 Test=WebViewTest.Shim_* TBR=cdn@chromium.org Review URL: https://chromiumcodereview.appspot.com/18986009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211980 0039d316-1c4b-4281-b951-d872f2087c98
* Browser Plugin: Change internal API to track V8 object lifetimefsamuel@chromium.org2013-07-101-2/+3
| | | | | | | | | | | | | | | | | | This is the first step towards moving the permission API and New Window API out of content and into chrome. This CL decouples v8 object lifetime tracking from the permission API. In particular, when a tracked object goes away an -internal-trackedObjectGone event fires that allows the content embedder to do any necessary cleanup, if necessary such as deny the permission request in the case of the permission API BUG=166165 Test=WebViewTest.GeolocationRequestGone Review URL: https://chromiumcodereview.appspot.com/18265007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210825 0039d316-1c4b-4281-b951-d872f2087c98
* Browser Plugin: Remove cruftfsamuel@chromium.org2013-07-041-1/+0
| | | | | | | | | | BUG=none NOTRY=true TBR=fsamuel@chromium.org Review URL: https://chromiumcodereview.appspot.com/18719002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210209 0039d316-1c4b-4281-b951-d872f2087c98
* <webview>: Move close event from content to chromefsamuel@chromium.org2013-07-041-1/+0
| | | | | | | | | BUG=166165 Test=WebViewInteractiveTest.NewWindow_Close Review URL: https://chromiumcodereview.appspot.com/18280003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210112 0039d316-1c4b-4281-b951-d872f2087c98
* <webview>: Move consolemessage event from content to chromefsamuel@chromium.org2013-07-031-5/+0
| | | | | | | | | | | | This CL also introduces a GuestDelegate to plumb a subset of WebContentsDelegate through to the content embedder. BUG=166165 Test=WebViewTest.ConsoleMessage still works Review URL: https://chromiumcodereview.appspot.com/18546002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210070 0039d316-1c4b-4281-b951-d872f2087c98
* <webview>: Move loadstart and loadredirect from content to chromefsamuel@chromium.org2013-07-031-3/+0
| | | | | | | | | BUG=166165 Test=WebViewTest.Shim_TestLoadStartLoadRedirect Review URL: https://chromiumcodereview.appspot.com/18363002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209894 0039d316-1c4b-4281-b951-d872f2087c98
* <webview>: Move contentload event from content to chromefsamuel@chromium.org2013-06-291-1/+0
| | | | | | | | BUG=166165 Review URL: https://chromiumcodereview.appspot.com/17846010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209357 0039d316-1c4b-4281-b951-d872f2087c98
* Decouple GuestView creation from attachment.fsamuel@chromium.org2013-06-291-1/+0
| | | | | | | | | | | | | | | | This enables attaching the GuestView earlier on prior to loading resources. Loading events that occur prior to attachment are queued until attachment and then sent to the embedder on attachment. This CL also moves loadstop from content to chrome. Existing tests exercise the need for queuing. BUG=166165 Test=WebViewTest.Shim (newwindow tests) Review URL: https://chromiumcodereview.appspot.com/17624004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209345 0039d316-1c4b-4281-b951-d872f2087c98
* <webview>: Partially migrate loadcommit event from content to chromefsamuel@chromium.org2013-06-251-2/+4
| | | | | | | | | | | | | All the pieces are now in place for upstreaming the big content->chrome <webview> refactor. This first patch puts in the first set of pieces in place for migrating loadcommit to chrome. BUG=166165 Test=WebViewTest.* Review URL: https://chromiumcodereview.appspot.com/17165004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208542 0039d316-1c4b-4281-b951-d872f2087c98
* Browser Plugin: Plumb extra arguments on ContentRendererClient.fsamuel@chromium.org2013-06-251-0/+1
| | | | | | | | | | | | | | | This plumbs extra parameters from BrowserPlugin::Attach all the way to the ContentBrowserClient. This will permit identifying whether to attach an adview API or webview API to BrowserPlugin in the chrome layer. NOTRY=true BUG=166165 Review URL: https://chromiumcodereview.appspot.com/17514002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208312 0039d316-1c4b-4281-b951-d872f2087c98
* <webview> executeScript should use instance IDfsamuel@chromium.org2013-06-051-2/+1
| | | | | | | | | | | | | Currently we trust the embedder to give the browser process the routing ID and process ID of the guest it would like to inject script into. This is potentially unsafe. We should instead use the guest instance ID and verify that the given embedder can access the guest with the given instance ID. BUG=246652 Review URL: https://chromiumcodereview.appspot.com/16361007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204311 0039d316-1c4b-4281-b951-d872f2087c98
* <webview>: Implement WebRequest APIfsamuel@chromium.org2013-05-271-0/+1
| | | | | | | | | | | | | This patch exposes the WebRequest in <webview> See http://developer.chrome.com/extensions/webRequest.html BUG=171421 TEST=WebViewTest.Shim Review URL: https://chromiumcodereview.appspot.com/12189018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202469 0039d316-1c4b-4281-b951-d872f2087c98
* <webview>: Implement contentload eventfsamuel@chromium.org2013-05-081-0/+1
| | | | | | | | | | | | | | | | | | This patch implements a 'contentload' event that is invoked after the guest's main frame load handler is invoked. webview.addEventListener('contentload', function(e) { // Do work here, perhaps injecting some script. }); BUG=237276 Test=WebViewTest.Shim R=cdn@chromium.org, lazyboy@chromium.org Review URL: https://codereview.chromium.org/14918003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199010 0039d316-1c4b-4281-b951-d872f2087c98
* <webview>: Implement 'close' eventfsamuel@chromium.org2013-05-021-0/+1
| | | | | | | | | | | When window.close() is called from within a webview, a close event fires on the <webview>. BUG=237276 Test=WebViewInteractiveTest.NewWindow, testNewWindowClose Review URL: https://chromiumcodereview.appspot.com/14569014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197987 0039d316-1c4b-4281-b951-d872f2087c98
* Forward guest console message to embedder through events.lazyboy@chromium.org2013-04-301-0/+5
| | | | | | | | | BUG=233382 TEST=Added browser_tests Review URL: https://chromiumcodereview.appspot.com/14098010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197203 0039d316-1c4b-4281-b951-d872f2087c98
* permissionrequest API for guest Download.lazyboy@chromium.org2013-04-031-0/+2
| | | | | | | | | | | | | | | | Exposed event: event.type = 'download' event.requestMethod = 'GET'/'POST'... event.url = url BUG=141204 TEST=Pending: osx + win (b/c there is a *ViewGuest change). Added browser_tests:WebViewTest.Download, ran unit_tests:DownloadRequestLimiterTest* Review URL: https://chromiumcodereview.appspot.com/13037003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192029 0039d316-1c4b-4281-b951-d872f2087c98
* Browser Plugin: Implement window.open in guestsfsamuel@chromium.org2013-03-181-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sample API: function handleNewWindow(event) { // The default behavior is to discard the new window. If we don't prevent // default or event.window is no longer reachable the garbage collector will // automagically discard the window for us. event.preventDefault(); chrome.app.window.create('newwindow.html', { top: 0, left: 0, width: 640, height: 480, }, function(newwindow) { newwindow.contentWindow.onload = function(e) { var newwebview = newwindow.contentWindow.document.querySelector("webview"); event.window.attach(newwebview); } }); } webview.addEventListener('newwindow', handleNewWindow); This is implemented by reusing a lot of the existing code for the permission API. The event.window object is managed by the v8 garbage collector. The new BrowserPluginGuest's lifetime is managed by its opener as long as it's not attached. Once a BrowserPluginGuest is attached, it has an embedder WebContents, and loading of resources begins. BUG=140316 Test=WebViewTest.Shim { webViewNewWindow, webViewNewWindowTwListeners, webViewNewWindowNoPreventDefault, webViewNoReferrerLink } Review URL: https://chromiumcodereview.appspot.com/11280291 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188665 0039d316-1c4b-4281-b951-d872f2087c98
* Initial implementation of the permission API for Browser Plugin PointerLockmthiesse@chromium.org2013-03-101-0/+3
| | | | | | | | | | | | | | Exposed permission event parameters: userGesture - true if the lock request originated from a user gesture. lastUnlockedBySelf - true if the a previous mouse lock to the page was unlocked by the page itself (i.e. not through a user alt+tabbing out). originUrl - the URL of the page the request originated from. BUG=166228 Review URL: https://chromiumcodereview.appspot.com/12455011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187221 0039d316-1c4b-4281-b951-d872f2087c98
* <browser>: permissionRequest API for geolocation.lazyboy@chromium.org2013-03-091-0/+1
| | | | | | | | | | BUG=141195 TEST=Added browsertests: WebViewTest.GeolocationAPI* Review URL: https://chromiumcodereview.appspot.com/11142012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187099 0039d316-1c4b-4281-b951-d872f2087c98
* Browser Plugin: Implement BrowserPluginGuestManagerfsamuel@chromium.org2013-03-061-0/+1
| | | | | | | | | | | | | | | | | | | | | This patch centralizes instance ID allocation and routing to a per-profile object called BrowserPluginGuestManager. This patch minimizes BrowserPluginEmbedder's responsibilities without entirely removing it. BrowserPluginEmbedder lives for the lifetime of an embedder WebContents. It handles IPC messages that are not directed at any particular guest process, currently those are: BrowserPluginHostMsg_AllocateInstanceID BrowserPluginHostMsg_CreateGuest, BrowserPluginHostMsg_PluginAtPositionResponse These message handlers were kept in BrowserPluginEmbedder because they either operate on the embedder (as with PluginAtPosition), or they need to reply back to the correct BrowserPluginManager. This requires an understanding of the process ID and routing ID of the origin of the message. This information does not seem particularly appropriate in BrowserPluginGuestManager because that object spans multiple embedders and potentially multiple processes (outside of Chrome Apps). BUG=174673, 140316 Test=BrowserPluginHostTest.* Review URL: https://chromiumcodereview.appspot.com/12253046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186338 0039d316-1c4b-4281-b951-d872f2087c98
* BrowserPlugin: Moving constants to content/commonfsamuel@chromium.org2013-03-051-0/+79
To allow constants to be shared by both content/browser/browser_plugin/ and content/renderer/browser_plugin this CL moves it to content/common/browser_plugin. BUG=none Review URL: https://chromiumcodereview.appspot.com/12388086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186125 0039d316-1c4b-4281-b951-d872f2087c98