Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_permission_helper_delegate.h

Issue 496873006: Move core web_view code to extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove dependency of web_view_internal_api.h Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 WebViewPermissionHelper* web_view_permission_helper);
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
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 WebViewPermissionHelper* web_view_permission_helper() const {
89 return web_view_permission_helper_;
90 }
91
86 private: 92 private:
93 WebViewPermissionHelper* const web_view_permission_helper_;
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698