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

Issue 227413008: Add the feature to retain the user gesture in the extension callback (Closed)

Created:
6 years, 8 months ago by wjywbs
Modified:
6 years, 8 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Visibility:
Public.

Description

Add the feature to retain the user gesture in the extension callback. R=kalman@chromium.org,mek@chromium.org BUG=351958, 361116 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266085

Patch Set 1 #

Total comments: 5

Patch Set 2 : #

Total comments: 7

Patch Set 3 : #

Patch Set 4 : #

Total comments: 4

Patch Set 5 : gclient sync #

Total comments: 1

Patch Set 6 : #

Patch Set 7 : #

Total comments: 1

Patch Set 8 : #

Total comments: 2

Patch Set 9 : #

Total comments: 2

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -3 lines) Patch
M chrome/browser/extensions/api/permissions/permissions_apitest.cc View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/permissions/optional_retain_gesture/background.js View 1 2 3 4 5 6 7 8 9 1 chunk +79 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/permissions/optional_retain_gesture/manifest.json View 1 2 3 4 5 6 1 chunk +10 lines, -0 lines 0 comments Download
M extensions/renderer/request_sender.cc View 1 2 3 4 5 6 7 8 3 chunks +10 lines, -3 lines 0 comments Download

Messages

Total messages: 40 (0 generated)
wjywbs
Hello kalman, Please take a look this sample. Maybe I need to open a separate ...
6 years, 8 months ago (2014-04-07 21:46:36 UTC) #1
not at google - send to devlin
https://codereview.chromium.org/227413008/diff/1/chrome/browser/extensions/api/permissions/permissions_api.cc File chrome/browser/extensions/api/permissions/permissions_api.cc (right): https://codereview.chromium.org/227413008/diff/1/chrome/browser/extensions/api/permissions/permissions_api.cc#newcode192 chrome/browser/extensions/api/permissions/permissions_api.cc:192: //response_user_gesture_ = true; On 2014/04/07 21:46:37, wjywbs wrote: > ...
6 years, 8 months ago (2014-04-07 22:09:09 UTC) #2
wjywbs
I filed Issue 361116 with some discussions. PTAL. Thanks. https://codereview.chromium.org/227413008/diff/1/chrome/browser/renderer_host/pepper/pepper_extensions_common_message_filter.h File chrome/browser/renderer_host/pepper/pepper_extensions_common_message_filter.h (right): https://codereview.chromium.org/227413008/diff/1/chrome/browser/renderer_host/pepper/pepper_extensions_common_message_filter.h#newcode91 chrome/browser/renderer_host/pepper/pepper_extensions_common_message_filter.h:91: ...
6 years, 8 months ago (2014-04-08 13:24:41 UTC) #3
not at google - send to devlin
https://codereview.chromium.org/227413008/diff/1/chrome/browser/renderer_host/pepper/pepper_extensions_common_message_filter.h File chrome/browser/renderer_host/pepper/pepper_extensions_common_message_filter.h (right): https://codereview.chromium.org/227413008/diff/1/chrome/browser/renderer_host/pepper/pepper_extensions_common_message_filter.h#newcode91 chrome/browser/renderer_host/pepper/pepper_extensions_common_message_filter.h:91: const bool response_user_gesture); On 2014/04/08 13:24:42, wjywbs wrote: > ...
6 years, 8 months ago (2014-04-08 16:01:09 UTC) #4
wjywbs
I renamed the variable. PTAL. Thanks.
6 years, 8 months ago (2014-04-08 23:01:45 UTC) #5
not at google - send to devlin
https://codereview.chromium.org/227413008/diff/20001/chrome/browser/extensions/api/permissions/permissions_api.cc File chrome/browser/extensions/api/permissions/permissions_api.cc (right): https://codereview.chromium.org/227413008/diff/20001/chrome/browser/extensions/api/permissions/permissions_api.cc#newcode134 chrome/browser/extensions/api/permissions/permissions_api.cc:134: you may need to split this method up. https://codereview.chromium.org/227413008/diff/20001/chrome/browser/extensions/api/permissions/permissions_api.cc#newcode192 ...
6 years, 8 months ago (2014-04-09 16:44:32 UTC) #6
wjywbs
PTAL, thanks! https://codereview.chromium.org/227413008/diff/20001/chrome/browser/extensions/api/permissions/permissions_api.cc File chrome/browser/extensions/api/permissions/permissions_api.cc (right): https://codereview.chromium.org/227413008/diff/20001/chrome/browser/extensions/api/permissions/permissions_api.cc#newcode192 chrome/browser/extensions/api/permissions/permissions_api.cc:192: retain_user_gesture_ = true; I will post a ...
6 years, 8 months ago (2014-04-09 18:13:29 UTC) #7
not at google - send to devlin
this lgtm, but mek@ could you sanity check and make sure that what you have ...
6 years, 8 months ago (2014-04-09 20:24:10 UTC) #8
Marijn Kruisselbrink
On 2014/04/09 20:24:10, kalman wrote: > this lgtm, but mek@ could you sanity check and ...
6 years, 8 months ago (2014-04-09 20:27:02 UTC) #9
not at google - send to devlin
not lgtm I just realised the change to permissions_api.cc wasn't made. i guess that's what ...
6 years, 8 months ago (2014-04-09 20:28:51 UTC) #10
not at google - send to devlin
On 2014/04/09 20:27:02, Marijn Kruisselbrink wrote: > On 2014/04/09 20:24:10, kalman wrote: > > this ...
6 years, 8 months ago (2014-04-09 20:30:03 UTC) #11
Marijn Kruisselbrink
On 2014/04/09 20:30:03, kalman wrote: > On 2014/04/09 20:27:02, Marijn Kruisselbrink wrote: > > On ...
6 years, 8 months ago (2014-04-09 20:37:00 UTC) #12
not at google - send to devlin
On 2014/04/09 20:37:00, Marijn Kruisselbrink wrote: > On 2014/04/09 20:30:03, kalman wrote: > > On ...
6 years, 8 months ago (2014-04-10 04:02:19 UTC) #13
wjywbs
The code path for retaining the token in UserGestureIndicator.cpp can be confusing. It only resets ...
6 years, 8 months ago (2014-04-10 04:44:21 UTC) #14
wjywbs
I changed RequestSender to retain the original user gesture token. PTAL. Thanks.
6 years, 8 months ago (2014-04-10 14:15:48 UTC) #15
not at google - send to devlin
https://codereview.chromium.org/227413008/diff/60001/chrome/renderer/extensions/request_sender.cc File chrome/renderer/extensions/request_sender.cc (right): https://codereview.chromium.org/227413008/diff/60001/chrome/renderer/extensions/request_sender.cc#newcode24 chrome/renderer/extensions/request_sender.cc:24: blink::WebUserGestureToken token) run "git cl format" pls https://codereview.chromium.org/227413008/diff/60001/chrome/renderer/extensions/request_sender.cc#newcode141 chrome/renderer/extensions/request_sender.cc:141: ...
6 years, 8 months ago (2014-04-10 20:21:07 UTC) #16
wjywbs
PTAL. Thanks. https://codereview.chromium.org/227413008/diff/60001/chrome/renderer/extensions/request_sender.cc File chrome/renderer/extensions/request_sender.cc (right): https://codereview.chromium.org/227413008/diff/60001/chrome/renderer/extensions/request_sender.cc#newcode24 chrome/renderer/extensions/request_sender.cc:24: blink::WebUserGestureToken token) On 2014/04/10 20:21:07, kalman wrote: ...
6 years, 8 months ago (2014-04-10 21:14:26 UTC) #17
not at google - send to devlin
https://codereview.chromium.org/227413008/diff/80001/chrome/browser/extensions/api/permissions/permissions_api.cc File chrome/browser/extensions/api/permissions/permissions_api.cc (right): https://codereview.chromium.org/227413008/diff/80001/chrome/browser/extensions/api/permissions/permissions_api.cc#newcode192 chrome/browser/extensions/api/permissions/permissions_api.cc:192: retain_user_gesture_ = true; if we're re-using the user gesture ...
6 years, 8 months ago (2014-04-10 21:19:33 UTC) #18
not at google - send to devlin
also this needs tests
6 years, 8 months ago (2014-04-10 21:19:43 UTC) #19
wjywbs
On 2014/04/10 21:19:33, kalman wrote: > https://codereview.chromium.org/227413008/diff/80001/chrome/browser/extensions/api/permissions/permissions_api.cc > File chrome/browser/extensions/api/permissions/permissions_api.cc (right): > > https://codereview.chromium.org/227413008/diff/80001/chrome/browser/extensions/api/permissions/permissions_api.cc#newcode192 > ...
6 years, 8 months ago (2014-04-10 21:42:29 UTC) #20
wjywbs
I've added tests. PTAL. Thanks.
6 years, 8 months ago (2014-04-10 23:12:53 UTC) #21
not at google - send to devlin
On 2014/04/10 21:42:29, wjywbs wrote: > On 2014/04/10 21:19:33, kalman wrote: > > > https://codereview.chromium.org/227413008/diff/80001/chrome/browser/extensions/api/permissions/permissions_api.cc ...
6 years, 8 months ago (2014-04-11 00:21:15 UTC) #22
wjywbs
I'm assuming you've confirmed to retain the user gesture all function callbacks? Please take a ...
6 years, 8 months ago (2014-04-11 21:17:26 UTC) #23
not at google - send to devlin
Ok thanks for sticking with this. Sorry about the crazy back and forth with the ...
6 years, 8 months ago (2014-04-11 23:22:19 UTC) #24
not at google - send to devlin
apart from the test lg, mek do you have anything to add?
6 years, 8 months ago (2014-04-11 23:22:37 UTC) #25
wjywbs
On 2014/04/11 23:22:19, kalman wrote: > How about: you keep trying every... 100ms... to request. ...
6 years, 8 months ago (2014-04-13 15:38:02 UTC) #26
not at google - send to devlin
On 2014/04/13 15:38:02, wjywbs wrote: > On 2014/04/11 23:22:19, kalman wrote: > > How about: ...
6 years, 8 months ago (2014-04-14 17:56:04 UTC) #27
wjywbs
On 2014/04/14 17:56:04, kalman wrote: > The user gesture token resetting every 100ms seems wrong, ...
6 years, 8 months ago (2014-04-14 18:11:51 UTC) #28
not at google - send to devlin
Ok, I think that mek@ should be doing this review not me.
6 years, 8 months ago (2014-04-14 19:59:23 UTC) #29
wjywbs
Hello mek, please take a look when you have time. Thanks.
6 years, 8 months ago (2014-04-22 22:13:00 UTC) #30
Marijn Kruisselbrink
On 2014/04/22 22:13:00, wjywbs wrote: > Hello mek, please take a look when you have ...
6 years, 8 months ago (2014-04-23 23:00:42 UTC) #31
wjywbs
I updated the test to use busy loops. PTAL, thanks.
6 years, 8 months ago (2014-04-24 04:33:25 UTC) #32
Marijn Kruisselbrink
https://codereview.chromium.org/227413008/diff/150001/chrome/test/data/extensions/api_test/permissions/optional_retain_gesture/background.js File chrome/test/data/extensions/api_test/permissions/optional_retain_gesture/background.js (right): https://codereview.chromium.org/227413008/diff/150001/chrome/test/data/extensions/api_test/permissions/optional_retain_gesture/background.js#newcode29 chrome/test/data/extensions/api_test/permissions/optional_retain_gesture/background.js:29: // Wait 500ms for consuming the user gesture in ...
6 years, 8 months ago (2014-04-24 17:10:02 UTC) #33
wjywbs
https://codereview.chromium.org/227413008/diff/150001/chrome/test/data/extensions/api_test/permissions/optional_retain_gesture/background.js File chrome/test/data/extensions/api_test/permissions/optional_retain_gesture/background.js (right): https://codereview.chromium.org/227413008/diff/150001/chrome/test/data/extensions/api_test/permissions/optional_retain_gesture/background.js#newcode29 chrome/test/data/extensions/api_test/permissions/optional_retain_gesture/background.js:29: // Wait 500ms for consuming the user gesture in ...
6 years, 8 months ago (2014-04-24 20:51:40 UTC) #34
Marijn Kruisselbrink
On 2014/04/24 20:51:40, wjywbs wrote: > https://codereview.chromium.org/227413008/diff/150001/chrome/test/data/extensions/api_test/permissions/optional_retain_gesture/background.js > File > chrome/test/data/extensions/api_test/permissions/optional_retain_gesture/background.js > (right): > > ...
6 years, 8 months ago (2014-04-24 20:55:14 UTC) #35
wjywbs
The CQ bit was checked by wjywbs@gmail.com
6 years, 8 months ago (2014-04-24 20:58:16 UTC) #36
wjywbs
kalman@, can you please take a look at this CL? I think CQ does not ...
6 years, 8 months ago (2014-04-24 21:12:19 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjywbs@gmail.com/227413008/170001
6 years, 8 months ago (2014-04-24 21:14:44 UTC) #38
not at google - send to devlin
rubberstamp lgtm
6 years, 8 months ago (2014-04-24 21:20:04 UTC) #39
commit-bot: I haz the power
6 years, 8 months ago (2014-04-25 02:24:19 UTC) #40
Message was sent while issue was closed.
Change committed as 266085

Powered by Google App Engine
This is Rietveld 408576698