Description[Android] Fix 'open in browser' in CCT does not work for images in Google image search
'Open in browser', 'Open in new Chrome tab' and 'Open in incognito tab'
in CCT don't work for images in Google image search. This is because
these images are both images and anchor. Their sourceUrls are data://
scheme which cannot be handled for Chrome for a View intent.
To fix the problem, since those images are also anchor and their linkUrl is
a valid url for View Intent in Chrome, thus sending linkUrl instead.
This CL also redesigns the logic for deciding the valid url of a
ContextMenuParams, that if the param is an anchor and its linkUrl is not
null, returns the linkUrl, otherwise returns the srcUrl.
BUG=720532
Review-Url: https://codereview.chromium.org/2891583004
Cr-Commit-Position: refs/heads/master@{#473287}
Committed: https://chromium.googlesource.com/chromium/src/+/9c3c202169fe21903913e25f2a44f3353b72d4d6
Patch Set 1 #
Total comments: 2
Patch Set 2 : Update based on Ted's comment. #
Total comments: 2
Patch Set 3 : Update based on Ted's comment and rebase. #Patch Set 4 : Set Intent directly sent to ChromeLaucherActivity. #
Messages
Total messages: 15 (4 generated)
|