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

Unified Diff: webkit/plugins/ppapi/event_conversion.cc

Issue 6257011: PPAPI: Add context menu events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: drive-by Created 9 years, 11 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 | « ppapi/c/pp_input_event.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/event_conversion.cc
diff --git a/webkit/plugins/ppapi/event_conversion.cc b/webkit/plugins/ppapi/event_conversion.cc
index f7d9139432772b3e0c759f15fcbab99591db0d3e..90a7f85b87933b2cedbb1cd5d6ac1aa84665ca17 100644
--- a/webkit/plugins/ppapi/event_conversion.cc
+++ b/webkit/plugins/ppapi/event_conversion.cc
@@ -36,6 +36,8 @@ PP_InputEvent_Type ConvertEventTypes(WebInputEvent::Type wetype) {
return PP_INPUTEVENT_TYPE_MOUSEENTER;
case WebInputEvent::MouseLeave:
return PP_INPUTEVENT_TYPE_MOUSELEAVE;
+ case WebInputEvent::ContextMenu:
+ return PP_INPUTEVENT_TYPE_CONTEXTMENU;
case WebInputEvent::MouseWheel:
return PP_INPUTEVENT_TYPE_MOUSEWHEEL;
case WebInputEvent::RawKeyDown:
@@ -213,6 +215,9 @@ WebMouseEvent* BuildMouseEvent(const PP_InputEvent& event) {
case PP_INPUTEVENT_TYPE_MOUSELEAVE:
mouse_event->type = WebInputEvent::MouseLeave;
break;
+ case PP_INPUTEVENT_TYPE_CONTEXTMENU:
+ mouse_event->type = WebInputEvent::ContextMenu;
+ break;
default:
NOTREACHED();
}
@@ -251,6 +256,7 @@ void CreatePPEvent(const WebInputEvent& event,
case WebInputEvent::MouseMove:
case WebInputEvent::MouseEnter:
case WebInputEvent::MouseLeave:
+ case WebInputEvent::ContextMenu:
AppendMouseEvent(event, pp_events);
break;
case WebInputEvent::MouseWheel:
@@ -280,6 +286,7 @@ WebInputEvent* CreateWebInputEvent(const PP_InputEvent& event) {
case PP_INPUTEVENT_TYPE_MOUSEMOVE:
case PP_INPUTEVENT_TYPE_MOUSEENTER:
case PP_INPUTEVENT_TYPE_MOUSELEAVE:
+ case PP_INPUTEVENT_TYPE_CONTEXTMENU:
web_input_event.reset(BuildMouseEvent(event));
break;
case PP_INPUTEVENT_TYPE_MOUSEWHEEL:
@@ -297,6 +304,6 @@ WebInputEvent* CreateWebInputEvent(const PP_InputEvent& event) {
return web_input_event.release();
}
+
} // namespace ppapi
} // namespace webkit
-
« no previous file with comments | « ppapi/c/pp_input_event.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698