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

Unified Diff: chrome/renderer/webplugin_delegate_proxy.h

Issue 417005: Add acknowledgement messages for PluginMsg_UpdateGeometry (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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/plugin/webplugin_proxy.cc ('k') | chrome/renderer/webplugin_delegate_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/webplugin_delegate_proxy.h
===================================================================
--- chrome/renderer/webplugin_delegate_proxy.h (revision 33240)
+++ chrome/renderer/webplugin_delegate_proxy.h (working copy)
@@ -22,6 +22,11 @@
#include "webkit/glue/webplugininfo.h"
#include "webkit/glue/webplugin_delegate.h"
+#if defined(OS_MACOSX)
+#include "base/hash_tables.h"
+#include "base/linked_ptr.h"
+#endif
+
struct NPObject;
class NPObjectStub;
struct NPVariant_Param;
@@ -133,6 +138,10 @@
intptr_t notify_data);
void OnDeferResourceLoading(int resource_id, bool defer);
+#if defined(OS_MACOSX)
+ void OnUpdateGeometry_ACK(int ack_key);
+#endif
+
// Draw a graphic indicating a crashed plugin.
void PaintSadPlugin(WebKit::WebCanvas* canvas, const gfx::Rect& rect);
@@ -156,6 +165,24 @@
// point the window has already been destroyed).
void WillDestroyWindow();
+#if defined(OS_MACOSX)
+ // The Mac TransportDIB implementation uses base::SharedMemory, which
+ // cannot be disposed of if an in-flight UpdateGeometry message refers to
+ // the shared memory file descriptor. The old_transport_dibs_ map holds
+ // old TransportDIBs waiting to die. It's keyed by the |ack_key| values
+ // used in UpdateGeometry messages. When an UpdateGeometry_ACK message
+ // arrives, the associated RelatedTransportDIBs can be released.
+ struct RelatedTransportDIBs {
+ linked_ptr<TransportDIB> backing_store;
+ linked_ptr<TransportDIB> transport_store;
+ linked_ptr<TransportDIB> background_store;
+ };
+
+ typedef base::hash_map<int, RelatedTransportDIBs> OldTransportDIBMap;
+
+ OldTransportDIBMap old_transport_dibs_;
+#endif // OS_MACOSX
+
base::WeakPtr<RenderView> render_view_;
webkit_glue::WebPlugin* plugin_;
bool windowless_;
« no previous file with comments | « chrome/plugin/webplugin_proxy.cc ('k') | chrome/renderer/webplugin_delegate_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698