summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webplugin_impl.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-13 22:18:58 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-13 22:18:58 +0000
commita2d489b22f9e3f361adeaf7a09ae88510a2bb1e3 (patch)
treeff3dd61a3278c60286a820e9f07952e4571743e5 /webkit/glue/webplugin_impl.cc
parent16ead307a2b27b7d02bae66792eaf3c2f904b9c0 (diff)
downloadchromium_src-a2d489b22f9e3f361adeaf7a09ae88510a2bb1e3.zip
chromium_src-a2d489b22f9e3f361adeaf7a09ae88510a2bb1e3.tar.gz
chromium_src-a2d489b22f9e3f361adeaf7a09ae88510a2bb1e3.tar.bz2
Basic windowless plugins, try 2.
In response to Dean's comment on http://codereview.chromium.org/39105, I redid that patch to put the X munging into the plugin implementation. This won't work for multiproc, but it's near the correct place and many things will need to be changed for multiproc. Review URL: http://codereview.chromium.org/42056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11674 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webplugin_impl.cc')
-rw-r--r--webkit/glue/webplugin_impl.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index 09b6974..5027d5a 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -718,15 +718,12 @@ void WebPluginImpl::paint(WebCore::GraphicsContext* gc,
gc->translate(static_cast<float>(origin.x()),
static_cast<float>(origin.y()));
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(OS_LINUX)
// Note that |context| is only used when in windowless mode.
gfx::NativeDrawingContext context =
gc->platformContext()->canvas()->beginPlatformPaint();
-#elif defined (OS_MACOSX)
+#elif defined(OS_MACOSX)
gfx::NativeDrawingContext context = gc->platformContext();
-#else
- // TODO(port): the equivalent of the above.
- void* context = NULL; // Temporary, to reduce ifdefs.
#endif
WebCore::IntRect window_rect =
@@ -735,7 +732,7 @@ void WebPluginImpl::paint(WebCore::GraphicsContext* gc,
delegate_->Paint(context, webkit_glue::FromIntRect(window_rect));
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(OS_LINUX)
gc->platformContext()->canvas()->endPlatformPaint();
#endif
gc->restore();