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

Unified Diff: android_webview/native/aw_web_contents_view_delegate.cc

Issue 2724533002: Deduplicating code |WebContentsDelegateAndroid::ShowContextMenu()| (Closed)
Patch Set: ContextMenuParams is a struct Created 3 years, 10 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 | « no previous file | chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_web_contents_view_delegate.cc
diff --git a/android_webview/native/aw_web_contents_view_delegate.cc b/android_webview/native/aw_web_contents_view_delegate.cc
index 94f582aab962264549fb4be713e9058f55ea998c..d42b9a6f0da8fdad09b22d06b3d5d937d0d98e8e 100644
--- a/android_webview/native/aw_web_contents_view_delegate.cc
+++ b/android_webview/native/aw_web_contents_view_delegate.cc
@@ -35,19 +35,10 @@ content::WebDragDestDelegate* AwWebContentsViewDelegate::GetDragDestDelegate() {
void AwWebContentsViewDelegate::ShowContextMenu(
content::RenderFrameHost* render_frame_host,
const content::ContextMenuParams& params) {
- // TODO(boliu): Large blocks of this function are identical with
- // ChromeWebContentsViewDelegateAndroid::ShowContextMenu. De-dup this if
- // possible.
-
- // Display paste pop-up only when selection is empty and editable.
- 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());
- }
- }
+ content::ContentViewCore* content_view_core =
+ content::ContentViewCore::FromWebContents(web_contents_);
+ if (content_view_core)
+ content_view_core->ShowPastePopup(params);
}
} // namespace android_webview
« no previous file with comments | « no previous file | chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698