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

Unified Diff: chrome/browser/ui/android/context_menu_helper.cc

Issue 1471993002: Resume cursor blinking on closing context menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: robusted onContextMenuClosed() and fixed nits Created 5 years 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
Index: chrome/browser/ui/android/context_menu_helper.cc
diff --git a/chrome/browser/ui/android/context_menu_helper.cc b/chrome/browser/ui/android/context_menu_helper.cc
index 87a6f39b81ca4f358fa78d288a1798c5ed25c337..68893d3cd74f6b45dbf4ffd9c27d7dac33cf7b3a 100644
--- a/chrome/browser/ui/android/context_menu_helper.cc
+++ b/chrome/browser/ui/android/context_menu_helper.cc
@@ -44,26 +44,24 @@ ContextMenuHelper::~ContextMenuHelper() {
Java_ContextMenuHelper_destroy(env, java_obj_.obj());
}
-void ContextMenuHelper::ShowContextMenu(
+bool ContextMenuHelper::ShowContextMenu(
const content::ContextMenuParams& params) {
content::ContentViewCore* content_view_core =
content::ContentViewCore::FromWebContents(web_contents_);
if (!content_view_core)
- return;
+ return false;
base::android::ScopedJavaLocalRef<jobject> jcontent_view_core(
content_view_core->GetJavaObject());
if (jcontent_view_core.is_null())
- return;
+ return false;
JNIEnv* env = base::android::AttachCurrentThread();
context_menu_params_ = params;
- Java_ContextMenuHelper_showContextMenu(
- env,
- java_obj_.obj(),
- jcontent_view_core.obj(),
+ return Java_ContextMenuHelper_showContextMenu(
+ env, java_obj_.obj(), jcontent_view_core.obj(),
ContextMenuHelper::CreateJavaContextMenuParams(params).obj());
}

Powered by Google App Engine
This is Rietveld 408576698