summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webplugin_impl.cc
diff options
context:
space:
mode:
authoramanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-11 06:55:53 +0000
committeramanda@chromium.org <amanda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-11 06:55:53 +0000
commit017882554c41b6030a12d50b4044449e3c2409ac (patch)
tree5cb159fea9feafceb5260e7446cddf380799b182 /webkit/glue/webplugin_impl.cc
parent3335d879a364867309a93749cc9e4805bd92d114 (diff)
downloadchromium_src-017882554c41b6030a12d50b4044449e3c2409ac.zip
chromium_src-017882554c41b6030a12d50b4044449e3c2409ac.tar.gz
chromium_src-017882554c41b6030a12d50b4044449e3c2409ac.tar.bz2
Checkpoint of plugin support code for Mac. Does not work yet; being checked
in to help stay in sync with linux plugin mods and ensure that it doesn't break Windows plugins. Review URL: http://codereview.chromium.org/21095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9558 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webplugin_impl.cc')
-rw-r--r--webkit/glue/webplugin_impl.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index 8c7b199..fef6f75e 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -56,7 +56,7 @@ MSVC_POP_WARNING();
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webplugin_impl.h"
#include "webkit/glue/plugins/plugin_host.h"
-#if defined(OS_WIN)
+#if !defined(OS_LINUX)
#include "webkit/glue/plugins/plugin_instance.h"
#endif
#include "webkit/glue/stacking_order_iterator.h"
@@ -702,18 +702,21 @@ void WebPluginImpl::paint(WebCore::GraphicsContext* gc,
static_cast<float>(origin.y()));
#if defined(OS_WIN)
- // Note that HDC is only used when in windowless mode.
- HDC dc = gc->platformContext()->canvas()->beginPlatformPaint();
+ // Note that |context| is only used when in windowless mode.
+ gfx::NativeDrawingContext context =
+ gc->platformContext()->canvas()->beginPlatformPaint();
+#elif defined (OS_MACOSX)
+ gfx::NativeDrawingContext context = gc->platformContext();
#else
// TODO(port): the equivalent of the above.
- void* dc = NULL; // Temporary, to reduce ifdefs.
+ void* context = NULL; // Temporary, to reduce ifdefs.
#endif
WebCore::IntRect window_rect =
WebCore::IntRect(view->contentsToWindow(damage_rect.location()),
damage_rect.size());
- delegate_->Paint(dc, webkit_glue::FromIntRect(window_rect));
+ delegate_->Paint(context, webkit_glue::FromIntRect(window_rect));
#if defined(OS_WIN)
gc->platformContext()->canvas()->endPlatformPaint();
@@ -730,7 +733,8 @@ void WebPluginImpl::print(WebCore::GraphicsContext* gc) {
gc->save();
#if defined(OS_WIN)
- HDC hdc = gc->platformContext()->canvas()->beginPlatformPaint();
+ gfx::NativeDrawingContext hdc =
+ gc->platformContext()->canvas()->beginPlatformPaint();
delegate_->Print(hdc);
gc->platformContext()->canvas()->endPlatformPaint();
#else