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( | |
24 content::WebContents* source, | |
25 const content::MediaStreamRequest& request, | |
26 const content::MediaResponseCallback& callback) {} | |
27 | |
28 virtual bool CheckMediaAccessPermission(content::WebContents* source, | |
29 const GURL& security_origin, | |
30 content::MediaStreamType type); | |
31 | |
32 virtual void CanDownload( | 23 virtual void CanDownload( |
33 content::RenderViewHost* render_view_host, | 24 content::RenderViewHost* render_view_host, |
34 const GURL& url, | 25 const GURL& url, |
35 const std::string& request_method, | 26 const std::string& request_method, |
36 const base::Callback<void(bool)>& callback) {} | 27 const base::Callback<void(bool)>& callback) {} |
37 | 28 |
38 virtual void RequestPointerLockPermission( | 29 virtual void RequestPointerLockPermission( |
39 bool user_gesture, | 30 bool user_gesture, |
40 bool last_unlocked_by_target, | 31 bool last_unlocked_by_target, |
41 const base::Callback<void(bool)>& callback) {} | 32 const base::Callback<void(bool)>& callback) {} |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 86 |
96 private: | 87 private: |
97 WebViewPermissionHelper* const web_view_permission_helper_; | 88 WebViewPermissionHelper* const web_view_permission_helper_; |
98 | 89 |
99 DISALLOW_COPY_AND_ASSIGN(WebViewPermissionHelperDelegate); | 90 DISALLOW_COPY_AND_ASSIGN(WebViewPermissionHelperDelegate); |
100 }; | 91 }; |
101 | 92 |
102 } // namespace extensions | 93 } // namespace extensions |
103 | 94 |
104 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIWE_PERMISSION_HELPER_DEL
EGATE_H_ | 95 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIWE_PERMISSION_HELPER_DEL
EGATE_H_ |
OLD | NEW |