| Index: chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.cc
|
| diff --git a/chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.cc b/chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.cc
|
| index cc97dcc665fd68e2a196934b8cd90c0b3f4e4f0e..473bc750ab6d06bacd5a138686fc0c8213269af1 100644
|
| --- a/chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.cc
|
| +++ b/chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.cc
|
| @@ -34,18 +34,19 @@ void ChromeWebContentsViewDelegateAndroid::ShowContextMenu(
|
| if (params.is_editable && params.selection_text.empty()) {
|
| content::ContentViewCore* content_view_core =
|
| content::ContentViewCore::FromWebContents(web_contents_);
|
| - if (content_view_core) {
|
| - content_view_core->ShowPastePopup(params.selection_start.x(),
|
| - params.selection_start.y());
|
| + if (content_view_core &&
|
| + content_view_core->ShowPastePopup(params.selection_start.x(),
|
| + params.selection_start.y()))
|
| + return;
|
| + } else {
|
| + // TODO(dtrainor, kouhei): Give WebView a Populator/delegate so it can use
|
| + // the same context menu code.
|
| + ContextMenuHelper* helper =
|
| + ContextMenuHelper::FromWebContents(web_contents_);
|
| + if (helper && helper->ShowContextMenu(params))
|
| return;
|
| - }
|
| }
|
| -
|
| - // TODO(dtrainor, kouhei): Give WebView a Populator/delegate so it can use the
|
| - // same context menu code.
|
| - ContextMenuHelper* helper = ContextMenuHelper::FromWebContents(web_contents_);
|
| - if (helper)
|
| - helper->ShowContextMenu(params);
|
| + web_contents_->NotifyContextMenuClosed(content::CustomContextMenuContext());
|
| }
|
|
|
| namespace chrome {
|
|
|