| 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/gfx/rect.h" | 11 #include "base/gfx/rect.h" |
| 12 #include "base/ref_counted.h" | 12 #include "base/ref_counted.h" |
| 13 #include "base/scoped_handle.h" |
| 13 #include "chrome/common/ipc_message.h" | 14 #include "chrome/common/ipc_message.h" |
| 14 #include "chrome/common/plugin_messages.h" | 15 #include "chrome/common/plugin_messages.h" |
| 15 #include "chrome/plugin/npobject_stub.h" | 16 #include "chrome/plugin/npobject_stub.h" |
| 16 #include "chrome/renderer/plugin_channel_host.h" | 17 #include "chrome/renderer/plugin_channel_host.h" |
| 17 #include "webkit/glue/webplugin.h" | 18 #include "webkit/glue/webplugin.h" |
| 18 #include "webkit/glue/webplugin_delegate.h" | 19 #include "webkit/glue/webplugin_delegate.h" |
| 19 | 20 |
| 20 class GURL; | 21 class GURL; |
| 21 struct PluginHostMsg_RouteToFrame_Params; | 22 struct PluginHostMsg_RouteToFrame_Params; |
| 22 class RenderView; | 23 class RenderView; |
| 23 class SkBitmap; | 24 class SkBitmap; |
| 25 namespace gfx { |
| 26 class PlatformCanvasWin; |
| 27 } |
| 28 |
| 24 | 29 |
| 25 // An implementation of WebPluginDelegate that proxies all calls to | 30 // An implementation of WebPluginDelegate that proxies all calls to |
| 26 // the plugin process. | 31 // the plugin process. |
| 27 class WebPluginDelegateProxy : public WebPluginDelegate, | 32 class WebPluginDelegateProxy : public WebPluginDelegate, |
| 28 public IPC::Channel::Listener, | 33 public IPC::Channel::Listener, |
| 29 public IPC::Message::Sender { | 34 public IPC::Message::Sender { |
| 30 public: | 35 public: |
| 31 static WebPluginDelegateProxy* Create(const GURL& url, | 36 static WebPluginDelegateProxy* Create(const GURL& url, |
| 32 const std::string& mime_type, | 37 const std::string& mime_type, |
| 33 const std::string& clsid, | 38 const std::string& clsid, |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 gfx::Rect plugin_rect_; | 140 gfx::Rect plugin_rect_; |
| 136 gfx::Rect deferred_clip_rect_; | 141 gfx::Rect deferred_clip_rect_; |
| 137 bool send_deferred_update_geometry_; | 142 bool send_deferred_update_geometry_; |
| 138 bool visible_; | 143 bool visible_; |
| 139 | 144 |
| 140 NPObject* npobject_; | 145 NPObject* npobject_; |
| 141 NPObjectStub* window_script_object_; | 146 NPObjectStub* window_script_object_; |
| 142 | 147 |
| 143 // Event passed in by the plugin process and is used to decide if | 148 // Event passed in by the plugin process and is used to decide if |
| 144 // messages need to be pumped in the NPP_HandleEvent sync call. | 149 // messages need to be pumped in the NPP_HandleEvent sync call. |
| 145 HANDLE modal_loop_pump_messages_event_; | 150 ScopedHandle modal_loop_pump_messages_event_; |
| 146 | 151 |
| 147 // Bitmap for crashed plugin | 152 // Bitmap for crashed plugin |
| 148 SkBitmap* sad_plugin_; | 153 SkBitmap* sad_plugin_; |
| 149 | 154 |
| 155 // Used for desynchronized windowless painting. See the comment in |
| 156 // webplugin_proxy.h for information about how this works. |
| 157 scoped_ptr<SharedMemory> windowless_buffer_; |
| 158 scoped_ptr<gfx::PlatformCanvasWin> windowless_canvas_; |
| 159 ScopedHandle windowless_buffer_lock_; |
| 160 |
| 150 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateProxy); | 161 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateProxy); |
| 151 }; | 162 }; |
| 152 | 163 |
| 153 #endif // #ifndef CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H__ | 164 #endif // #ifndef CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H__ |
| 154 | 165 |
| OLD | NEW |