| 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 <unordered_map> | 8 #include <unordered_map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 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; |
| 140 const std::vector<bool>& AcceptStates() override; |
| 139 void ToggleAccept(int request_index, bool new_value) override; | 141 void ToggleAccept(int request_index, bool new_value) override; |
| 140 void TogglePersist(bool new_value) override; | 142 void TogglePersist(bool new_value) override; |
| 141 void Accept() override; | 143 void Accept() override; |
| 142 void Deny() override; | 144 void Deny() override; |
| 143 void Closing() override; | 145 void Closing() override; |
| 144 | 146 |
| 145 // Posts a task which will allow the bubble to become visible if it is needed. | 147 // Posts a task which will allow the bubble to become visible if it is needed. |
| 146 void ScheduleShowBubble(); | 148 void ScheduleShowBubble(); |
| 147 | 149 |
| 148 // If we aren't already showing a bubble, dequeue and show a pending request. | 150 // If we aren't already showing a bubble, dequeue and show a pending request. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 // Whether each of the requests in |requests_| is accepted by the user. | 203 // Whether each of the requests in |requests_| is accepted by the user. |
| 202 std::vector<bool> accept_states_; | 204 std::vector<bool> accept_states_; |
| 203 | 205 |
| 204 base::ObserverList<Observer> observer_list_; | 206 base::ObserverList<Observer> observer_list_; |
| 205 AutoResponseType auto_response_for_test_; | 207 AutoResponseType auto_response_for_test_; |
| 206 | 208 |
| 207 base::WeakPtrFactory<PermissionRequestManager> weak_factory_; | 209 base::WeakPtrFactory<PermissionRequestManager> weak_factory_; |
| 208 }; | 210 }; |
| 209 | 211 |
| 210 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_ | 212 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_ |
| OLD | NEW |