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

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

Issue 2403763003: [Mac] Address buggy permission bubble behaviour on dismissal via ESC. (Closed)
Patch Set: Use Closing Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 // Cancels an outstanding request. This may have different effects depending 64 // Cancels an outstanding request. This may have different effects depending
65 // on what is going on with the bubble. If the request is pending, it will be 65 // on what is going on with the bubble. If the request is pending, it will be
66 // removed and never shown. If the request is showing, it will continue to be 66 // removed and never shown. If the request is showing, it will continue to be
67 // shown, but the user's action won't be reported back to the request object. 67 // shown, but the user's action won't be reported back to the request object.
68 // In some circumstances, we can remove the request from the bubble, and may 68 // In some circumstances, we can remove the request from the bubble, and may
69 // do so. The request will have RequestFinished executed on it if it is found, 69 // do so. The request will have RequestFinished executed on it if it is found,
70 // at which time the caller is free to delete the request. 70 // at which time the caller is free to delete the request.
71 void CancelRequest(PermissionRequest* request); 71 void CancelRequest(PermissionRequest* request);
72 72
73 // Hides the bubble. 73 // Temporarily hides the bubble, and destroys the prompt UI surface. Any
74 // existing requests will be reshown when DisplayPendingRequests is called
75 // (e.g. when switching tabs away and back to a page with a prompt).
74 void HideBubble(); 76 void HideBubble();
75 77
76 // Will show a permission bubble if there is a pending permission request on 78 // Will show a permission bubble if there is a pending permission request on
77 // the web contents that the PermissionRequestManager belongs to. 79 // the web contents that the PermissionRequestManager belongs to.
78 void DisplayPendingRequests(); 80 void DisplayPendingRequests();
79 81
80 // Will reposition the bubble (may change parent if necessary). 82 // Will reposition the bubble (may change parent if necessary).
81 void UpdateAnchorPosition(); 83 void UpdateAnchorPosition();
82 84
83 // True if a permission bubble is currently visible. 85 // True if a permission bubble is currently visible.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // Whether each of the requests in |requests_| is accepted by the user. 199 // Whether each of the requests in |requests_| is accepted by the user.
198 std::vector<bool> accept_states_; 200 std::vector<bool> accept_states_;
199 201
200 base::ObserverList<Observer> observer_list_; 202 base::ObserverList<Observer> observer_list_;
201 AutoResponseType auto_response_for_test_; 203 AutoResponseType auto_response_for_test_;
202 204
203 base::WeakPtrFactory<PermissionRequestManager> weak_factory_; 205 base::WeakPtrFactory<PermissionRequestManager> weak_factory_;
204 }; 206 };
205 207
206 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_ 208 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698