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 ~WebViewPermissionHelperDelegate() override; |
22 | 22 |
23 virtual void CanDownload( | 23 virtual void CanDownload( |
24 content::RenderViewHost* render_view_host, | 24 content::RenderViewHost* render_view_host, |
25 const GURL& url, | 25 const GURL& url, |
26 const std::string& request_method, | 26 const std::string& request_method, |
27 const base::Callback<void(bool)>& callback) {} | 27 const base::Callback<void(bool)>& callback) {} |
28 | 28 |
29 virtual void RequestPointerLockPermission( | 29 virtual void RequestPointerLockPermission( |
30 bool user_gesture, | 30 bool user_gesture, |
31 bool last_unlocked_by_target, | 31 bool last_unlocked_by_target, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 private: | 87 private: |
88 WebViewPermissionHelper* const web_view_permission_helper_; | 88 WebViewPermissionHelper* const web_view_permission_helper_; |
89 | 89 |
90 DISALLOW_COPY_AND_ASSIGN(WebViewPermissionHelperDelegate); | 90 DISALLOW_COPY_AND_ASSIGN(WebViewPermissionHelperDelegate); |
91 }; | 91 }; |
92 | 92 |
93 } // namespace extensions | 93 } // namespace extensions |
94 | 94 |
95 #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 |