Stop sending long press events twice

Removing one of the events.

BUG=285999

Review URL: https://chromiumcodereview.appspot.com/23449027

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221881 0039d316-1c4b-4281-b951-d872f2087c98
parent 6d3c38a1
......@@ -1763,11 +1763,6 @@ public class AwContents {
}
}
@CalledByNative
private boolean performLongClick() {
return mContainerView.performLongClick();
}
@CalledByNative
private int[] getLocationOnScreen() {
int[] result = new int[2];
......
......@@ -332,15 +332,6 @@ void AwContents::GenerateMHTML(JNIEnv* env, jobject obj,
base::Bind(&GenerateMHTMLCallback, base::Owned(j_callback), target_path));
}
void AwContents::PerformLongClick() {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
if (obj.is_null())
return;
Java_AwContents_performLongClick(env, obj.obj());
}
bool AwContents::OnReceivedHttpAuthRequest(const JavaRef<jobject>& handler,
const std::string& host,
const std::string& realm) {
......
......@@ -64,8 +64,6 @@ class AwContents : public FindHelper::Listener,
return render_view_host_ext_.get();
}
void PerformLongClick();
// |handler| is an instance of
// org.chromium.android_webview.AwHttpAuthHandler.
bool OnReceivedHttpAuthRequest(const base::android::JavaRef<jobject>& handler,
......
......@@ -4,7 +4,6 @@
#include "android_webview/native/aw_web_contents_view_delegate.h"
#include "android_webview/native/aw_contents.h"
#include "content/public/browser/android/content_view_core.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
......@@ -47,19 +46,8 @@ void AwWebContentsViewDelegate::ShowContextMenu(
if (content_view_core) {
content_view_core->ShowPastePopup(params.selection_start.x(),
params.selection_start.y());
return;
}
}
AwContents* aw_contents = AwContents::FromWebContents(web_contents_);
if (!aw_contents)
return;
// Context menu callback in Chromium is triggered by WebKit on an
// unhandled GestureLongPress event. Convert the context menu callback
// back into a long click event for Android WebView since the view
// system may choose to handle the gesture.
aw_contents->PerformLongClick();
}
} // namespace android_webview
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment