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 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 web_contents->GetRoutingID())); | 827 web_contents->GetRoutingID())); |
828 } | 828 } |
829 | 829 |
830 content::WebContents* WebViewGuest::CreateNewGuestWindow( | 830 content::WebContents* WebViewGuest::CreateNewGuestWindow( |
831 const content::WebContents::CreateParams& create_params) { | 831 const content::WebContents::CreateParams& create_params) { |
832 GuestViewManager* guest_manager = | 832 GuestViewManager* guest_manager = |
833 GuestViewManager::FromBrowserContext(browser_context()); | 833 GuestViewManager::FromBrowserContext(browser_context()); |
834 return guest_manager->CreateGuestWithWebContentsParams( | 834 return guest_manager->CreateGuestWithWebContentsParams( |
835 WebViewGuest::Type, | 835 WebViewGuest::Type, |
836 embedder_extension_id(), | 836 embedder_extension_id(), |
837 embedder_web_contents()->GetRenderProcessHost()->GetID(), | 837 embedder_web_contents(), |
838 create_params); | 838 create_params); |
839 } | 839 } |
840 | 840 |
841 void WebViewGuest::RequestMediaAccessPermission( | 841 void WebViewGuest::RequestMediaAccessPermission( |
842 content::WebContents* source, | 842 content::WebContents* source, |
843 const content::MediaStreamRequest& request, | 843 const content::MediaStreamRequest& request, |
844 const content::MediaResponseCallback& callback) { | 844 const content::MediaResponseCallback& callback) { |
845 web_view_permission_helper_->RequestMediaAccessPermission(source, | 845 web_view_permission_helper_->RequestMediaAccessPermission(source, |
846 request, | 846 request, |
847 callback); | 847 callback); |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1218 WebViewGuest* guest = | 1218 WebViewGuest* guest = |
1219 WebViewGuest::From(embedder_render_process_id(), new_window_instance_id); | 1219 WebViewGuest::From(embedder_render_process_id(), new_window_instance_id); |
1220 if (!guest) | 1220 if (!guest) |
1221 return; | 1221 return; |
1222 | 1222 |
1223 if (!allow) | 1223 if (!allow) |
1224 guest->Destroy(); | 1224 guest->Destroy(); |
1225 } | 1225 } |
1226 | 1226 |
1227 } // namespace extensions | 1227 } // namespace extensions |
OLD | NEW |