Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Issue 181014: Eliminate remaining WebCore dependencies from webplugin_impl.cc... (Closed)

Created:
11 years, 3 months ago by darin (slow to review)
Modified:
9 years, 7 months ago
Reviewers:
jam
CC:
chromium-reviews_googlegroups.com, willchan no longer on Chromium, John Grabowski, Pam (message me for reviews), jam, Ben Goodger (Google), brettw, Erik does not do reviews
Visibility:
Public.

Description

Eliminate remaining WebCore dependencies from webplugin_impl.cc 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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=25184

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Total comments: 4

Patch Set 13 : '' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+956 lines, -850 lines) Patch
M base/weak_ptr.h View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_gtk.h View 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_gtk.cc View 4 5 6 7 8 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_mac.h View 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_mac.mm View 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_win.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_win.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/test/test_render_view_host.h View 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/render_messages.h View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/plugin/webplugin_delegate_stub.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/plugin/webplugin_delegate_stub.cc View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -6 lines 0 comments Download
M chrome/plugin/webplugin_proxy.h View 1 2 3 4 5 6 7 8 5 chunks +13 lines, -7 lines 0 comments Download
M chrome/plugin/webplugin_proxy.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/renderer/render_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 9 chunks +36 lines, -25 lines 1 comment Download
M chrome/renderer/render_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 11 chunks +94 lines, -104 lines 0 comments Download
M chrome/renderer/render_widget.h View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M chrome/renderer/webplugin_delegate_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +25 lines, -19 lines 0 comments Download
M chrome/renderer/webplugin_delegate_proxy.cc View 1 2 3 4 5 6 7 8 6 chunks +33 lines, -11 lines 0 comments Download
M webkit/api/public/WebFrameClient.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -3 lines 0 comments Download
M webkit/api/public/WebPlugin.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M webkit/api/public/WebPluginContainer.h View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -0 lines 0 comments Download
A webkit/api/public/WebPluginParams.h View 1 chunk +50 lines, -0 lines 0 comments Download
M webkit/api/src/WebPluginContainerImpl.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/api/src/WebPluginContainerImpl.cpp View 1 2 3 4 5 6 7 8 4 chunks +23 lines, -14 lines 0 comments Download
M webkit/glue/plugins/gtk_plugin_container_manager.h View 4 5 6 7 8 2 chunks +4 lines, -1 line 0 comments Download
M webkit/glue/plugins/gtk_plugin_container_manager.cc View 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M webkit/glue/plugins/mozilla_extensions.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M webkit/glue/plugins/plugin_instance.h View 1 2 3 4 5 6 7 8 3 chunks +9 lines, -4 lines 0 comments Download
M webkit/glue/plugins/plugin_stream.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -1 line 0 comments Download
M webkit/glue/plugins/plugin_stream_url.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M webkit/glue/plugins/webplugin_delegate_impl.h View 1 2 3 4 5 6 7 8 6 chunks +14 lines, -14 lines 0 comments Download
M webkit/glue/plugins/webplugin_delegate_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +9 lines, -6 lines 0 comments Download
M webkit/glue/plugins/webplugin_delegate_impl_gtk.cc View 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M webkit/glue/plugins/webplugin_delegate_impl_mac.mm View 4 5 6 7 8 9 10 11 2 chunks +5 lines, -1 line 0 comments Download
M webkit/glue/plugins/webplugin_delegate_impl_win.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -3 lines 0 comments Download
M webkit/glue/webframeloaderclient_impl.cc View 1 2 3 4 5 6 7 8 6 chunks +37 lines, -94 lines 0 comments Download
M webkit/glue/webplugin.h View 1 2 3 4 5 6 7 8 5 chunks +15 lines, -19 lines 0 comments Download
M webkit/glue/webplugin_delegate.h View 1 2 3 4 5 6 7 8 5 chunks +15 lines, -15 lines 0 comments Download
M webkit/glue/webplugin_delegate.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -34 lines 0 comments Download
M webkit/glue/webplugin_impl.h View 1 2 3 4 5 6 7 8 10 chunks +35 lines, -57 lines 0 comments Download
M webkit/glue/webplugin_impl.cc View 1 2 3 4 5 6 7 8 22 chunks +172 lines, -173 lines 0 comments Download
M webkit/glue/webplugin_impl_unittest.cc View 3 4 5 6 7 8 2 chunks +4 lines, -17 lines 0 comments Download
A webkit/glue/webplugin_page_delegate.h View 1 2 3 4 5 6 1 chunk +65 lines, -0 lines 0 comments Download
M webkit/glue/webview_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +6 lines, -36 lines 0 comments Download
M webkit/tools/test_shell/mac/test_webview_delegate.mm View 1 2 3 4 5 6 7 8 4 chunks +43 lines, -32 lines 0 comments Download
M webkit/tools/test_shell/test_webview_delegate.h View 1 2 3 4 5 6 7 8 10 chunks +35 lines, -19 lines 0 comments Download
M webkit/tools/test_shell/test_webview_delegate.cc View 1 2 3 4 5 6 7 8 6 chunks +16 lines, -10 lines 0 comments Download
M webkit/tools/test_shell/test_webview_delegate_gtk.cc View 4 5 6 7 8 4 chunks +46 lines, -38 lines 0 comments Download
M webkit/tools/test_shell/test_webview_delegate_win.cc View 1 2 3 4 5 6 7 8 2 chunks +72 lines, -56 lines 0 comments Download
M webkit/webkit.gyp View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
darin (slow to review)
Sorry for the huge CL! This is the last of the big plugin changes :)
11 years, 3 months ago (2009-09-01 22:58:54 UTC) #1
jam
http://codereview.chromium.org/181014/diff/3175/3214 File chrome/renderer/render_view.cc (right): http://codereview.chromium.org/181014/diff/3175/3214#newcode253 Line 253: void RenderView::PluginDestroyed(WebPluginDelegateProxy* proxy) { It doesn't look like ...
11 years, 3 months ago (2009-09-02 00:03:01 UTC) #2
darin (slow to review)
Please take another look. RenderView::first_default_plugin_ is now a WeakPtr<WebPluginDelegateProxy>. I removed the RenderView::PluginDestroyed callback. For ...
11 years, 3 months ago (2009-09-02 16:20:08 UTC) #3
jam
11 years, 3 months ago (2009-09-02 17:06:30 UTC) #4
lgtm

http://codereview.chromium.org/181014/diff/10001/10036
File chrome/renderer/render_view.h (right):

http://codereview.chromium.org/181014/diff/10001/10036#newcode369
Line 369: //XXX void PluginDestroyed(WebPluginDelegateProxy* proxy);
nit: remove

Powered by Google App Engine
This is Rietveld 408576698