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 #include "extensions/browser/guest_view/web_view/web_view_guest.h" | 5 #include "extensions/browser/guest_view/web_view/web_view_guest.h" |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "content/public/browser/browser_context.h" | 10 #include "content/public/browser/browser_context.h" |
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 | 784 |
785 void WebViewGuest::RequestMediaAccessPermission( | 785 void WebViewGuest::RequestMediaAccessPermission( |
786 content::WebContents* source, | 786 content::WebContents* source, |
787 const content::MediaStreamRequest& request, | 787 const content::MediaStreamRequest& request, |
788 const content::MediaResponseCallback& callback) { | 788 const content::MediaResponseCallback& callback) { |
789 web_view_permission_helper_->RequestMediaAccessPermission(source, | 789 web_view_permission_helper_->RequestMediaAccessPermission(source, |
790 request, | 790 request, |
791 callback); | 791 callback); |
792 } | 792 } |
793 | 793 |
| 794 bool WebViewGuest::CheckMediaAccessPermission(content::WebContents* source, |
| 795 const GURL& security_origin, |
| 796 content::MediaStreamType type) { |
| 797 return web_view_permission_helper_->CheckMediaAccessPermission( |
| 798 source, security_origin, type); |
| 799 } |
| 800 |
794 void WebViewGuest::CanDownload( | 801 void WebViewGuest::CanDownload( |
795 content::RenderViewHost* render_view_host, | 802 content::RenderViewHost* render_view_host, |
796 const GURL& url, | 803 const GURL& url, |
797 const std::string& request_method, | 804 const std::string& request_method, |
798 const base::Callback<void(bool)>& callback) { | 805 const base::Callback<void(bool)>& callback) { |
799 web_view_permission_helper_->CanDownload(render_view_host, | 806 web_view_permission_helper_->CanDownload(render_view_host, |
800 url, | 807 url, |
801 request_method, | 808 request_method, |
802 callback); | 809 callback); |
803 } | 810 } |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1093 WebViewGuest* guest = | 1100 WebViewGuest* guest = |
1094 WebViewGuest::From(embedder_render_process_id(), new_window_instance_id); | 1101 WebViewGuest::From(embedder_render_process_id(), new_window_instance_id); |
1095 if (!guest) | 1102 if (!guest) |
1096 return; | 1103 return; |
1097 | 1104 |
1098 if (!allow) | 1105 if (!allow) |
1099 guest->Destroy(); | 1106 guest->Destroy(); |
1100 } | 1107 } |
1101 | 1108 |
1102 } // namespace extensions | 1109 } // namespace extensions |
OLD | NEW |