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" | |
12 | 11 |
13 namespace extensions { | 12 namespace extensions { |
14 | 13 |
15 // A delegate class of WebViewPermissionHelper to request permissions that are | 14 // A delegate class of WebViewPermissionHelper to request permissions that are |
16 // not a part of extensions. | 15 // not a part of extensions. |
17 class WebViewPermissionHelperDelegate : public content::WebContentsObserver { | 16 class WebViewPermissionHelperDelegate : public content::WebContentsObserver { |
18 public: | 17 public: |
19 explicit WebViewPermissionHelperDelegate( | 18 explicit WebViewPermissionHelperDelegate(content::WebContents* contents); |
20 WebViewPermissionHelper* web_view_permission_helper); | |
21 virtual ~WebViewPermissionHelperDelegate(); | 19 virtual ~WebViewPermissionHelperDelegate(); |
22 | 20 |
23 virtual void RequestMediaAccessPermission( | 21 virtual void RequestMediaAccessPermission( |
24 content::WebContents* source, | 22 content::WebContents* source, |
25 const content::MediaStreamRequest& request, | 23 const content::MediaStreamRequest& request, |
26 const content::MediaResponseCallback& callback) {} | 24 const content::MediaResponseCallback& callback) {} |
27 | 25 |
28 virtual void CanDownload( | 26 virtual void CanDownload( |
29 content::RenderViewHost* render_view_host, | 27 content::RenderViewHost* render_view_host, |
30 const GURL& url, | 28 const GURL& url, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 // If access was blocked due to the page's content settings, | 76 // If access was blocked due to the page's content settings, |
79 // |blocked_by_policy| should be true, and this function should invoke | 77 // |blocked_by_policy| should be true, and this function should invoke |
80 // OnContentBlocked. | 78 // OnContentBlocked. |
81 virtual void FileSystemAccessedSync( | 79 virtual void FileSystemAccessedSync( |
82 int render_process_id, | 80 int render_process_id, |
83 int render_frame_id, | 81 int render_frame_id, |
84 const GURL& url, | 82 const GURL& url, |
85 bool blocked_by_policy, | 83 bool blocked_by_policy, |
86 IPC::Message* reply_msg) {} | 84 IPC::Message* reply_msg) {} |
87 | 85 |
88 WebViewPermissionHelper* web_view_permission_helper() const { | |
89 return web_view_permission_helper_; | |
90 } | |
91 | |
92 private: | 86 private: |
93 WebViewPermissionHelper* const web_view_permission_helper_; | |
94 | |
95 DISALLOW_COPY_AND_ASSIGN(WebViewPermissionHelperDelegate); | 87 DISALLOW_COPY_AND_ASSIGN(WebViewPermissionHelperDelegate); |
96 }; | 88 }; |
97 | 89 |
98 } // namespace extensions | 90 } // namespace extensions |
99 | 91 |
100 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIWE_PERMISSION_HELPER_DEL
EGATE_H_ | 92 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIWE_PERMISSION_HELPER_DEL
EGATE_H_ |
OLD | NEW |