Chromium Code Reviews
DescriptionMake PermissionRequestManager::requests_ correspond to the active prompt
This patch reworks the usage of the PermissionRequest* vectors in the
PermissionRequestManager so that requests_ correponds the the active
prompt, if any. In particular, the vector remains empty while requests
arrive and is populated immediately before actually creating the prompt
UI. We also remove PermissionPrompt::IsVisible() which is no longer
needed as we can just check whether the vector is empty.
Currently AddRequest() calls immediately push to requests_ if it is
empty and otherwise queue the request. TriggerShowBubble() also already
has logic to use the queued requests if requests_ is empty. This patch
makes AddRequest() only queue requests and leaves moving them to the
requests_ vector to TriggerShowBubble().
This patch is preparation for making the vector of requests available
to the PermissionPrompt subclasses via the Delegate object, so that on
Android we won't need to store a copy of this vector, which can be
problematic when requests are cancelled.
BUG=606138
Review-Url: https://codereview.chromium.org/2853803002
Cr-Commit-Position: refs/heads/master@{#470158}
Committed: https://chromium.googlesource.com/chromium/src/+/86d8eaf62f5dfd8c4d3d9d542d6c4a859ca595fe
Patch Set 1 #Patch Set 2 : still wip #Patch Set 3 : zzz #Patch Set 4 : fix it? :D #
Total comments: 14
Patch Set 5 : address comments #Patch Set 6 : rebase #
Total comments: 1
Patch Set 7 : SetUpUrl #Dependent Patchsets: Messages
Total messages: 49 (38 generated)
|