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

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_guest.cc

Issue 642573002: Remove the RenderProcessHost observer and attach the WebContentsObserver earlier to the GuestView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tests_other0
Patch Set: Created 6 years, 2 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
« no previous file with comments | « extensions/browser/guest_view/guest_view_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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
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
OLDNEW
« no previous file with comments | « extensions/browser/guest_view/guest_view_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698