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

Side by Side Diff: chrome/renderer/webplugin_delegate_proxy.h

Issue 14110: Move the "platform" wrappers in skia/ext to the skia namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/render_widget.cc ('k') | chrome/renderer/webplugin_delegate_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/scoped_handle.h"
14 #include "chrome/common/ipc_message.h" 14 #include "chrome/common/ipc_message.h"
15 #include "chrome/common/plugin_messages.h" 15 #include "chrome/common/plugin_messages.h"
16 #include "chrome/plugin/npobject_stub.h" 16 #include "chrome/plugin/npobject_stub.h"
17 #include "chrome/renderer/plugin_channel_host.h" 17 #include "chrome/renderer/plugin_channel_host.h"
18 #include "webkit/glue/webplugin.h" 18 #include "webkit/glue/webplugin.h"
19 #include "webkit/glue/webplugin_delegate.h" 19 #include "webkit/glue/webplugin_delegate.h"
20 20
21 class GURL; 21 class GURL;
22 struct PluginHostMsg_RouteToFrame_Params; 22 struct PluginHostMsg_RouteToFrame_Params;
23 class RenderView; 23 class RenderView;
24 class SkBitmap; 24 class SkBitmap;
25 namespace gfx { 25
26 namespace skia {
26 class PlatformCanvasWin; 27 class PlatformCanvasWin;
27 } 28 }
28 29
29
30 // An implementation of WebPluginDelegate that proxies all calls to 30 // An implementation of WebPluginDelegate that proxies all calls to
31 // the plugin process. 31 // the plugin process.
32 class WebPluginDelegateProxy : public WebPluginDelegate, 32 class WebPluginDelegateProxy : public WebPluginDelegate,
33 public IPC::Channel::Listener, 33 public IPC::Channel::Listener,
34 public IPC::Message::Sender { 34 public IPC::Message::Sender {
35 public: 35 public:
36 static WebPluginDelegateProxy* Create(const GURL& url, 36 static WebPluginDelegateProxy* Create(const GURL& url,
37 const std::string& mime_type, 37 const std::string& mime_type,
38 const std::string& clsid, 38 const std::string& clsid,
39 RenderView* render_view); 39 RenderView* render_view);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 bool BackgroundChanged(HDC hdc, const gfx::Rect& rect); 138 bool BackgroundChanged(HDC hdc, const gfx::Rect& rect);
139 139
140 // Copies the given rectangle from the transport bitmap to the backing store. 140 // Copies the given rectangle from the transport bitmap to the backing store.
141 void CopyFromTransportToBacking(const gfx::Rect& rect); 141 void CopyFromTransportToBacking(const gfx::Rect& rect);
142 142
143 // Clears the shared memory section and canvases used for windowless plugins. 143 // Clears the shared memory section and canvases used for windowless plugins.
144 void ResetWindowlessBitmaps(); 144 void ResetWindowlessBitmaps();
145 145
146 // Creates a shared memory section and canvas. 146 // Creates a shared memory section and canvas.
147 bool CreateBitmap(scoped_ptr<base::SharedMemory>* memory, 147 bool CreateBitmap(scoped_ptr<base::SharedMemory>* memory,
148 scoped_ptr<gfx::PlatformCanvasWin>* canvas); 148 scoped_ptr<skia::PlatformCanvasWin>* canvas);
149 149
150 RenderView* render_view_; 150 RenderView* render_view_;
151 WebPlugin* plugin_; 151 WebPlugin* plugin_;
152 bool windowless_; 152 bool windowless_;
153 scoped_refptr<PluginChannelHost> channel_host_; 153 scoped_refptr<PluginChannelHost> channel_host_;
154 std::string mime_type_; 154 std::string mime_type_;
155 std::string clsid_; 155 std::string clsid_;
156 int instance_id_; 156 int instance_id_;
157 std::wstring plugin_path_; 157 std::wstring plugin_path_;
158 158
(...skipping 16 matching lines...) Expand all
175 // True if we got an invalidate from the plugin and are waiting for a paint. 175 // True if we got an invalidate from the plugin and are waiting for a paint.
176 bool invalidate_pending_; 176 bool invalidate_pending_;
177 177
178 // Used to desynchronize windowless painting. When WebKit paints, we bitblt 178 // Used to desynchronize windowless painting. When WebKit paints, we bitblt
179 // from our backing store of what the plugin rectangle looks like. The 179 // from our backing store of what the plugin rectangle looks like. The
180 // plugin paints into the transport store, and we copy that to our backing 180 // plugin paints into the transport store, and we copy that to our backing
181 // store when we get an invalidate from it. The background bitmap is used 181 // store when we get an invalidate from it. The background bitmap is used
182 // for transparent plugins, as they need the backgroud data during painting. 182 // for transparent plugins, as they need the backgroud data during painting.
183 bool transparent_; 183 bool transparent_;
184 scoped_ptr<base::SharedMemory> backing_store_; 184 scoped_ptr<base::SharedMemory> backing_store_;
185 scoped_ptr<gfx::PlatformCanvasWin> backing_store_canvas_; 185 scoped_ptr<skia::PlatformCanvasWin> backing_store_canvas_;
186 scoped_ptr<base::SharedMemory> transport_store_; 186 scoped_ptr<base::SharedMemory> transport_store_;
187 scoped_ptr<gfx::PlatformCanvasWin> transport_store_canvas_; 187 scoped_ptr<skia::PlatformCanvasWin> transport_store_canvas_;
188 scoped_ptr<base::SharedMemory> background_store_; 188 scoped_ptr<base::SharedMemory> background_store_;
189 scoped_ptr<gfx::PlatformCanvasWin> background_store_canvas_; 189 scoped_ptr<skia::PlatformCanvasWin> background_store_canvas_;
190 // This lets us know which portion of the backing store has been painted into. 190 // This lets us know which portion of the backing store has been painted into.
191 gfx::Rect backing_store_painted_; 191 gfx::Rect backing_store_painted_;
192 192
193 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateProxy); 193 DISALLOW_EVIL_CONSTRUCTORS(WebPluginDelegateProxy);
194 }; 194 };
195 195
196 #endif // #ifndef CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H__ 196 #endif // #ifndef CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H__
197 197
OLDNEW
« no previous file with comments | « chrome/renderer/render_widget.cc ('k') | chrome/renderer/webplugin_delegate_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698