summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chrome_content_browser_client.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/chrome_content_browser_client.cc')
-rw-r--r--chrome/browser/chrome_content_browser_client.cc39
1 files changed, 18 insertions, 21 deletions
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index c0eb710..9c77726 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -41,10 +41,10 @@
#include "chrome/browser/extensions/suggest_permission_util.h"
#include "chrome/browser/geolocation/chrome_access_token_store.h"
#include "chrome/browser/google/google_util.h"
-#include "chrome/browser/guestview/adview/adview_guest.h"
-#include "chrome/browser/guestview/guestview.h"
-#include "chrome/browser/guestview/guestview_constants.h"
-#include "chrome/browser/guestview/webview/webview_guest.h"
+#include "chrome/browser/guest_view/ad_view/ad_view_guest.h"
+#include "chrome/browser/guest_view/guest_view_base.h"
+#include "chrome/browser/guest_view/guest_view_constants.h"
+#include "chrome/browser/guest_view/web_view/web_view_guest.h"
#include "chrome/browser/media/cast_transport_host_filter.h"
#include "chrome/browser/media/media_capture_devices_dispatcher.h"
#include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h"
@@ -770,7 +770,7 @@ void ChromeContentBrowserClient::GetStoragePartitionConfigForSite(
partition_name->clear();
*in_memory = false;
- bool success = GuestView::GetGuestPartitionConfigForSite(
+ bool success = GuestViewBase::GetGuestPartitionConfigForSite(
site, partition_domain, partition_name, in_memory);
if (!success && site.SchemeIs(extensions::kExtensionScheme)) {
@@ -836,10 +836,11 @@ void ChromeContentBrowserClient::GuestWebContentsCreated(
return;
}
- /// TODO(fsamuel): In the future, certain types of GuestViews won't require
- // extension bindings. At that point, we should clear |extension_id| instead
- // of exiting early.
- if (!service->GetExtensionById(extension_id, false) &&
+ /// TODO(fsamuel): In the future, certain types of GuestViewBases won't
+ // require extension bindings. At that point, we should clear |extension_id|
+ // instead of exiting early.
+ if (!extension_id.empty() &&
+ !service->GetExtensionById(extension_id, false) &&
!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserPluginForAllViewTypes)) {
NOTREACHED();
@@ -847,17 +848,15 @@ void ChromeContentBrowserClient::GuestWebContentsCreated(
}
if (opener_web_contents) {
- GuestView* guest = GuestView::FromWebContents(opener_web_contents);
+ GuestViewBase* guest = GuestViewBase::FromWebContents(opener_web_contents);
if (!guest) {
NOTREACHED();
return;
}
- // Create a new GuestView of the same type as the opener.
- *guest_delegate =
- GuestView::Create(guest_web_contents,
- extension_id,
- guest->GetViewType());
+ // Create a new GuestViewBase of the same type as the opener.
+ *guest_delegate = GuestViewBase::Create(
+ guest_web_contents, extension_id, guest->GetViewType());
return;
}
@@ -872,17 +871,14 @@ void ChromeContentBrowserClient::GuestWebContentsCreated(
return;
*guest_delegate =
- GuestView::Create(guest_web_contents,
- extension_id,
- GuestView::GetViewTypeFromString(api_type));
+ GuestViewBase::Create(guest_web_contents, extension_id, api_type);
}
void ChromeContentBrowserClient::GuestWebContentsAttached(
WebContents* guest_web_contents,
WebContents* embedder_web_contents,
const base::DictionaryValue& extra_params) {
-
- GuestView* guest = GuestView::FromWebContents(guest_web_contents);
+ GuestViewBase* guest = GuestViewBase::FromWebContents(guest_web_contents);
if (!guest) {
// It's ok to return here, since we could be running a browser plugin
// outside an extension, and don't need to attach a
@@ -947,7 +943,8 @@ void ChromeContentBrowserClient::RenderProcessWillLaunch(
RendererContentSettingRules rules;
if (host->IsGuest()) {
- GuestView::GetDefaultContentSettingRules(&rules, profile->IsOffTheRecord());
+ GuestViewBase::GetDefaultContentSettingRules(&rules,
+ profile->IsOffTheRecord());
} else {
GetRendererContentSettingRules(
profile->GetHostContentSettingsMap(), &rules);