| 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 3d117b2c183eebbfc8856d5f9cf8b7e8d0f6a317..d75194a44c12399bcd37dde11c43ec7498cba88b 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"
|
| @@ -771,7 +771,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)) {
|
| @@ -837,26 +837,25 @@ 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)) {
|
| NOTREACHED();
|
| return;
|
| }
|
|
|
| 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;
|
| }
|
|
|
| @@ -871,17 +870,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
|
| @@ -946,7 +942,8 @@ void ChromeContentBrowserClient::RenderProcessWillLaunch(
|
|
|
| RendererContentSettingRules rules;
|
| if (host->IsGuest()) {
|
| - GuestView::GetDefaultContentSettingRules(&rules, profile->IsOffTheRecord());
|
| + GuestViewBase::GetDefaultContentSettingRules(&rules,
|
| + profile->IsOffTheRecord());
|
| } else {
|
| GetRendererContentSettingRules(
|
| profile->GetHostContentSettingsMap(), &rules);
|
|
|