| Index: content/browser/web_contents/web_contents_view_aura.cc
|
| diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
|
| index a899bf3310432a94005c43bb5e7b1cab8dd8053d..469f5984b0ca276378c7909998598e0f1a34119e 100644
|
| --- a/content/browser/web_contents/web_contents_view_aura.cc
|
| +++ b/content/browser/web_contents/web_contents_view_aura.cc
|
| @@ -951,11 +951,12 @@ void WebContentsViewAura::ShowContextMenu(RenderFrameHost* render_frame_host,
|
| selection_controller_client->HandleContextMenu(params)) {
|
| return;
|
| }
|
| +
|
| if (delegate_) {
|
| RenderWidgetHostViewAura* view = ToRenderWidgetHostViewAura(
|
| web_contents_->GetRenderWidgetHostView());
|
| - if (view)
|
| - view->OnShowContextMenu();
|
| + if (view && !view->OnShowContextMenu(params))
|
| + return;
|
|
|
| delegate_->ShowContextMenu(render_frame_host, params);
|
| // WARNING: we may have been deleted during the call to ShowContextMenu().
|
| @@ -1189,16 +1190,16 @@ void WebContentsViewAura::OnKeyEvent(ui::KeyEvent* event) {
|
| }
|
|
|
| void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* event) {
|
| - if (!web_contents_->GetDelegate())
|
| - return;
|
| -
|
| - ui::EventType type = event->type();
|
| - if (type == ui::ET_MOUSE_PRESSED)
|
| - web_contents_->GetDelegate()->ActivateContents(web_contents_);
|
| -
|
| - web_contents_->GetDelegate()->ContentsMouseEvent(
|
| - web_contents_,
|
| - gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(),
|
| + if (!web_contents_->GetDelegate())
|
| + return;
|
| +
|
| + ui::EventType type = event->type();
|
| + if (type == ui::ET_MOUSE_PRESSED)
|
| + web_contents_->GetDelegate()->ActivateContents(web_contents_);
|
| +
|
| + web_contents_->GetDelegate()->ContentsMouseEvent(
|
| + web_contents_,
|
| + gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(),
|
| type == ui::ET_MOUSE_MOVED, type == ui::ET_MOUSE_EXITED);
|
| }
|
|
|
|
|