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_VIEW_PERMISSION_HELPER_H_ | 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ |
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ | 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/metrics/user_metrics_action.h" | 9 #include "base/metrics/user_metrics_action.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 bool allowed_by_default); | 53 bool allowed_by_default); |
54 | 54 |
55 static WebViewPermissionHelper* FromWebContents( | 55 static WebViewPermissionHelper* FromWebContents( |
56 content::WebContents* web_contents); | 56 content::WebContents* web_contents); |
57 static WebViewPermissionHelper* FromFrameID(int render_process_id, | 57 static WebViewPermissionHelper* FromFrameID(int render_process_id, |
58 int render_frame_id); | 58 int render_frame_id); |
59 void RequestMediaAccessPermission( | 59 void RequestMediaAccessPermission( |
60 content::WebContents* source, | 60 content::WebContents* source, |
61 const content::MediaStreamRequest& request, | 61 const content::MediaStreamRequest& request, |
62 const content::MediaResponseCallback& callback); | 62 const content::MediaResponseCallback& callback); |
| 63 bool CheckMediaAccessPermission(content::WebContents* source, |
| 64 const GURL& security_origin, |
| 65 content::MediaStreamType type); |
63 void CanDownload(content::RenderViewHost* render_view_host, | 66 void CanDownload(content::RenderViewHost* render_view_host, |
64 const GURL& url, | 67 const GURL& url, |
65 const std::string& request_method, | 68 const std::string& request_method, |
66 const base::Callback<void(bool)>& callback); | 69 const base::Callback<void(bool)>& callback); |
67 void RequestPointerLockPermission(bool user_gesture, | 70 void RequestPointerLockPermission(bool user_gesture, |
68 bool last_unlocked_by_target, | 71 bool last_unlocked_by_target, |
69 const base::Callback<void(bool)>& callback); | 72 const base::Callback<void(bool)>& callback); |
70 | 73 |
71 // Requests Geolocation Permission from the embedder. | 74 // Requests Geolocation Permission from the embedder. |
72 void RequestGeolocationPermission(int bridge_id, | 75 void RequestGeolocationPermission(int bridge_id, |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 WebViewGuest* const web_view_guest_; | 155 WebViewGuest* const web_view_guest_; |
153 | 156 |
154 base::WeakPtrFactory<WebViewPermissionHelper> weak_factory_; | 157 base::WeakPtrFactory<WebViewPermissionHelper> weak_factory_; |
155 | 158 |
156 DISALLOW_COPY_AND_ASSIGN(WebViewPermissionHelper); | 159 DISALLOW_COPY_AND_ASSIGN(WebViewPermissionHelper); |
157 }; | 160 }; |
158 | 161 |
159 } // namespace extensions | 162 } // namespace extensions |
160 | 163 |
161 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ | 164 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ |
OLD | NEW |