OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 | 445 |
446 virtual void CancelPermissionRequest(PermissionType permission, | 446 virtual void CancelPermissionRequest(PermissionType permission, |
447 WebContents* web_contents, | 447 WebContents* web_contents, |
448 int bridge_id, | 448 int bridge_id, |
449 const GURL& requesting_frame) {} | 449 const GURL& requesting_frame) {} |
450 | 450 |
451 virtual void RegisterPermissionUsage(PermissionType permission, | 451 virtual void RegisterPermissionUsage(PermissionType permission, |
452 WebContents* web_contents, | 452 WebContents* web_contents, |
453 const GURL& frame_url, | 453 const GURL& frame_url, |
454 const GURL& main_frame_url) {} | 454 const GURL& main_frame_url) {} |
| 455 virtual void HasPermission( |
| 456 PermissionType permission, |
| 457 WebContents* web_contents, |
| 458 const GURL& requesting_frame, |
| 459 const base::Callback<void(bool)>& result_callback); |
455 | 460 |
456 // Returns true if the given page is allowed to open a window of the given | 461 // Returns true if the given page is allowed to open a window of the given |
457 // type. If true is returned, |no_javascript_access| will indicate whether | 462 // type. If true is returned, |no_javascript_access| will indicate whether |
458 // the window that is created should be scriptable/in the same process. | 463 // the window that is created should be scriptable/in the same process. |
459 // This is called on the IO thread. | 464 // This is called on the IO thread. |
460 virtual bool CanCreateWindow(const GURL& opener_url, | 465 virtual bool CanCreateWindow(const GURL& opener_url, |
461 const GURL& opener_top_level_frame_url, | 466 const GURL& opener_top_level_frame_url, |
462 const GURL& source_origin, | 467 const GURL& source_origin, |
463 WindowContainerType container_type, | 468 WindowContainerType container_type, |
464 const GURL& target_url, | 469 const GURL& target_url, |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 // camera. Note that this does not query the user. |type| must be | 628 // camera. Note that this does not query the user. |type| must be |
624 // MEDIA_DEVICE_AUDIO_CAPTURE or MEDIA_DEVICE_VIDEO_CAPTURE. | 629 // MEDIA_DEVICE_AUDIO_CAPTURE or MEDIA_DEVICE_VIDEO_CAPTURE. |
625 virtual bool CheckMediaAccessPermission(BrowserContext* browser_context, | 630 virtual bool CheckMediaAccessPermission(BrowserContext* browser_context, |
626 const GURL& security_origin, | 631 const GURL& security_origin, |
627 MediaStreamType type); | 632 MediaStreamType type); |
628 }; | 633 }; |
629 | 634 |
630 } // namespace content | 635 } // namespace content |
631 | 636 |
632 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 637 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |