| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 |
| 11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 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 base::WeakPtr<RenderView>& render_view); | 46 const base::WeakPtr<RenderView>& render_view); |
| 47 | 47 |
| 48 // Called to drop our pointer to the window script object. | |
| 49 void DropWindowScriptObject() { window_script_object_ = NULL; } | |
| 50 | |
| 51 // WebPluginDelegate implementation: | 48 // WebPluginDelegate implementation: |
| 52 virtual void PluginDestroyed(); | 49 virtual void PluginDestroyed(); |
| 53 virtual bool Initialize(const GURL& url, | 50 virtual bool Initialize(const GURL& url, |
| 54 const std::vector<std::string>& arg_names, | 51 const std::vector<std::string>& arg_names, |
| 55 const std::vector<std::string>& arg_values, | 52 const std::vector<std::string>& arg_values, |
| 56 webkit_glue::WebPlugin* plugin, | 53 webkit_glue::WebPlugin* plugin, |
| 57 bool load_manually); | 54 bool load_manually); |
| 58 virtual void UpdateGeometry(const gfx::Rect& window_rect, | 55 virtual void UpdateGeometry(const gfx::Rect& window_rect, |
| 59 const gfx::Rect& clip_rect); | 56 const gfx::Rect& clip_rect); |
| 60 virtual void Paint(gfx::NativeDrawingContext context, const gfx::Rect& rect); | 57 virtual void Paint(gfx::NativeDrawingContext context, const gfx::Rect& rect); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 bool windowless_; | 161 bool windowless_; |
| 165 gfx::PluginWindowHandle window_; | 162 gfx::PluginWindowHandle window_; |
| 166 scoped_refptr<PluginChannelHost> channel_host_; | 163 scoped_refptr<PluginChannelHost> channel_host_; |
| 167 std::string mime_type_; | 164 std::string mime_type_; |
| 168 int instance_id_; | 165 int instance_id_; |
| 169 WebPluginInfo info_; | 166 WebPluginInfo info_; |
| 170 | 167 |
| 171 gfx::Rect plugin_rect_; | 168 gfx::Rect plugin_rect_; |
| 172 | 169 |
| 173 NPObject* npobject_; | 170 NPObject* npobject_; |
| 174 NPObjectStub* window_script_object_; | 171 base::WeakPtr<NPObjectStub> window_script_object_; |
| 175 | 172 |
| 176 // Event passed in by the plugin process and is used to decide if | 173 // Event passed in by the plugin process and is used to decide if |
| 177 // messages need to be pumped in the NPP_HandleEvent sync call. | 174 // messages need to be pumped in the NPP_HandleEvent sync call. |
| 178 scoped_ptr<base::WaitableEvent> modal_loop_pump_messages_event_; | 175 scoped_ptr<base::WaitableEvent> modal_loop_pump_messages_event_; |
| 179 | 176 |
| 180 // Bitmap for crashed plugin | 177 // Bitmap for crashed plugin |
| 181 SkBitmap* sad_plugin_; | 178 SkBitmap* sad_plugin_; |
| 182 | 179 |
| 183 // True if we got an invalidate from the plugin and are waiting for a paint. | 180 // True if we got an invalidate from the plugin and are waiting for a paint. |
| 184 bool invalidate_pending_; | 181 bool invalidate_pending_; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 198 // This lets us know which portion of the backing store has been painted into. | 195 // This lets us know which portion of the backing store has been painted into. |
| 199 gfx::Rect backing_store_painted_; | 196 gfx::Rect backing_store_painted_; |
| 200 | 197 |
| 201 // The url of the main frame hosting the plugin. | 198 // The url of the main frame hosting the plugin. |
| 202 GURL page_url_; | 199 GURL page_url_; |
| 203 | 200 |
| 204 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateProxy); | 201 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateProxy); |
| 205 }; | 202 }; |
| 206 | 203 |
| 207 #endif // CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ | 204 #endif // CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ |
| OLD | NEW |