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

Issue 2781803002: Don't delete the PermissionPromptAndroid when switching tabs (Closed)

Created:
3 years, 8 months ago by Timothy Loh
Modified:
3 years, 8 months ago
CC:
chromium-reviews, mlamouri+watch-permissions_chromium.org, raymes+watch_chromium.org, agrieve+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't delete the PermissionPromptAndroid when switching tabs The PermissionRequestManager creates and deletes its PermissionPrompt when switching to and from a given tab. On desktop this is the mechanism by which we hide/show permission prompts when switching tabs. On Android however, we use infobars which already have their visibility managed, so it's odd for the permissions code to be deleting and re-creating the infobars instead of letting them work normally. This patch makes us leave the PermissionPromptAndroid alone instead of deleting and re-creating it on switching tabs. While this makes our model on Android differ from desktop, this lets the permission infobars be managed normally, and the PermissionPromptAndroid won't need to keep a reference to the infobar. This is mostly a revert of https://codereview.chromium.org/2522373002. BUG=606138 Review-Url: https://codereview.chromium.org/2781803002 Cr-Commit-Position: refs/heads/master@{#461042} Committed: https://chromium.googlesource.com/chromium/src/+/f9de5648278de3e68a7c7ef87215a8d3128eb763

Patch Set 1 #

Patch Set 2 : . #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -73 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorBase.java View 3 chunks +0 lines, -9 lines 0 comments Download
M chrome/browser/BUILD.gn View 1 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/android/chrome_jni_registrar.cc View 1 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/permissions/permission_request_manager.cc View 1 3 chunks +12 lines, -1 line 2 comments Download
M chrome/browser/ui/BUILD.gn View 1 1 chunk +0 lines, -2 lines 0 comments Download
D chrome/browser/ui/android/tab_model/tab_model_selector_base.h View 1 chunk +0 lines, -12 lines 0 comments Download
D chrome/browser/ui/android/tab_model/tab_model_selector_base.cc View 1 chunk +0 lines, -46 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 29 (17 generated)
Timothy Loh
Sending to the same folks as were on https://codereview.chromium.org/2522373002 (lshang@ is on another team now ...
3 years, 8 months ago (2017-03-29 06:31:06 UTC) #7
Bernhard Bauer
lgtm
3 years, 8 months ago (2017-03-29 09:05:15 UTC) #12
dominickn
non-OWNER lgtm
3 years, 8 months ago (2017-03-30 02:37:37 UTC) #13
David Trainor- moved to gerrit
lgtm
3 years, 8 months ago (2017-03-30 05:06:16 UTC) #14
Timothy Loh
+benwells@ for permissions owners
3 years, 8 months ago (2017-03-30 05:41:40 UTC) #16
benwells
lgtm
3 years, 8 months ago (2017-03-30 08:39:23 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2781803002/20001
3 years, 8 months ago (2017-03-31 02:59:26 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/184227)
3 years, 8 months ago (2017-03-31 04:24:02 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2781803002/20001
3 years, 8 months ago (2017-03-31 04:25:25 UTC) #23
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/f9de5648278de3e68a7c7ef87215a8d3128eb763
3 years, 8 months ago (2017-03-31 05:00:06 UTC) #26
raymes
https://codereview.chromium.org/2781803002/diff/20001/chrome/browser/permissions/permission_request_manager.cc File chrome/browser/permissions/permission_request_manager.cc (right): https://codereview.chromium.org/2781803002/diff/20001/chrome/browser/permissions/permission_request_manager.cc#newcode247 chrome/browser/permissions/permission_request_manager.cc:247: void PermissionRequestManager::DisplayPendingRequests() { I wonder if we should have ...
3 years, 8 months ago (2017-04-03 04:28:25 UTC) #28
raymes
3 years, 8 months ago (2017-04-03 04:30:52 UTC) #29
Message was sent while issue was closed.
https://codereview.chromium.org/2781803002/diff/20001/chrome/browser/permissi...
File chrome/browser/permissions/permission_request_manager.cc (right):

https://codereview.chromium.org/2781803002/diff/20001/chrome/browser/permissi...
chrome/browser/permissions/permission_request_manager.cc:247: void
PermissionRequestManager::DisplayPendingRequests() {
On 2017/04/03 04:28:25, raymes (OOO until April 10) wrote:
> I wonder if we should have NOTREACHED() here on Android too? I'm not sure
> though.

Another thought is that I wonder if in the long run we would want to not delete
the view on any platform and instead have the visibility managed from within the
PermissionPrompt subclass?

Powered by Google App Engine
This is Rietveld 408576698