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_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 5 #ifndef CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
6 #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 6 #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 const PermissionResponseCallback& callback, | 193 const PermissionResponseCallback& callback, |
194 bool allowed_by_default); | 194 bool allowed_by_default); |
195 | 195 |
196 // Requests Geolocation Permission from the embedder. | 196 // Requests Geolocation Permission from the embedder. |
197 void RequestGeolocationPermission(int bridge_id, | 197 void RequestGeolocationPermission(int bridge_id, |
198 const GURL& requesting_frame, | 198 const GURL& requesting_frame, |
199 bool user_gesture, | 199 bool user_gesture, |
200 const base::Callback<void(bool)>& callback); | 200 const base::Callback<void(bool)>& callback); |
201 void CancelGeolocationPermissionRequest(int bridge_id); | 201 void CancelGeolocationPermissionRequest(int bridge_id); |
202 | 202 |
| 203 // Called when file system access is requested by the guest content using the |
| 204 // HTML5 file system API in main thread, or a worker thread. |
| 205 // The request is plumbed through the <webview> permission request API. The |
| 206 // request will be: |
| 207 // - Allowed if the embedder explicitly allowed it. |
| 208 // - Denied if the embedder explicitly denied. |
| 209 // - Determined by the guest's content settings if the embedder does not |
| 210 // perform an explicit action. |
203 void RequestFileSystemPermission(const GURL& url, | 211 void RequestFileSystemPermission(const GURL& url, |
204 bool allowed_by_default, | 212 bool allowed_by_default, |
205 const base::Callback<void(bool)>& callback); | 213 const base::Callback<void(bool)>& callback); |
206 | 214 |
207 // Overrides the user agent for this guest. | 215 // Overrides the user agent for this guest. |
208 // This affects subsequent guest navigations. | 216 // This affects subsequent guest navigations. |
209 void SetUserAgentOverride(const std::string& user_agent_override); | 217 void SetUserAgentOverride(const std::string& user_agent_override); |
210 | 218 |
211 // Stop loading the guest. | 219 // Stop loading the guest. |
212 void Stop(); | 220 void Stop(); |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 changed(false) {} | 385 changed(false) {} |
378 }; | 386 }; |
379 | 387 |
380 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap; | 388 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap; |
381 PendingWindowMap pending_new_windows_; | 389 PendingWindowMap pending_new_windows_; |
382 | 390 |
383 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); | 391 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
384 }; | 392 }; |
385 | 393 |
386 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 394 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
OLD | NEW |