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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 334923002: Remove ContentBrowserClient::GuestWebContentsAttached (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_adview
Patch Set: Hopefully fixed tests Created 6 years, 6 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 | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/guest_view/guest_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 *guest_delegate = 884 *guest_delegate =
885 GuestViewBase::Create(guest_instance_id, 885 GuestViewBase::Create(guest_instance_id,
886 guest_web_contents, 886 guest_web_contents,
887 extension_id, 887 extension_id,
888 api_type); 888 api_type);
889 #else 889 #else
890 NOTREACHED(); 890 NOTREACHED();
891 #endif // defined(ENABLE_EXTENSIONS) 891 #endif // defined(ENABLE_EXTENSIONS)
892 } 892 }
893 893
894 void ChromeContentBrowserClient::GuestWebContentsAttached(
895 WebContents* guest_web_contents,
896 WebContents* embedder_web_contents,
897 const base::DictionaryValue& extra_params) {
898 #if defined(ENABLE_EXTENSIONS)
899 GuestViewBase* guest = GuestViewBase::FromWebContents(guest_web_contents);
900 if (!guest) {
901 // It's ok to return here, since we could be running a browser plugin
902 // outside an extension, and don't need to attach a
903 // BrowserPluginGuestDelegate in that case;
904 // e.g. running with flag --enable-browser-plugin-for-all-view-types.
905 return;
906 }
907 guest->Attach(embedder_web_contents, extra_params);
908 #else
909 NOTREACHED();
910 #endif // defined(ENABLE_EXTENSIONS)
911 }
912
913 void ChromeContentBrowserClient::RenderProcessWillLaunch( 894 void ChromeContentBrowserClient::RenderProcessWillLaunch(
914 content::RenderProcessHost* host) { 895 content::RenderProcessHost* host) {
915 int id = host->GetID(); 896 int id = host->GetID();
916 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); 897 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
917 net::URLRequestContextGetter* context = 898 net::URLRequestContextGetter* context =
918 profile->GetRequestContextForRenderProcess(id); 899 profile->GetRequestContextForRenderProcess(id);
919 900
920 host->AddFilter(new ChromeRenderMessageFilter(id, profile)); 901 host->AddFilter(new ChromeRenderMessageFilter(id, profile));
921 #if defined(ENABLE_EXTENSIONS) 902 #if defined(ENABLE_EXTENSIONS)
922 host->AddFilter(new ChromeExtensionMessageFilter(id, profile)); 903 host->AddFilter(new ChromeExtensionMessageFilter(id, profile));
(...skipping 1928 matching lines...) Expand 10 before | Expand all | Expand 10 after
2851 switches::kDisableWebRtcEncryption, 2832 switches::kDisableWebRtcEncryption,
2852 }; 2833 };
2853 to_command_line->CopySwitchesFrom(from_command_line, 2834 to_command_line->CopySwitchesFrom(from_command_line,
2854 kWebRtcDevSwitchNames, 2835 kWebRtcDevSwitchNames,
2855 arraysize(kWebRtcDevSwitchNames)); 2836 arraysize(kWebRtcDevSwitchNames));
2856 } 2837 }
2857 } 2838 }
2858 #endif // defined(ENABLE_WEBRTC) 2839 #endif // defined(ENABLE_WEBRTC)
2859 2840
2860 } // namespace chrome 2841 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/guest_view/guest_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698