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

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

Issue 2913393002: Only show grouped permission bubbles for mic/camera permissions (Closed)
Patch Set: Remove grouped requests Created 3 years, 6 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 <deque>
8 #include <unordered_map> 9 #include <unordered_map>
9 #include <vector>
10 10
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/observer_list.h" 13 #include "base/observer_list.h"
14 #include "chrome/browser/ui/permission_bubble/permission_prompt.h" 14 #include "chrome/browser/ui/permission_bubble/permission_prompt.h"
15 #include "content/public/browser/web_contents_observer.h" 15 #include "content/public/browser/web_contents_observer.h"
16 #include "content/public/browser/web_contents_user_data.h" 16 #include "content/public/browser/web_contents_user_data.h"
17 17
18 class PermissionRequest; 18 class PermissionRequest;
19 19
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 void DoAutoResponseForTesting(); 182 void DoAutoResponseForTesting();
183 183
184 // Factory to be used to create views when needed. 184 // Factory to be used to create views when needed.
185 PermissionPrompt::Factory view_factory_; 185 PermissionPrompt::Factory view_factory_;
186 186
187 // The UI surface to be used to display the permissions requests. 187 // The UI surface to be used to display the permissions requests.
188 std::unique_ptr<PermissionPrompt> view_; 188 std::unique_ptr<PermissionPrompt> view_;
189 189
190 std::vector<PermissionRequest*> requests_; 190 std::vector<PermissionRequest*> requests_;
191 std::vector<PermissionRequest*> queued_requests_; 191 std::deque<PermissionRequest*> queued_requests_;
192 std::vector<PermissionRequest*> queued_frame_requests_;
193 // Maps from the first request of a kind to subsequent requests that were 192 // Maps from the first request of a kind to subsequent requests that were
194 // duped against it. 193 // duped against it.
195 std::unordered_multimap<PermissionRequest*, PermissionRequest*> 194 std::unordered_multimap<PermissionRequest*, PermissionRequest*>
196 duplicate_requests_; 195 duplicate_requests_;
197 196
198 bool main_frame_has_fully_loaded_; 197 bool main_frame_has_fully_loaded_;
199 198
200 // Whether the response to each request should be persisted. 199 // Whether the response to each request should be persisted.
201 bool persist_; 200 bool persist_;
202 201
203 // Whether each of the requests in |requests_| is accepted by the user. 202 // Whether each of the requests in |requests_| is accepted by the user.
204 std::vector<bool> accept_states_; 203 std::vector<bool> accept_states_;
205 204
206 base::ObserverList<Observer> observer_list_; 205 base::ObserverList<Observer> observer_list_;
207 AutoResponseType auto_response_for_test_; 206 AutoResponseType auto_response_for_test_;
208 207
209 base::WeakPtrFactory<PermissionRequestManager> weak_factory_; 208 base::WeakPtrFactory<PermissionRequestManager> weak_factory_;
210 }; 209 };
211 210
212 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_ 211 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/permissions/mock_permission_request.cc ('k') | chrome/browser/permissions/permission_request_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698