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