| Index: content/browser/renderer_host/render_view_host_impl.cc
|
| diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
|
| index 84b01ffd290492a00c0f7da5711fd9b28514f956..7613dcfd42b69bf5517ba666fdf81a44d781f3c3 100644
|
| --- a/content/browser/renderer_host/render_view_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_view_host_impl.cc
|
| @@ -53,6 +53,7 @@
|
| #include "content/public/common/content_constants.h"
|
| #include "content/public/common/content_switches.h"
|
| #include "content/public/common/context_menu_params.h"
|
| +#include "content/public/common/context_menu_source_type.h"
|
| #include "content/public/common/result_codes.h"
|
| #include "content/public/common/url_constants.h"
|
| #include "net/base/net_util.h"
|
| @@ -1253,7 +1254,15 @@ void RenderViewHostImpl::OnMsgContextMenu(
|
| FilterURL(policy, renderer_id, false, &validated_params.page_url);
|
| FilterURL(policy, renderer_id, true, &validated_params.frame_url);
|
|
|
| - delegate_->ShowContextMenu(validated_params);
|
| + content::ContextMenuSourceType type = content::CONTEXT_MENU_SOURCE_MOUSE;
|
| + if (!in_process_event_types_.empty()) {
|
| + WebKit::WebInputEvent::Type event_type = in_process_event_types_.front();
|
| + if (WebKit::WebInputEvent::isGestureEventType(event_type))
|
| + type = content::CONTEXT_MENU_SOURCE_TOUCH;
|
| + else if (WebKit::WebInputEvent::isKeyboardEventType(event_type))
|
| + type = content::CONTEXT_MENU_SOURCE_KEYBOARD;
|
| + }
|
| + delegate_->ShowContextMenu(validated_params, type);
|
| }
|
|
|
| void RenderViewHostImpl::OnMsgToggleFullscreen(bool enter_fullscreen) {
|
|
|