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 EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIWE_PERMISSION_HELPER_DELEGA
TE_H_ | 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIWE_PERMISSION_HELPER_DELEGA
TE_H_ |
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIWE_PERMISSION_HELPER_DELEGA
TE_H_ | 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIWE_PERMISSION_HELPER_DELEGA
TE_H_ |
7 | 7 |
8 #include "content/public/browser/web_contents.h" | 8 #include "content/public/browser/web_contents.h" |
9 #include "content/public/browser/web_contents_observer.h" | 9 #include "content/public/browser/web_contents_observer.h" |
10 #include "content/public/common/media_stream_request.h" | 10 #include "content/public/common/media_stream_request.h" |
11 #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h" | 11 #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h" |
12 | 12 |
13 namespace extensions { | 13 namespace extensions { |
14 | 14 |
15 // A delegate class of WebViewPermissionHelper to request permissions that are | 15 // A delegate class of WebViewPermissionHelper to request permissions that are |
16 // not a part of extensions. | 16 // not a part of extensions. |
17 class WebViewPermissionHelperDelegate : public content::WebContentsObserver { | 17 class WebViewPermissionHelperDelegate : public content::WebContentsObserver { |
18 public: | 18 public: |
19 explicit WebViewPermissionHelperDelegate( | 19 explicit WebViewPermissionHelperDelegate( |
20 WebViewPermissionHelper* web_view_permission_helper); | 20 WebViewPermissionHelper* web_view_permission_helper); |
21 virtual ~WebViewPermissionHelperDelegate(); | 21 virtual ~WebViewPermissionHelperDelegate(); |
22 | 22 |
23 virtual void RequestMediaAccessPermission( | 23 virtual void RequestMediaAccessPermission( |
24 content::WebContents* source, | 24 content::WebContents* source, |
25 const content::MediaStreamRequest& request, | 25 const content::MediaStreamRequest& request, |
26 const content::MediaResponseCallback& callback) {} | 26 const content::MediaResponseCallback& callback) {} |
27 | 27 |
| 28 virtual bool CheckMediaAccessPermission(content::WebContents* source, |
| 29 const GURL& security_origin, |
| 30 content::MediaStreamType type); |
| 31 |
28 virtual void CanDownload( | 32 virtual void CanDownload( |
29 content::RenderViewHost* render_view_host, | 33 content::RenderViewHost* render_view_host, |
30 const GURL& url, | 34 const GURL& url, |
31 const std::string& request_method, | 35 const std::string& request_method, |
32 const base::Callback<void(bool)>& callback) {} | 36 const base::Callback<void(bool)>& callback) {} |
33 | 37 |
34 virtual void RequestPointerLockPermission( | 38 virtual void RequestPointerLockPermission( |
35 bool user_gesture, | 39 bool user_gesture, |
36 bool last_unlocked_by_target, | 40 bool last_unlocked_by_target, |
37 const base::Callback<void(bool)>& callback) {} | 41 const base::Callback<void(bool)>& callback) {} |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 95 |
92 private: | 96 private: |
93 WebViewPermissionHelper* const web_view_permission_helper_; | 97 WebViewPermissionHelper* const web_view_permission_helper_; |
94 | 98 |
95 DISALLOW_COPY_AND_ASSIGN(WebViewPermissionHelperDelegate); | 99 DISALLOW_COPY_AND_ASSIGN(WebViewPermissionHelperDelegate); |
96 }; | 100 }; |
97 | 101 |
98 } // namespace extensions | 102 } // namespace extensions |
99 | 103 |
100 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIWE_PERMISSION_HELPER_DEL
EGATE_H_ | 104 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIWE_PERMISSION_HELPER_DEL
EGATE_H_ |
OLD | NEW |