| Index: chrome/browser/chrome_content_browser_client.cc
|
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
|
| index 5d0bf4ff9216bbb11d482eb45ebbdc60f135f03b..024a98615eff9fb329985c499d54a3d64a0502c2 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/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/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/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"
|
| @@ -771,7 +771,7 @@ void ChromeContentBrowserClient::GetStoragePartitionConfigForSite(
|
| partition_name->clear();
|
| *in_memory = false;
|
|
|
| - bool success = GuestViewBase::GetGuestPartitionConfigForSite(
|
| + bool success = GuestView::GetGuestPartitionConfigForSite(
|
| site, partition_domain, partition_name, in_memory);
|
|
|
| if (!success && site.SchemeIs(extensions::kExtensionScheme)) {
|
| @@ -837,11 +837,10 @@ void ChromeContentBrowserClient::GuestWebContentsCreated(
|
| return;
|
| }
|
|
|
| - /// 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) &&
|
| + /// 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) &&
|
| !CommandLine::ForCurrentProcess()->HasSwitch(
|
| switches::kEnableBrowserPluginForAllViewTypes)) {
|
| NOTREACHED();
|
| @@ -849,15 +848,17 @@ void ChromeContentBrowserClient::GuestWebContentsCreated(
|
| }
|
|
|
| if (opener_web_contents) {
|
| - GuestViewBase* guest = GuestViewBase::FromWebContents(opener_web_contents);
|
| + GuestView* guest = GuestView::FromWebContents(opener_web_contents);
|
| if (!guest) {
|
| NOTREACHED();
|
| return;
|
| }
|
|
|
| - // Create a new GuestViewBase of the same type as the opener.
|
| - *guest_delegate = GuestViewBase::Create(
|
| - guest_web_contents, extension_id, guest->GetViewType());
|
| + // Create a new GuestView of the same type as the opener.
|
| + *guest_delegate =
|
| + GuestView::Create(guest_web_contents,
|
| + extension_id,
|
| + guest->GetViewType());
|
| return;
|
| }
|
|
|
| @@ -872,14 +873,17 @@ void ChromeContentBrowserClient::GuestWebContentsCreated(
|
| return;
|
|
|
| *guest_delegate =
|
| - GuestViewBase::Create(guest_web_contents, extension_id, api_type);
|
| + GuestView::Create(guest_web_contents,
|
| + extension_id,
|
| + GuestView::GetViewTypeFromString(api_type));
|
| }
|
|
|
| void ChromeContentBrowserClient::GuestWebContentsAttached(
|
| WebContents* guest_web_contents,
|
| WebContents* embedder_web_contents,
|
| const base::DictionaryValue& extra_params) {
|
| - GuestViewBase* guest = GuestViewBase::FromWebContents(guest_web_contents);
|
| +
|
| + GuestView* guest = GuestView::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
|
| @@ -944,8 +948,7 @@ void ChromeContentBrowserClient::RenderProcessWillLaunch(
|
|
|
| RendererContentSettingRules rules;
|
| if (host->IsGuest()) {
|
| - GuestViewBase::GetDefaultContentSettingRules(&rules,
|
| - profile->IsOffTheRecord());
|
| + GuestView::GetDefaultContentSettingRules(&rules, profile->IsOffTheRecord());
|
| } else {
|
| GetRendererContentSettingRules(
|
| profile->GetHostContentSettingsMap(), &rules);
|
|
|