summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webplugin_impl.h
Commit message (Collapse)AuthorAgeFilesLines
* Move plugin-related files in webkit/glue to webkit/glue/plugins to make thembrettw@chromium.org2010-03-311-321/+0
| | | | | | | | | | | easier to find. With a random subset of files in webkit/glue, it's impossible to predict where you should find a file. No code change TEST=none BUG=none Review URL: http://codereview.chromium.org/1559008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43177 0039d316-1c4b-4281-b951-d872f2087c98
* Move some more files to toplevel gfx dir.ben@chromium.org2010-03-171-1/+1
| | | | | | | | | TBR=darin BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41812 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed the Pepper print interface to take in the print dimensions and printer ↵sanjeevr@chromium.org2010-03-121-22/+0
| | | | | | | | | | | DPI only in the PrintBegin method. The plugin is expected to remember this until PrintEnd is called. BUG=None TEST=Test printing with plugins that support the new interface Review URL: http://codereview.chromium.org/858007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41453 0039d316-1c4b-4281-b951-d872f2087c98
* Changes made to the printing logic to allow plugins to participate in the ↵sanjeevr@chromium.org2010-03-121-0/+28
| | | | | | | | | | | | | browser's print workflow. These changes mainly involve allowing the plugin to specify whether it wants the browser to use overlays and also changes to the EMF code on Windows to decompress JPEGs/PNGs in the metafile. The related webkit change is https://bugs.webkit.org/show_bug.cgi?id=35550 BUG=None TEST=Test printing with new Pepper plugins that support custom printing. Review URL: http://codereview.chromium.org/745001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41400 0039d316-1c4b-4281-b951-d872f2087c98
* Initial change for DumpRrenderTree support librarytkent@google.com2010-03-041-1/+1
| | | | | | | | | | | | | | | | | | | This library provides: - An implementation of WebKitClient, - An implementation of WebPlugin, - An implementation of WebMediaPalyer, - Initialization and termination functions, - Two function for database, and - Some functions required by webkit_glue. webkit_support.gyp is not referred by build/all.gyp. A gyp for DRT/chromium in WebKit tree will refer to it. BUG=none TEST=none. This is a part of test code. Review URL: http://codereview.chromium.org/652226 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40610 0039d316-1c4b-4281-b951-d872f2087c98
* Fix formatting nits.wtc@chromium.org2010-02-271-1/+1
| | | | | | | | | R=eroman BUG=none TEST=No compilation errors. Review URL: http://codereview.chromium.org/660223 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40201 0039d316-1c4b-4281-b951-d872f2087c98
* Fix passing pointers between processes.jam@chromium.org2010-01-291-21/+29
| | | | | | | BUG=31880 Review URL: http://codereview.chromium.org/558036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37555 0039d316-1c4b-4281-b951-d872f2087c98
* Set disabled style on GPU window and plugin intermediate window so mouse ↵apatrick@chromium.org2010-01-151-2/+8
| | | | | | | | | | | messages pass through to the browser window. TEST=trybots BUG=none Review URL: http://codereview.chromium.org/549025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36311 0039d316-1c4b-4281-b951-d872f2087c98
* Check that frame has not been closed when getting DevToolsAgent.yurys@chromium.org2009-12-041-0/+4
| | | | | | | | | | Updated test expectations. The test that used to crash is failing on Linux(it is already expected to crash or fail on Win and Mac). BUG=29339 Review URL: http://codereview.chromium.org/460072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33819 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Check that frame has not been closed when getting DevToolsAgent." ↵yurys@chromium.org2009-12-041-4/+0
| | | | | | | | | | | Linux layout tests started failing for some reason: http://build.chromium.org/buildbot/waterfall/builders/Webkit%20Linux/builds/14966/steps/webkit_tests/logs/stdio BUG=29339 TBR=pfeldman Review URL: http://codereview.chromium.org/466034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33816 0039d316-1c4b-4281-b951-d872f2087c98
* Check that frame has not been closed when getting DevToolsAgent.yurys@chromium.org2009-12-041-0/+4
| | | | | | | | BUG=29339 Review URL: http://codereview.chromium.org/464033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33813 0039d316-1c4b-4281-b951-d872f2087c98
* Don't set referrers on outgoing plugin requests if the load_manually flag is ↵ananta@chromium.org2009-12-031-3/+15
| | | | | | | | | | | | | | | | | | | set. This emulates the behavior of other browsers and fixes http://code.google.com/p/chromium/issues/detail?id=28800 I added a UI test to validate that the plugin source URL is set on outgoing GetURL requests issued by the plugin. To validate that the document URL is set as the referrer on the initial URL request would take some more work. Will try and add that in a future CL. I also changed the WebPluginImpl::RouteToFrame function to set the referrer on similar lines. Bug=28800 Test=Covered by UI test Review URL: http://codereview.chromium.org/459003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33673 0039d316-1c4b-4281-b951-d872f2087c98
* Send resource load notifications from plugins to devtools agent. This is a ↵yurys@chromium.org2009-12-031-6/+8
| | | | | | | | | | part of a fix which would allow to inspect plugin resources. BUG=2084 Review URL: http://codereview.chromium.org/435044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33672 0039d316-1c4b-4281-b951-d872f2087c98
* Rename policy_url to first_party_for_cookies in cookie-related code.wtc@chromium.org2009-11-181-2/+2
| | | | | | | | | R=abarth BUG=25133 TEST=none. A cosmetic change. Review URL: http://codereview.chromium.org/403011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32373 0039d316-1c4b-4281-b951-d872f2087c98
* Upstreaming WebKit.gypyaar@chromium.org2009-11-121-5/+5
| | | | | | | | | | | | 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
* DevTools: report correct content length for resources.yurys@google.com2009-11-021-1/+1
| | | | | | | | | | | | Currently lengthReceived always has the same value as dataLength when Safari calls ResourceHandle::didReceiveData. In Chrome expected content length is passed as lengthReceived parameter which leads to incorrect content length to be stored in InspectorResource. InspectorResource expects lengthReceived to be the length of current data chunk(see InspectorResource::addLength). So I changed lengthReceived parameter to be dataLength. Darin, I see your TODO comment at line 581 in http://src.chromium.org/viewvc/chrome/trunk/src/webkit/glue/weburlloader_impl.cc?annotate=6296 (the comment was deleted later) so I think you are right person to review the change in weburlloader_impl.cc. Please look at weburlloader_impl.cc and feel free to leave devtools specific changes to Alex and Pavel. BUG=25213 TEST=DevToolsSanityTest.TestResourceContentLength Review URL: http://codereview.chromium.org/295041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30725 0039d316-1c4b-4281-b951-d872f2087c98
* Moved Pepper delegate definition to chrome\renderer to allow it to usesehr@google.com2009-10-171-0/+2
| | | | | | | | | | | code from chrome\common. Also added canvas support and hooked up NPAPI interface functions. No tests have been added yet, so this is probably not fully ready. Review URL: http://codereview.chromium.org/291001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29380 0039d316-1c4b-4281-b951-d872f2087c98
* Move native_widget_types and gtk_native_view_id_manager from base/gfx tobrettw@chromium.org2009-10-111-1/+1
| | | | | | | | | | | | app/gfx in preparation for removing the base_gfx project. This also moves base/window_impl.cc to app/win/window_impl because this file shouldn't be in base. TEST=none BUG=none Review URL: http://codereview.chromium.org/273017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28691 0039d316-1c4b-4281-b951-d872f2087c98
* This changelist fixes some issues with the NPAPI WMP plugin work in Chrome. ↵jam@chromium.org2009-09-041-3/+2
| | | | | | | | | | | | The first is that we need to disable windowless mode since it doesn't work in the NPAPI plugin (Safari does this as well, and sites don't use windowless for Firefox). The second is to make UpdateGeometry message synchronous for WMP. The problem I saw was that while handling that message, the plugin might disaptch a NPObject Invoke method to play a video, which WMP doesn't expect and it leads to the video never playing. While touching these files, I made some small cleanup by reverting the change that made WebPluginProxy not have a WebPluginDelegateImpl pointer, which added a bunch of unnecessary methods to WebPluginDelegate. BUG=20259 TEST=use --no-activex and try playing the videos on http://www.nana10.co.il/Section/?SectionID=10847&sid=235 Review URL: http://codereview.chromium.org/196012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25433 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate remaining WebCore dependencies from webplugin_impl.ccdarin@chromium.org2009-09-021-57/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces WebPluginPageDelegate to hold the methods that only existed on WebViewDelegate to allow WebPluginImpl to talk to the RenderView. This enables us to eliminate those methods from WebViewDelegate, which eliminates the last dependency on gfx/ native_widget_types.h in our WebKit interface! WebViewDelegate grows a CreatePlugin method that returns a WebKit::WebPlugin. It loses its CreatePluginDelegate method, which now lives on WebPluginPageDelegate. This change makes RenderView use WeakPtr when it hands itself to each WebPluginDelegateProxy and WebPluginImpl instance. This makes the memory management simpler. This change also moves various WebPlugin* interfaces defined in webkit/glue into the webkit_glue namespace. This was to help reduce confusion with similarly named types in the WebKit namespace. WebKit::WebPluginParams is added to contain the set of parameters used to construct a plugin. WebPluginContainer gets a couple more methods to allow us to avoid WebCore dependencies in WebPluginImpl. R=jam BUG=10036 TEST=none Review URL: http://codereview.chromium.org/181014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25184 0039d316-1c4b-4281-b951-d872f2087c98
* More refactoring for WebPlugin.darin@chromium.org2009-08-271-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL eliminates direct calls to WebPluginDelegate::DidFinishLoadWithReason from WebFrameLoaderClient. This CL also moves WebDataSourceImpl into webkit/api/src. That change was needed so that WebPluginContainerImpl can add a WebPluginLoadObserver to it, which WebFrameLoaderClient uses to communicate back to the WebPlugin upon completion of the frame load. WebViewDelegate::DidFinishLoadWithReason is modified to include url and notify_data parameters, eliminating the URLRequestRouted method. This is done so that we can support overlapping NPN_GetURLNotify targetting different frames. WebPluginContainer grows an executeScriptURL method to deal with javascript: URLs. NOTE: I'm working on some UI tests to better cover the case of overlapping NPN_GetURLNotify calls. R=jam BUG=10036 TEST=none yet Review URL: http://codereview.chromium.org/174514 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24655 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes a crash caused due to a call to NPP_DestroyStream occuring in the ↵ananta@chromium.org2009-08-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | context of NPP_NewStream. The plugin would invoke NPN_Evaluate to display an alert in the context of NewStream. This would cause the didFail IPC to be dispatched which would cause the plugin to invoke another call to NPP_NewStream which would repeat these steps and crash. The didFail call from the renderer did not honor the deferred load flag which we set in WebPluginImpl prior to dispatching stream IPCs to the plugin. Fix is to dispatch the didFail call when we receive an ack from the plugin indicating that it is ready to accept stream data. This fixes bug http://code.google.com/p/chromium/issues/detail?id=20063 The other change is in WebPluginImpl::TearDownPluginInstance, where we run through the list of resource clients and cancel them. We call didFail on these clients here, which occurs anyway through the PluginDestroyed code path. Bug=20063 Test=Convered by interactive UI test. Review URL: http://codereview.chromium.org/174383 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24593 0039d316-1c4b-4281-b951-d872f2087c98
* Add isVisible parameter to WebPlugin::updateGeometry.darin@chromium.org2009-08-261-1/+1
| | | | | | | | | | | | | | | | | This allows for geometry updates while the plugin is hidden so that when it becomes visible, the plugin is properly positioned. In this change, I also revised RenderWidget::SchedulePluginMove to properly merge a move that only updates the visible state, and I fixed up TestShell to properly handle moves that only update the visible state. R=jam BUG=19888,20260 TEST=covered by layout tests Review URL: http://codereview.chromium.org/174513 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24457 0039d316-1c4b-4281-b951-d872f2087c98
* linux: new socket/plug code for windowed pluginspiman@chromium.org2009-08-251-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | This CL reworks the GtkSocket/GtkPlug code for windowed plugins on linux. Instead of having the plugin ask the browser to create a socket to plug into, it simply creates a plug and sends it to the browser. The browser creates a socket and attaches the plug when the socket becomes realized This fixes 2 main issues: - we can create windowed plugins in background tabs (Issue 16125) - we can detach tabs with windowed plugins and reattach them (Issue 17110) I reworked the IPCs, so it removes some amount of linux-specific things. We also need less synchronous IPCs to create/destroy plugins, so that should be a bit faster. In particular, I removed the plugin pid map, and instead made sure the renderer always destroys the plugin containers if the plugin process crashes - they will be destroyed if the renderer process crashes. Let me know if you have an issue with that. Also, the intermediate plug/socket creation now happens in webplugin_delegate_impl_gtk. That means test_shell uses it as well. It made the code a lot simpler, and means we're testing it as well, albeit with a bit of extra overhead. Bonus: I found a big bad bug in the GtkPluginContainer that made its width/height alias with some internal gtk structures. That was certainly causing some amounts of bugs. Bonus 2: scrolling now looks more in sync with the rest of the page, though I'm not exactly sure which part caused that. BUG=16125,17110 TEST=a lot of manual testing involving YouTube videos Review URL: http://codereview.chromium.org/174295 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24309 0039d316-1c4b-4281-b951-d872f2087c98
* More removal of WebCore usage from webplugin_impl.ccdarin@chromium.org2009-08-211-1/+1
| | | | | | | | | | | | Adds a few helper methods on WebFrame. R=jam BUG=10036 TEST=none Review URL: http://codereview.chromium.org/173152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23956 0039d316-1c4b-4281-b951-d872f2087c98
* Remove WebPluginImpl::element_darin@chromium.org2009-08-201-10/+9
| | | | | | | | | | | | | This member was of type HTMLPlugInElement. This is a step toward removing all WebCore includes from webplugin_impl.cc. R=jam BUG=10036 TEST=none Review URL: http://codereview.chromium.org/173126 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23858 0039d316-1c4b-4281-b951-d872f2087c98
* Add WebPlugin::acceptsInputEvents method.darin@chromium.org2009-08-201-0/+1
| | | | | | | | | | | | | | This allows us to restore a windowless_ check that used to exist in webplugin_impl.cc prior to r23797. The goal of this change is to not handle input events for windowed plugins. R=hbono BUG=none TEST=pending/plugins/iframe-shims.htm Review URL: http://codereview.chromium.org/173114 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23808 0039d316-1c4b-4281-b951-d872f2087c98
* Move WebPluginContainer into the WebKit APIdarin@chromium.org2009-08-201-114/+25
| | | | | | | | | | | | | | | | | | | | | | This change introduces the following new interfaces: WebPlugin WebPluginContainer The implementation of WebPluginContainer is moved to webkit/api/src/WebPluginContainerImpl.{h,cpp}, and WebPluginImpl from webkit/glue now implements WebKit::WebPlugin. This change does not completely eliminate dependencies in WebPluginImpl on WebCore. The rest will be removed in a separate change. A hack was added to TemporaryGlue to deal with the fact that ChromeClientImpl still resides in webkit/glue. Also, StackingOrderIterator in webkit/glue because there is another CL out to remove that from the source tree. Note: This change depends on another CL that I am brewing to make WebCanvas be a CGContext on Mac. R=jam BUG=10036 TEST=covered by existing tests Review URL: http://codereview.chromium.org/165464 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23797 0039d316-1c4b-4281-b951-d872f2087c98
* linux: fix windowless Flash when scrollingpiman@chromium.org2009-08-071-2/+6
| | | | | | | | | | | | | Apparently on linux windowless Flash needs a paint after a NPP_SetWindow, otherwise it cancels its timer to do InvalidateRect. Also in this change: WebKit calls WebPluginImpl::setFrameRect at each paint, even if the rects haven't changed. That used to always send a message to the plugin process, which is unnecessary (that case is always a no-op in the WebPluginDelegateImpl), so I fixed that too. BUG=18423 Review URL: http://codereview.chromium.org/159907 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22702 0039d316-1c4b-4281-b951-d872f2087c98
* Another attempt at landing this patch.ananta@chromium.org2009-08-041-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | The reliability tests regressions caused by this patch have been addressed by the upstream bug fix https://bugs.webkit.org/show_bug.cgi?id=27769 The IPCs for carrying data requested by plugins have been changed from synchronous IPCs to asynchronous IPCs. This fixes bug http://code.google.com/p/chromium/issues/detail?id=14323, where the Flash plugin would not render content on the page if these IPCs were processed while the plugin waited for sync calls like NPN_Evaluate to return. This CL also fixes the following bugs, which were crashes in reliability test runs when this patch was landed last time. http://code.google.com/p/chromium/issues/detail?id=18058 http://code.google.com/p/chromium/issues/detail?id=18059 The crash happens because of NPP_Write calls issued to the plugin while it is waiting for an NPN_Invoke call to return in the context of NPP_NewStream. Inspecting the safari plugin implementation revealed that they defer the resource load before calling the plugin and restore it on return. We emulate this behavior via an IPC sent from the plugin which serves as an acknowledgement. Test=covered by UI tests. Bug=14323,18058,18059 Review URL: http://codereview.chromium.org/159746 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22369 0039d316-1c4b-4281-b951-d872f2087c98
* 1) Roll WebKit DEPS to 45685michaeln@google.com2009-07-101-1/+4
| | | | | | | | | | | This roll picks up changes to WebCore::Widget which make that a RefCounted class. 2) Mods to plugin handling in our "glue" needed to recover from the above Review URL: http://codereview.chromium.org/149443 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20440 0039d316-1c4b-4281-b951-d872f2087c98
* linux: only create browser-side plugin container after plugin requests itevan@chromium.org2009-06-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | On Windows, windowed plugins are parented in a two-stage process: initially, the plugin is parented to the render view, then later it's reparented to a special per-plugin window. On Linux, plugin embedding always needs a special per-plugin window before it can be initialized. So there's no way to do the two-stage initialization process, and we only want to construct the browser-side plugin container for windowed plugins after the plugin requests it. Plumbing this through the WebPlugin interface will also allow us to side-route this request for window creation out to the browser process in the multi-process case. BUG=15421 TEST=plugins still work in test_shell Review URL: http://codereview.chromium.org/150034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19602 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 19560. This caused a bunch of plugin-related unittest failures on ↵glen@chromium.org2009-06-301-4/+1
| | | | | | | | Windows. Review URL: http://codereview.chromium.org/150088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19573 0039d316-1c4b-4281-b951-d872f2087c98
* linux: only create browser-side plugin container after plugin requests itevan@chromium.org2009-06-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | On Windows, windowed plugins are parented in a two-stage process: initially, the plugin is parented to the render view, then later it's reparented to a special per-plugin window. On Linux, plugin embedding always needs a special per-plugin window before it can be initialized. So there's no way to do the two-stage initialization process, and we only want to construct the browser-side plugin container for windowed plugins after the plugin requests it. Plumbing this through the WebPlugin interface will also allow us to side-route this request for window creation out to the browser process in the multi-process case. BUG=15421 TEST=plugins still work in test_shell Review URL: http://codereview.chromium.org/150034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19560 0039d316-1c4b-4281-b951-d872f2087c98
* linux: cleanup browser-side GtkSockets when plugins are destroyedevan@chromium.org2009-06-281-1/+1
| | | | | | | | | | | | WillDestroyWindow is already plumbed over to the browser process in the multiproc case; we want to plumb it to our RenderView delegate so we can do similar cleanup in test_shell. BUG=15423 Review URL: http://codereview.chromium.org/147251 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19475 0039d316-1c4b-4281-b951-d872f2087c98
* linux plugins: eliminate GtkWidget* from plugin processevan@chromium.org2009-06-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | [retry with mac hopefully fixed this time] GtkWidget* (and its wrapper, gfx::NativeView) only work within a single process. Plugins already work with a lower-level type that works across processes -- an X Window id. The parent of a plugin is an HWND on windows, but it's an X Window id on X. So we introduce a new typedef wrapping that and push it through all the places in the code that needs it. Since we no longer have a GtkSocket in the WebPluginDelegateImpl, we need to do a bit more work in the WebViewDelegate (aka the browser process in the multiproc world). We also need the plugin host (the browser) to track the GtkSockets that are hosting the plugin, as well as destroy them when necessary. To do this we require the plugin owner to grab the plug-removed signal rather than putting its handler in GtkPluginContainer; this is the way it worked before I'd refactored into GtkPluginContainer so it shouldn't be so bad. This change still only works in test_shell, but the refactoring should translate to the multiprocess case pretty easily. Review URL: http://codereview.chromium.org/146009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19387 0039d316-1c4b-4281-b951-d872f2087c98
* Revert all of my patches from today.evan@chromium.org2009-06-261-3/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19328 0039d316-1c4b-4281-b951-d872f2087c98
* linux plugins: eliminate GtkWidget* from plugin processevan@chromium.org2009-06-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | GtkWidget* (and its wrapper, gfx::NativeView) only work within a single process. Plugins already work with a lower-level type that works across processes -- an X Window id. The parent of a plugin is an HWND on windows, but it's an X Window id on X. So we introduce a new typedef wrapping that and push it through all the places in the code that needs it. Since we no longer have a GtkSocket in the WebPluginDelegateImpl, we need to do a bit more work in the WebViewDelegate (aka the browser process in the multiproc world). We also need the plugin host (the browser) to track the GtkSockets that are hosting the plugin, as well as destroy them when necessary. To do this we require the plugin owner to grab the plug-removed signal rather than putting its handler in GtkPluginContainer; this is the way it worked before I'd refactored into GtkPluginContainer so it shouldn't be so bad. This change still only works in test_shell, but the refactoring should translate to the multiprocess case pretty easily. Review URL: http://codereview.chromium.org/146009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19320 0039d316-1c4b-4281-b951-d872f2087c98
* For lack of a better approach we now initiate the plugin src url download in ↵ananta@chromium.org2009-06-101-0/+5
| | | | | | | | | | | | | a delayed task as the Flash plugin hangs if it starts receiving data before receiving valid plugin geometry. This fixes bug http://code.google.com/p/chromium/issues/detail?id=12993 Bug=12993 TEST=Navigate to google.com/finance and open the tickers in background tabs. They should not cause the browser to hang. Review URL: http://codereview.chromium.org/118452 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18033 0039d316-1c4b-4281-b951-d872f2087c98
* Start using WebURLLoader, et. al. from the WebKit API.darin@chromium.org2009-06-091-49/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | Moves our ResourceHandle to webkit/api/src/ResourceHandle.cpp from webkit/glue/resource_handle_impl.cc. A portion of resource_handle_impl.cc was moved into weburlloader_impl.{h,cc}, which now contains our implementation of WebURLLoader. The annoying parts of this CL involve WebPluginImpl. I had to convert it over to using WebURLLoader instead of ResourceHandle so that MultipartResourceDelegate can be shared. There is some complexity in WebURLRequest / WebURLResponse to make it cheap to wrap a ResourceRequest / ResourceResponse. I think this is worth it since there is a lot of conversion between the two types. Originally reviewed here: http://codereview.chromium.org/113928 BUG=10038 TEST=covered by existing tests R=dglazkov Review URL: http://codereview.chromium.org/118438 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17962 0039d316-1c4b-4281-b951-d872f2087c98
* Fix regression from my previous change. Looks like we need to call ↵jam@chromium.org2009-06-091-0/+1
| | | | | | | | | | | | SetWindowPos in setParent for the sake of layout tests. TBR=ananta Bug=12993 Review URL: http://codereview.chromium.org/119344 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17928 0039d316-1c4b-4281-b951-d872f2087c98
* Don't call NPP_SetWindow before we have the plugin geometry.jam@chromium.org2009-06-091-1/+3
| | | | | | | | | Note: the full fix to the bug also needs Ananta's change at http://codereview.chromium.org/119200 Bug=12993 Review URL: http://codereview.chromium.org/118359 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17920 0039d316-1c4b-4281-b951-d872f2087c98
* Header cleanup in webkit/gluephajdan.jr@chromium.org2009-06-011-1/+0
| | | | | | | | | - reduce header dependencies - remove redundant forward declarations Review URL: http://codereview.chromium.org/115871 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17313 0039d316-1c4b-4281-b951-d872f2087c98
* Revert WebURLLoader landing. Too many layout test failures.darin@chromium.org2009-05-301-50/+49
| | | | | | | | TBR=dglazkov Review URL: http://codereview.chromium.org/115973 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17293 0039d316-1c4b-4281-b951-d872f2087c98
* Start using WebURLLoader, et. al. from the WebKit API.darin@chromium.org2009-05-301-49/+50
| | | | | | | | | | | | | | | | | | | | | | | | Moves our ResourceHandle to webkit/api/src/ResourceHandle.cpp from webkit/glue/resource_handle_impl.cc. A portion of resource_handle_impl.cc was moved into weburlloader_impl.{h,cc}, which now contains our implementation of WebURLLoader. The annoying parts of this CL involve WebPluginImpl. I had to convert it over to using WebURLLoader instead of ResourceHandle so that MultipartResourceDelegate can be shared. There is some complexity in WebURLRequest / WebURLResponse to make it cheap to wrap a ResourceRequest / ResourceResponse. I think this is worth it since there is a lot of conversion between the two types. BUG=10038 TEST=covered by existing tests R=dglazkov Review URL: http://codereview.chromium.org/113928 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17290 0039d316-1c4b-4281-b951-d872f2087c98
* Fix plugin window sticking around when parent became invisible. Added test ↵jam@chromium.org2009-05-101-6/+0
| | | | | | | | | | | | for all different scenarios. Note I grabbed the plugin hwnd and manually checked it instead of looking for callbacks from the plugin's SetWindow since the latter isn't called if the visibility changes. BUG=1842096 TEST=regression test included, test http://chromedashboard per bug Review URL: http://codereview.chromium.org/115169 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15732 0039d316-1c4b-4281-b951-d872f2087c98
* Fix hang seen in plugin process because plugin creation ended up having to ↵jam@chromium.org2009-04-211-1/+2
| | | | | | | | | | wait on UI thread. Instead of using sync messages, the plugin hwnd is initially parented to the RenderWidgetHost's HWND. It's then lazily reparented to an intermediate HWND on the UI thread when it comes time to move it. BUG=10711 TEST=added regression tests, but testers please confirm plugins on top video sites are placed correctly. Review URL: http://codereview.chromium.org/67285 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14137 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a painting problem observed with windowless flash plugins, when they are ↵ananta@chromium.org2009-04-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | initially created with a zero clip rect, which eventually changes to a non zero clip rect. We don't send over geometry updates to the plugin if the window dimensions don't change, which is true in this case. This causes the plugin process to not send over paints to the renderer process as the plugin clip rect remains zero. The fix based on a discussion with John is to remove the check for whether the plugin dimensions changed and always send over the update geometry IPC to the plugin, where we do check whether these rects changed before calling the underlying plugin. This fixes bug http://code.google.com/p/chromium/issues/detail?id=10536 I am trying to come up with a unit test for this case. Will add it to this CB or submit those as a separate CB. Bug=10536 Review URL: http://codereview.chromium.org/73071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13822 0039d316-1c4b-4281-b951-d872f2087c98
* Port plugin messages.jam@chromium.org2009-04-011-6/+9
| | | | | | Review URL: http://codereview.chromium.org/49050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12928 0039d316-1c4b-4281-b951-d872f2087c98
* Expose whether we're in private browsing mode to plugins.I chose to ↵jam@chromium.org2009-03-261-0/+3
| | | | | | | | | implement this for multi-process mode only and not --single-process or --in-process-plugins, since I wanted to send this data from the browser process, not the renderer (in case it's exploited). BUG=158 Review URL: http://codereview.chromium.org/52037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12588 0039d316-1c4b-4281-b951-d872f2087c98