Index: content/renderer/pepper/pepper_plugin_delegate_impl.h |
diff --git a/content/renderer/pepper/pepper_plugin_delegate_impl.h b/content/renderer/pepper/pepper_plugin_delegate_impl.h |
index c21ef21dace4e49c807d65cf9495f3afe0603d0c..653de6b4d5d5ef9461a06959fb5de89efa794565 100644 |
--- a/content/renderer/pepper/pepper_plugin_delegate_impl.h |
+++ b/content/renderer/pepper/pepper_plugin_delegate_impl.h |
@@ -17,6 +17,7 @@ |
#include "base/memory/weak_ptr.h" |
#include "base/observer_list.h" |
#include "content/common/content_export.h" |
+#include "content/public/renderer/context_menu_client.h" |
#include "content/public/renderer/render_view_observer.h" |
#include "content/renderer/mouse_lock_dispatcher.h" |
#include "content/renderer/pepper/pepper_parent_context_provider.h" |
@@ -66,7 +67,6 @@ struct WebCompositionUnderline; |
namespace content { |
-struct CustomContextMenuContext; |
class GamepadSharedMemoryReader; |
class PepperBrokerImpl; |
class PepperDeviceEnumerationEventHandler; |
@@ -76,7 +76,8 @@ class PepperPluginDelegateImpl |
: public webkit::ppapi::PluginDelegate, |
public base::SupportsWeakPtr<PepperPluginDelegateImpl>, |
public PepperParentContextProvider, |
- public RenderViewObserver { |
+ public RenderViewObserver, |
+ public ContextMenuClient { |
public: |
explicit PepperPluginDelegateImpl(RenderViewImpl* render_view); |
virtual ~PepperPluginDelegateImpl(); |
@@ -353,14 +354,6 @@ class PepperPluginDelegateImpl |
webkit::ppapi::PluginInstance* instance, |
webkit::ppapi::PPB_Flash_Menu_Impl* menu, |
const gfx::Point& position) OVERRIDE; |
- void OnContextMenuClosed( |
- const CustomContextMenuContext& custom_context); |
- void OnCustomContextMenuAction( |
- const CustomContextMenuContext& custom_context, |
- unsigned action); |
- void CompleteShowContextMenu(int request_id, |
- bool did_select, |
- unsigned action); |
virtual webkit::ppapi::FullscreenContainer* |
CreateFullscreenContainer( |
webkit::ppapi::PluginInstance* instance) OVERRIDE; |
@@ -471,6 +464,10 @@ class PepperPluginDelegateImpl |
scoped_refptr<PepperBrokerImpl> CreateBroker( |
webkit::ppapi::PluginModule* plugin_module); |
+ // ContextMenuClient implementation. |
+ virtual void OnMenuAction(int request_id, unsigned action) OVERRIDE; |
+ virtual void OnMenuClosed(int request_id) OVERRIDE; |
+ |
// Implementation of PepperParentContextProvider. |
virtual WebGraphicsContext3DCommandBufferImpl* |
GetParentContextForPlatformContext3D() OVERRIDE; |
@@ -504,8 +501,10 @@ class PepperPluginDelegateImpl |
IDMap<ppapi::PPB_HostResolver_Shared> host_resolvers_; |
- IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>, |
- IDMapOwnPointer> pending_context_menus_; |
+ // Maps context menu request IDs to the menu resource to receive the result. |
+ typedef std::map<int, scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl> > |
+ PendingContextMenuMap; |
+ PendingContextMenuMap pending_context_menus_; |
typedef IDMap<scoped_refptr<PepperBrokerImpl>, IDMapOwnPointer> BrokerMap; |
BrokerMap pending_connect_broker_; |