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

Unified Diff: webkit/glue/plugins/plugin_host.cc

Issue 113637: Wire up windowless plugins. Mostly Mac related, some cross (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.cc ('k') | webkit/glue/plugins/webplugin_delegate_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/plugin_host.cc
===================================================================
--- webkit/glue/plugins/plugin_host.cc (revision 20445)
+++ webkit/glue/plugins/plugin_host.cc (working copy)
@@ -600,22 +600,19 @@
DCHECK(plugin.get() != NULL);
if (plugin.get() && plugin->webplugin()) {
if (invalidRect) {
+#if defined(OS_WIN)
if (!plugin->windowless()) {
-#if defined(OS_WIN)
RECT rect = {0};
rect.left = invalidRect->left;
rect.right = invalidRect->right;
rect.top = invalidRect->top;
rect.bottom = invalidRect->bottom;
::InvalidateRect(plugin->window_handle(), &rect, FALSE);
-#elif defined(OS_MACOSX)
- NOTIMPLEMENTED();
-#else
- NOTIMPLEMENTED();
-#endif
return;
}
-
+#elif defined(OS_LINUX)
+ NOTIMPLEMENTED();
+#endif
gfx::Rect rect(invalidRect->left,
invalidRect->top,
invalidRect->right - invalidRect->left,
@@ -633,8 +630,13 @@
//
// Similar to NPN_InvalidateRect.
- // TODO: implement me
- DLOG(INFO) << "NPN_InvalidateRegion is not implemented yet.";
+ // TODO: this is overkill--add platform-specific region handling (at the
+ // very least, fetch the region's bounding box and pass it to InvalidateRect).
+ scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ DCHECK(plugin.get() != NULL);
+ if (plugin.get() && plugin->webplugin()) {
+ plugin->webplugin()->Invalidate();
+ }
}
void NPN_ForceRedraw(NPP id) {
@@ -652,10 +654,8 @@
// settings. The HDC settings must be restored whenever control returns
// back to the browser, either before returning from NPP_HandleEvent or
// before calling a drawing-related netscape method.
- //
- // TODO: implement me
- DLOG(INFO) << "NPN_ForceRedraw is not implemented yet.";
+ NOTIMPLEMENTED();
}
NPError NPN_GetValue(NPP id, NPNVariable variable, void *value) {
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.cc ('k') | webkit/glue/plugins/webplugin_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698