| OLD | NEW |
| 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 <deque> |
| 9 #include <unordered_map> | 9 #include <unordered_map> |
| 10 | 10 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // WebContentsObserver: | 130 // WebContentsObserver: |
| 131 void DidFinishNavigation( | 131 void DidFinishNavigation( |
| 132 content::NavigationHandle* navigation_handle) override; | 132 content::NavigationHandle* navigation_handle) override; |
| 133 void DocumentOnLoadCompletedInMainFrame() override; | 133 void DocumentOnLoadCompletedInMainFrame() override; |
| 134 void DocumentLoadedInFrame( | 134 void DocumentLoadedInFrame( |
| 135 content::RenderFrameHost* render_frame_host) override; | 135 content::RenderFrameHost* render_frame_host) override; |
| 136 void WebContentsDestroyed() override; | 136 void WebContentsDestroyed() override; |
| 137 | 137 |
| 138 // PermissionPrompt::Delegate: | 138 // PermissionPrompt::Delegate: |
| 139 const std::vector<PermissionRequest*>& Requests() override; | 139 const std::vector<PermissionRequest*>& Requests() override; |
| 140 const std::vector<bool>& AcceptStates() override; | |
| 141 void ToggleAccept(int request_index, bool new_value) override; | |
| 142 void TogglePersist(bool new_value) override; | 140 void TogglePersist(bool new_value) override; |
| 143 void Accept() override; | 141 void Accept() override; |
| 144 void Deny() override; | 142 void Deny() override; |
| 145 void Closing() override; | 143 void Closing() override; |
| 146 | 144 |
| 147 // 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. |
| 148 void ScheduleShowBubble(); | 146 void ScheduleShowBubble(); |
| 149 | 147 |
| 150 // If we aren't already showing a bubble, dequeue and show a pending request. | 148 // If we aren't already showing a bubble, dequeue and show a pending request. |
| 151 void DequeueRequestsAndShowBubble(); | 149 void DequeueRequestsAndShowBubble(); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 // Whether the response to each request should be persisted. | 197 // Whether the response to each request should be persisted. |
| 200 bool persist_; | 198 bool persist_; |
| 201 | 199 |
| 202 base::ObserverList<Observer> observer_list_; | 200 base::ObserverList<Observer> observer_list_; |
| 203 AutoResponseType auto_response_for_test_; | 201 AutoResponseType auto_response_for_test_; |
| 204 | 202 |
| 205 base::WeakPtrFactory<PermissionRequestManager> weak_factory_; | 203 base::WeakPtrFactory<PermissionRequestManager> weak_factory_; |
| 206 }; | 204 }; |
| 207 | 205 |
| 208 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_ | 206 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_ |
| OLD | NEW |