| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H__ | 5 #ifndef CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H__ |
| 6 #define CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H__ | 6 #define CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H__ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 // An implementation of WebPluginDelegate that proxies all calls to | 37 // An implementation of WebPluginDelegate that proxies all calls to |
| 38 // the plugin process. | 38 // the plugin process. |
| 39 class WebPluginDelegateProxy : | 39 class WebPluginDelegateProxy : |
| 40 public webkit_glue::WebPluginDelegate, | 40 public webkit_glue::WebPluginDelegate, |
| 41 public IPC::Channel::Listener, | 41 public IPC::Channel::Listener, |
| 42 public IPC::Message::Sender, | 42 public IPC::Message::Sender, |
| 43 public base::SupportsWeakPtr<WebPluginDelegateProxy> { | 43 public base::SupportsWeakPtr<WebPluginDelegateProxy> { |
| 44 public: | 44 public: |
| 45 WebPluginDelegateProxy(const std::string& mime_type, | 45 WebPluginDelegateProxy(const std::string& mime_type, |
| 46 const std::string& clsid, | |
| 47 const base::WeakPtr<RenderView>& render_view); | 46 const base::WeakPtr<RenderView>& render_view); |
| 48 | 47 |
| 49 // Called to drop our pointer to the window script object. | 48 // Called to drop our pointer to the window script object. |
| 50 void DropWindowScriptObject() { window_script_object_ = NULL; } | 49 void DropWindowScriptObject() { window_script_object_ = NULL; } |
| 51 | 50 |
| 52 // WebPluginDelegate implementation: | 51 // WebPluginDelegate implementation: |
| 53 virtual void PluginDestroyed(); | 52 virtual void PluginDestroyed(); |
| 54 virtual bool Initialize(const GURL& url, | 53 virtual bool Initialize(const GURL& url, |
| 55 const std::vector<std::string>& arg_names, | 54 const std::vector<std::string>& arg_names, |
| 56 const std::vector<std::string>& arg_values, | 55 const std::vector<std::string>& arg_values, |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 // plugin window gets destroyed, or when the plugin has crashed (at which | 158 // plugin window gets destroyed, or when the plugin has crashed (at which |
| 160 // point the window has already been destroyed). | 159 // point the window has already been destroyed). |
| 161 void WillDestroyWindow(); | 160 void WillDestroyWindow(); |
| 162 | 161 |
| 163 base::WeakPtr<RenderView> render_view_; | 162 base::WeakPtr<RenderView> render_view_; |
| 164 webkit_glue::WebPlugin* plugin_; | 163 webkit_glue::WebPlugin* plugin_; |
| 165 bool windowless_; | 164 bool windowless_; |
| 166 gfx::PluginWindowHandle window_; | 165 gfx::PluginWindowHandle window_; |
| 167 scoped_refptr<PluginChannelHost> channel_host_; | 166 scoped_refptr<PluginChannelHost> channel_host_; |
| 168 std::string mime_type_; | 167 std::string mime_type_; |
| 169 std::string clsid_; | |
| 170 int instance_id_; | 168 int instance_id_; |
| 171 WebPluginInfo info_; | 169 WebPluginInfo info_; |
| 172 | 170 |
| 173 gfx::Rect plugin_rect_; | 171 gfx::Rect plugin_rect_; |
| 174 | 172 |
| 175 NPObject* npobject_; | 173 NPObject* npobject_; |
| 176 NPObjectStub* window_script_object_; | 174 NPObjectStub* window_script_object_; |
| 177 | 175 |
| 178 // Event passed in by the plugin process and is used to decide if | 176 // Event passed in by the plugin process and is used to decide if |
| 179 // messages need to be pumped in the NPP_HandleEvent sync call. | 177 // messages need to be pumped in the NPP_HandleEvent sync call. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 200 // This lets us know which portion of the backing store has been painted into. | 198 // This lets us know which portion of the backing store has been painted into. |
| 201 gfx::Rect backing_store_painted_; | 199 gfx::Rect backing_store_painted_; |
| 202 | 200 |
| 203 // The url of the main frame hosting the plugin. | 201 // The url of the main frame hosting the plugin. |
| 204 GURL page_url_; | 202 GURL page_url_; |
| 205 | 203 |
| 206 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateProxy); | 204 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateProxy); |
| 207 }; | 205 }; |
| 208 | 206 |
| 209 #endif // CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ | 207 #endif // CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ |
| OLD | NEW |