Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Issue 11471040: [Android WebView] Convert context menu callback to long press (Closed)

Created:
8 years ago by boliu
Modified:
8 years ago
Reviewers:
joth
CC:
chromium-reviews, android-webview-reviews_chromium.org
Visibility:
Public.

Description

[Android WebView] Convert context menu callback to long press A GestureLongPress is converted to a context menu callback inside WebKit. For Android WebView, use this callback to trigger the long click logic which by default triggers context menu. BUG= Android only change. Ran through android trybots. NOTRY=true Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=172457

Patch Set 1 #

Total comments: 8

Patch Set 2 : Java AwWebContentsViewDelegate and address joth's other comments. #

Patch Set 3 : Add comments. Ready for review/submit. #

Total comments: 7

Patch Set 4 : Fix findbugs by not passing native pointer. #

Total comments: 2

Patch Set 5 : Address joth's comments. Crashes on load. #

Patch Set 6 : Lazy initialize to fix crash. #

Total comments: 2

Patch Set 7 : Avoid ownership weirdness by using aw_contents (like in PS1). FactoryFn. #

Total comments: 8

Patch Set 8 : Joth's comments. #

Total comments: 2

Patch Set 9 : forward declare #

Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -8 lines) Patch
M android_webview/browser/aw_content_browser_client.h View 1 2 3 4 5 6 3 chunks +9 lines, -1 line 0 comments Download
M android_webview/browser/aw_content_browser_client.cc View 1 2 3 4 5 6 7 2 chunks +9 lines, -1 line 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 2 3 4 5 6 2 chunks +6 lines, -1 line 0 comments Download
M android_webview/lib/main/aw_main_delegate.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -1 line 0 comments Download
M android_webview/lib/main/aw_main_delegate.cc View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -4 lines 0 comments Download
M android_webview/native/aw_contents.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M android_webview/native/aw_contents.cc View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download
A android_webview/native/aw_web_contents_view_delegate.h View 1 2 3 4 5 6 1 chunk +46 lines, -0 lines 0 comments Download
A android_webview/native/aw_web_contents_view_delegate.cc View 1 2 3 4 5 6 1 chunk +65 lines, -0 lines 0 comments Download
M android_webview/native/webview_native.gyp View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
boliu
Uploaded for initial code review, not ready to submit yet. Still needs to check that ...
8 years ago (2012-12-07 22:11:44 UTC) #1
joth
https://codereview.chromium.org/11471040/diff/1/android_webview/browser/aw_web_contents_view_delegate.cc File android_webview/browser/aw_web_contents_view_delegate.cc (right): https://codereview.chromium.org/11471040/diff/1/android_webview/browser/aw_web_contents_view_delegate.cc#newcode30 android_webview/browser/aw_web_contents_view_delegate.cc:30: // press. also may want to do the same ...
8 years ago (2012-12-08 01:29:12 UTC) #2
boliu
Still needs comments in general and still haven't checked webkit logic yet. Adding a Java ...
8 years ago (2012-12-10 20:19:28 UTC) #3
boliu
webkit logic seems pretty straight forward: If it hits a scroll bar, let scrollbar handle ...
8 years ago (2012-12-10 21:00:06 UTC) #4
boliu
Ready for review
8 years ago (2012-12-10 23:56:06 UTC) #5
joth
lg, but the global ref may be defeating GC. https://codereview.chromium.org/11471040/diff/11001/android_webview/java/src/org/chromium/android_webview/AwWebContentsViewDelegate.java File android_webview/java/src/org/chromium/android_webview/AwWebContentsViewDelegate.java (right): https://codereview.chromium.org/11471040/diff/11001/android_webview/java/src/org/chromium/android_webview/AwWebContentsViewDelegate.java#newcode14 android_webview/java/src/org/chromium/android_webview/AwWebContentsViewDelegate.java:14: ...
8 years ago (2012-12-11 01:22:11 UTC) #6
boliu
https://codereview.chromium.org/11471040/diff/11001/android_webview/java/src/org/chromium/android_webview/AwWebContentsViewDelegate.java File android_webview/java/src/org/chromium/android_webview/AwWebContentsViewDelegate.java (right): https://codereview.chromium.org/11471040/diff/11001/android_webview/java/src/org/chromium/android_webview/AwWebContentsViewDelegate.java#newcode14 android_webview/java/src/org/chromium/android_webview/AwWebContentsViewDelegate.java:14: * context menu callback currently. On 2012/12/11 01:22:11, joth ...
8 years ago (2012-12-11 02:25:33 UTC) #7
joth
https://codereview.chromium.org/11471040/diff/11001/android_webview/native/aw_web_contents_view_delegate.h File android_webview/native/aw_web_contents_view_delegate.h (right): https://codereview.chromium.org/11471040/diff/11001/android_webview/native/aw_web_contents_view_delegate.h#newcode38 android_webview/native/aw_web_contents_view_delegate.h:38: base::android::ScopedJavaGlobalRef<jobject> web_contents_view_delegate_; On 2012/12/11 02:25:33, boliu wrote: > That ...
8 years ago (2012-12-11 02:37:39 UTC) #8
boliu
Per offline discussion, reverted to old path (through aw_contents in patch set 1) to avoid ...
8 years ago (2012-12-11 19:34:08 UTC) #9
joth
lgtm % nits. (and what's that commented out line?) https://codereview.chromium.org/11471040/diff/18001/android_webview/browser/aw_content_browser_client.cc File android_webview/browser/aw_content_browser_client.cc (right): https://codereview.chromium.org/11471040/diff/18001/android_webview/browser/aw_content_browser_client.cc#newcode70 android_webview/browser/aw_content_browser_client.cc:70: ...
8 years ago (2012-12-11 21:11:47 UTC) #10
boliu
https://codereview.chromium.org/11471040/diff/18001/android_webview/browser/aw_content_browser_client.cc File android_webview/browser/aw_content_browser_client.cc (right): https://codereview.chromium.org/11471040/diff/18001/android_webview/browser/aw_content_browser_client.cc#newcode70 android_webview/browser/aw_content_browser_client.cc:70: return NULL; //(*view_delegate_factory_)(web_contents); On 2012/12/11 21:11:47, joth wrote: > ...
8 years ago (2012-12-11 22:13:09 UTC) #11
joth
lgtm https://codereview.chromium.org/11471040/diff/27001/android_webview/lib/main/aw_main_delegate.h File android_webview/lib/main/aw_main_delegate.h (right): https://codereview.chromium.org/11471040/diff/27001/android_webview/lib/main/aw_main_delegate.h#newcode10 android_webview/lib/main/aw_main_delegate.h:10: #include "android_webview/renderer/aw_content_renderer_client.h" nit: fwd declare AwContentBrowserClient & RenderClient ...
8 years ago (2012-12-11 22:15:30 UTC) #12
boliu
https://codereview.chromium.org/11471040/diff/27001/android_webview/lib/main/aw_main_delegate.h File android_webview/lib/main/aw_main_delegate.h (right): https://codereview.chromium.org/11471040/diff/27001/android_webview/lib/main/aw_main_delegate.h#newcode10 android_webview/lib/main/aw_main_delegate.h:10: #include "android_webview/renderer/aw_content_renderer_client.h" On 2012/12/11 22:15:31, joth wrote: > nit: ...
8 years ago (2012-12-11 22:36:46 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/11471040/37001
8 years ago (2012-12-11 23:40:28 UTC) #14
commit-bot: I haz the power
8 years ago (2012-12-11 23:42:24 UTC) #15
Message was sent while issue was closed.
Change committed as 172457

Powered by Google App Engine
This is Rietveld 408576698