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

Side by Side Diff: chrome/browser/permissions/permission_request_manager.h

Issue 2853803002: Make PermissionRequestManager::requests_ correspond to the active prompt (Closed)
Patch Set: SetUpUrl Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_
6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_ 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_
7 7
8 #include <unordered_map> 8 #include <unordered_map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // PermissionPrompt::Delegate: 138 // PermissionPrompt::Delegate:
139 void ToggleAccept(int request_index, bool new_value) override; 139 void ToggleAccept(int request_index, bool new_value) override;
140 void TogglePersist(bool new_value) override; 140 void TogglePersist(bool new_value) override;
141 void Accept() override; 141 void Accept() override;
142 void Deny() override; 142 void Deny() override;
143 void Closing() override; 143 void Closing() override;
144 144
145 // Posts a task which will allow the bubble to become visible if it is needed. 145 // Posts a task which will allow the bubble to become visible if it is needed.
146 void ScheduleShowBubble(); 146 void ScheduleShowBubble();
147 147
148 // Shows the bubble if it is not already visible and there are pending 148 // If we aren't already showing a bubble, dequeue and show a pending request.
149 // requests. 149 void DequeueRequestsAndShowBubble();
150 void TriggerShowBubble(); 150
151 // Shows the bubble for a request that has just been dequeued, or re-show a
152 // bubble after switching tabs away and back.
153 void ShowBubble();
151 154
152 // Finalize the pending permissions request. 155 // Finalize the pending permissions request.
153 void FinalizeBubble(); 156 void FinalizeBubble();
154 157
155 // Cancel any pending requests. This is called if the WebContents 158 // Cancel any pending requests. This is called if the WebContents
156 // on which permissions calls are pending is destroyed or navigated away 159 // on which permissions calls are pending is destroyed or navigated away
157 // from the requesting page. 160 // from the requesting page.
158 void CancelPendingQueues(); 161 void CancelPendingQueues();
159 162
160 // Searches |requests_|, |queued_requests_| and |queued_frame_requests_| - but 163 // Searches |requests_|, |queued_requests_| and |queued_frame_requests_| - but
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 // Whether each of the requests in |requests_| is accepted by the user. 201 // Whether each of the requests in |requests_| is accepted by the user.
199 std::vector<bool> accept_states_; 202 std::vector<bool> accept_states_;
200 203
201 base::ObserverList<Observer> observer_list_; 204 base::ObserverList<Observer> observer_list_;
202 AutoResponseType auto_response_for_test_; 205 AutoResponseType auto_response_for_test_;
203 206
204 base::WeakPtrFactory<PermissionRequestManager> weak_factory_; 207 base::WeakPtrFactory<PermissionRequestManager> weak_factory_;
205 }; 208 };
206 209
207 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_ 210 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/permissions/permission_prompt_android.cc ('k') | chrome/browser/permissions/permission_request_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698