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

Issue 1243253004: Pass user gesture bit when chrome handles an intent fired by itself (Closed)

Created:
5 years, 5 months ago by qinmin
Modified:
5 years, 4 months ago
CC:
avayvod+watch_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, David Trainor- moved to gerrit, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Pass user gesture bit when chrome handles an intent fired by itself It is possible for user to choose chrome when url overriding results in an intent chooser. In this case, we should let everything work as if nothing has happened. However, intent handling will result in a new url request. And that causes chrome to lose the user gesture bit, and introduces some side effects. For example, when clicking a pdf link, the pdf will be auto opened by docs app. However, if Adobe pdf reader is installed, an intent chooser will be shown when clicking the pdf link. If user chooses chrome to handle the intent, the pdf will be downloaded, but not auto opened due to the missing user gesture BUG=512633 Committed: https://crrev.com/976d4d9a2735bdc11e5a641c84b6382566d48f1d Cr-Commit-Position: refs/heads/master@{#342388}

Patch Set 1 #

Patch Set 2 : addressing comments #

Patch Set 3 : using token to verify intent from chrome #

Total comments: 6

Patch Set 4 : addressing Maria's comments #

Total comments: 2

Patch Set 5 : fix findbugs warning #

Unified diffs Side-by-side diffs Delta from patch set Stats (+281 lines, -29 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java View 1 2 3 5 chunks +5 lines, -4 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorView.java View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java View 1 2 3 6 chunks +12 lines, -4 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationParams.java View 1 2 3 7 chunks +22 lines, -4 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/externalnav/IntentWithGesturesHandler.java View 1 2 3 1 chunk +87 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeTab.java View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
A chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/IntentWithGesturesHandlerTest.java View 1 2 3 4 1 chunk +48 lines, -0 lines 0 comments Download
M chrome/browser/android/tab_android.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/android/tab_android.cc View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/frame_host/navigation_controller_impl.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/frame_host/navigation_entry_impl.h View 2 chunks +11 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_entry_impl.cc View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M content/common/frame_messages.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/navigation_params.h View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M content/common/navigation_params.cc View 1 2 2 chunks +9 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content_public/browser/LoadUrlParams.java View 1 2 3 2 chunks +17 lines, -0 lines 0 comments Download
M content/public/browser/navigation_controller.h View 2 chunks +11 lines, -7 lines 0 comments Download
M content/public/browser/navigation_controller.cc View 3 chunks +7 lines, -4 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (11 generated)
qinmin
PTAL
5 years, 5 months ago (2015-07-22 00:29:50 UTC) #2
jochen (gone - plz use gerrit)
the bug id you reference in the CL description appears to be unrelated? It looks ...
5 years, 5 months ago (2015-07-22 09:45:41 UTC) #3
qinmin
On 2015/07/22 09:45:41, jochen wrote: > the bug id you reference in the CL description ...
5 years, 5 months ago (2015-07-22 13:52:35 UTC) #4
qinmin
5 years, 5 months ago (2015-07-22 22:04:49 UTC) #6
Maria
On 2015/07/22 22:04:49, qinmin wrote: So I think this works correctly for existing cases, I ...
5 years, 5 months ago (2015-07-22 22:18:32 UTC) #7
qinmin
Talked with Maria offline and added an Extra for the user gesture. For IntentHandler.addTrustedIntentExtras(), since ...
5 years, 5 months ago (2015-07-23 21:58:16 UTC) #8
jochen (gone - plz use gerrit)
On 2015/07/23 at 21:58:16, qinmin wrote: > Talked with Maria offline and added an Extra ...
5 years, 5 months ago (2015-07-24 11:34:56 UTC) #9
qinmin
On 2015/07/24 11:34:56, jochen wrote: > On 2015/07/23 at 21:58:16, qinmin wrote: > > Talked ...
5 years, 5 months ago (2015-07-24 23:06:23 UTC) #10
jochen (gone - plz use gerrit)
On 2015/07/24 at 23:06:23, qinmin wrote: > On 2015/07/24 11:34:56, jochen wrote: > > On ...
5 years, 4 months ago (2015-07-27 09:01:37 UTC) #11
qinmin
PTAL again after security review. Security review doc: https://docs.google.com/a/google.com/document/d/1nSqfOhUxf3vBHKrkHZZz7EwRqeIPGRZIy4DSvfxq_Qc/edit?usp=sharing added a new class to generate ...
5 years, 4 months ago (2015-08-04 21:21:46 UTC) #12
Maria
https://codereview.chromium.org/1243253004/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/externalnav/IntentWithGesturesHandler.java File chrome/android/java/src/org/chromium/chrome/browser/externalnav/IntentWithGesturesHandler.java (right): https://codereview.chromium.org/1243253004/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/externalnav/IntentWithGesturesHandler.java#newcode18 chrome/android/java/src/org/chromium/chrome/browser/externalnav/IntentWithGesturesHandler.java:18: * that has user gesture. A previously launched inten ...
5 years, 4 months ago (2015-08-05 01:41:44 UTC) #13
qinmin
https://codereview.chromium.org/1243253004/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/externalnav/IntentWithGesturesHandler.java File chrome/android/java/src/org/chromium/chrome/browser/externalnav/IntentWithGesturesHandler.java (right): https://codereview.chromium.org/1243253004/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/externalnav/IntentWithGesturesHandler.java#newcode18 chrome/android/java/src/org/chromium/chrome/browser/externalnav/IntentWithGesturesHandler.java:18: * that has user gesture. A previously launched inten ...
5 years, 4 months ago (2015-08-05 20:22:26 UTC) #14
Maria
Looks good, just one final question. https://codereview.chromium.org/1243253004/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorView.java File chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorView.java (right): https://codereview.chromium.org/1243253004/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorView.java#newcode287 chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorView.java:287: IntentWithGesturesHandler.getInstance().clear(); Does this ...
5 years, 4 months ago (2015-08-05 21:29:16 UTC) #15
qinmin
https://codereview.chromium.org/1243253004/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorView.java File chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorView.java (right): https://codereview.chromium.org/1243253004/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorView.java#newcode287 chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorView.java:287: IntentWithGesturesHandler.getInstance().clear(); On 2015/08/05 21:29:16, Maria wrote: > Does this ...
5 years, 4 months ago (2015-08-05 21:47:00 UTC) #16
Maria
lgtm
5 years, 4 months ago (2015-08-05 23:21:33 UTC) #17
jochen (gone - plz use gerrit)
lgtm
5 years, 4 months ago (2015-08-06 14:25:21 UTC) #18
qinmin
+tsepez for content/common/ OWNER
5 years, 4 months ago (2015-08-06 16:55:17 UTC) #20
Tom Sepez
On 2015/08/06 16:55:17, qinmin wrote: > +tsepez for content/common/ OWNER Messages LGTM. There's probably not ...
5 years, 4 months ago (2015-08-06 17:00:58 UTC) #21
qinmin
On 2015/08/06 17:00:58, Tom Sepez wrote: > On 2015/08/06 16:55:17, qinmin wrote: > > +tsepez ...
5 years, 4 months ago (2015-08-07 04:30:16 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1243253004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1243253004/60001
5 years, 4 months ago (2015-08-07 04:30:57 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/105980)
5 years, 4 months ago (2015-08-07 05:41:07 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1243253004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1243253004/80001
5 years, 4 months ago (2015-08-07 16:36:47 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/117491)
5 years, 4 months ago (2015-08-07 16:52:03 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1243253004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1243253004/100001
5 years, 4 months ago (2015-08-07 16:57:25 UTC) #35
commit-bot: I haz the power
Committed patchset #5 (id:100001)
5 years, 4 months ago (2015-08-07 18:32:49 UTC) #36
commit-bot: I haz the power
5 years, 4 months ago (2015-08-07 18:33:24 UTC) #37
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/976d4d9a2735bdc11e5a641c84b6382566d48f1d
Cr-Commit-Position: refs/heads/master@{#342388}

Powered by Google App Engine
This is Rietveld 408576698