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

Unified Diff: chrome/renderer/webplugin_delegate_proxy.h

Issue 181014: Eliminate remaining WebCore dependencies from webplugin_impl.cc... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/webplugin_delegate_proxy.h
===================================================================
--- chrome/renderer/webplugin_delegate_proxy.h (revision 25087)
+++ chrome/renderer/webplugin_delegate_proxy.h (working copy)
@@ -12,6 +12,7 @@
#include "base/gfx/rect.h"
#include "base/gfx/native_widget_types.h"
#include "base/ref_counted.h"
+#include "base/weak_ptr.h"
#include "chrome/common/transport_dib.h"
#include "chrome/renderer/plugin_channel_host.h"
#include "googleurl/src/gurl.h"
@@ -34,25 +35,25 @@
// An implementation of WebPluginDelegate that proxies all calls to
// the plugin process.
-class WebPluginDelegateProxy : public WebPluginDelegate,
- public IPC::Channel::Listener,
- public IPC::Message::Sender {
+class WebPluginDelegateProxy :
+ public webkit_glue::WebPluginDelegate,
+ public IPC::Channel::Listener,
+ public IPC::Message::Sender,
+ public base::SupportsWeakPtr<WebPluginDelegateProxy> {
public:
- static WebPluginDelegateProxy* Create(const GURL& url,
- const std::string& mime_type,
- const std::string& clsid,
- RenderView* render_view);
+ static WebPluginDelegateProxy* Create(
+ const GURL& url,
+ const std::string& mime_type,
+ const std::string& clsid,
+ const base::WeakPtr<RenderView>& render_view);
- // Called to drop our back-pointer to the containing RenderView.
- void DropRenderView() { render_view_ = NULL; }
-
// Called to drop our pointer to the window script object.
void DropWindowScriptObject() { window_script_object_ = NULL; }
// WebPluginDelegate implementation:
virtual void PluginDestroyed();
virtual bool Initialize(const GURL& url, char** argn, char** argv, int argc,
- WebPlugin* plugin, bool load_manually);
+ webkit_glue::WebPlugin* plugin, bool load_manually);
virtual void UpdateGeometry(const gfx::Rect& window_rect,
const gfx::Rect& clip_rect);
virtual void Paint(gfx::NativeDrawingContext context, const gfx::Rect& rect);
@@ -87,11 +88,16 @@
virtual void DidManualLoadFail();
virtual FilePath GetPluginPath();
virtual void InstallMissingPlugin();
- virtual WebPluginResourceClient* CreateResourceClient(int resource_id,
- const GURL& url,
- bool notify_needed,
- intptr_t notify_data,
- intptr_t existing_stream);
+ virtual webkit_glue::WebPluginResourceClient* CreateResourceClient(
+ int resource_id,
+ const GURL& url,
+ bool notify_needed,
+ intptr_t notify_data,
+ intptr_t existing_stream);
+ virtual bool IsWindowless() const;
+ virtual gfx::Rect GetRect() const;
+ virtual gfx::Rect GetClipRect() const;
+ virtual int GetQuirks() const;
protected:
template<class WebPluginDelegateProxy> friend class DeleteTask;
@@ -100,7 +106,7 @@
private:
WebPluginDelegateProxy(const std::string& mime_type,
const std::string& clsid,
- RenderView* render_view);
+ const base::WeakPtr<RenderView>& render_view);
// Message handlers for messages that proxy WebPlugin methods, which
// we translate into calls to the real WebPlugin.
@@ -161,8 +167,8 @@
// point the window has already been destroyed).
void WillDestroyWindow();
- RenderView* render_view_;
- WebPlugin* plugin_;
+ base::WeakPtr<RenderView> render_view_;
+ webkit_glue::WebPlugin* plugin_;
bool windowless_;
gfx::PluginWindowHandle window_;
scoped_refptr<PluginChannelHost> channel_host_;

Powered by Google App Engine
This is Rietveld 408576698