summaryrefslogtreecommitdiffstats
path: root/chrome/plugin/webplugin_proxy.h
diff options
context:
space:
mode:
authoramanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-11 01:57:28 +0000
committeramanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-11 01:57:28 +0000
commit6bf1a81cdfcc48f20cf53c2601f4456f2d9d30ef (patch)
tree7bedf19228a20b83189ab96e617e72210991c7c4 /chrome/plugin/webplugin_proxy.h
parent7e05f6c4baad4f81e06835b83febe2784568ebe1 (diff)
downloadchromium_src-6bf1a81cdfcc48f20cf53c2601f4456f2d9d30ef.zip
chromium_src-6bf1a81cdfcc48f20cf53c2601f4456f2d9d30ef.tar.gz
chromium_src-6bf1a81cdfcc48f20cf53c2601f4456f2d9d30ef.tar.bz2
Wire up windowless plugins. Mostly Mac related, some cross
platform aspects. BUG=10809 TEST=none Review URL: http://codereview.chromium.org/113637 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20453 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin/webplugin_proxy.h')
-rw-r--r--chrome/plugin/webplugin_proxy.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/chrome/plugin/webplugin_proxy.h b/chrome/plugin/webplugin_proxy.h
index 103be5c..a55a3da2 100644
--- a/chrome/plugin/webplugin_proxy.h
+++ b/chrome/plugin/webplugin_proxy.h
@@ -9,6 +9,9 @@
#include "base/hash_tables.h"
#include "base/ref_counted.h"
+#if defined(OS_MACOSX)
+#include "base/scoped_cftyperef.h"
+#endif
#include "base/scoped_handle.h"
#include "base/scoped_ptr.h"
#include "base/shared_memory.h"
@@ -104,8 +107,8 @@ class WebPluginProxy : public WebPlugin {
void UpdateGeometry(const gfx::Rect& window_rect,
const gfx::Rect& clip_rect,
- const TransportDIB::Id& windowless_buffer,
- const TransportDIB::Id& background_buffer);
+ const TransportDIB::Handle& windowless_buffer,
+ const TransportDIB::Handle& background_buffer);
void CancelDocumentLoad();
@@ -129,22 +132,22 @@ class WebPluginProxy : public WebPlugin {
// Handler for sending over the paint event to the plugin.
void OnPaint(const gfx::Rect& damaged_rect);
-#if defined(OS_WIN)
// Updates the shared memory section where windowless plugins paint.
- void SetWindowlessBuffer(const base::SharedMemoryHandle& windowless_buffer,
- const base::SharedMemoryHandle& background_buffer);
+ void SetWindowlessBuffer(const TransportDIB::Handle& windowless_buffer,
+ const TransportDIB::Handle& background_buffer);
+#if defined(OS_WIN)
// Converts a shared memory section handle from the renderer process into a
// bitmap and hdc that are mapped to this process.
void ConvertBuffer(const base::SharedMemoryHandle& buffer,
ScopedHandle* shared_section,
ScopedBitmap* bitmap,
ScopedHDC* hdc);
+#endif
// Called when a plugin's origin moves, so that we can update the world
// transform of the local HDC.
void UpdateTransform();
-#endif
typedef base::hash_map<int, WebPluginResourceClient*> ResourceClientMap;
ResourceClientMap resource_clients_;
@@ -174,6 +177,11 @@ class WebPluginProxy : public WebPlugin {
ScopedHandle background_shared_section_;
ScopedBitmap background_bitmap_;
ScopedHDC background_hdc_;
+#elif defined(OS_MACOSX)
+ scoped_ptr<TransportDIB> windowless_dib_;
+ scoped_ptr<TransportDIB> background_dib_;
+ scoped_cftyperef<CGContextRef> windowless_context_;
+ scoped_cftyperef<CGContextRef> background_context_;
#endif
ScopedRunnableMethodFactory<WebPluginProxy> runnable_method_factory_;