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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 1602663003: Framelet Prototype 2016 using Mojo IPC Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Disabled oilpan Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/extensions/api/chrome_extensions_api_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4ef4c6f439a3c43abf6ac0db48de5597071e44c3..e0eec340e695ae82653a209713f5cb9d834b7669 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -47,6 +47,8 @@
#include "chrome/browser/engagement/site_engagement_eviction_policy.h"
#include "chrome/browser/font_family_cache.h"
#include "chrome/browser/geolocation/chrome_access_token_store.h"
+#include "chrome/browser/guest_view/chrome_content_browser_client_guest_view_part.h"
+#include "chrome/browser/guest_view/chrome_guest_view_manager_delegate.h"
#include "chrome/browser/media/media_capture_devices_dispatcher.h"
#include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h"
#include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h"
@@ -116,7 +118,10 @@
#include "components/dom_distiller/core/dom_distiller_switches.h"
#include "components/dom_distiller/core/url_constants.h"
#include "components/error_page/common/error_page_switches.h"
+#include "components/framelet/browser/framelet_factory_impl.h"
#include "components/google/core/browser/google_util.h"
+#include "components/guest_view/browser/guest_view_base.h"
+#include "components/guest_view/browser/guest_view_manager.h"
#include "components/metrics/client_info.h"
#include "components/net_log/chrome_net_log.h"
#include "components/pref_registry/pref_registry_syncable.h"
@@ -248,8 +253,6 @@
#include "chrome/browser/extensions/chrome_content_browser_client_extensions_part.h"
#include "chrome/browser/media/cast_transport_host_filter.h"
#include "chrome/browser/speech/extension_api/tts_engine_extension_api.h"
-#include "components/guest_view/browser/guest_view_base.h"
-#include "components/guest_view/browser/guest_view_manager.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_util.h"
#include "extensions/browser/guest_view/web_view/web_view_guest.h"
@@ -636,7 +639,6 @@ float GetDeviceScaleAdjustment() {
}
#endif // defined(OS_ANDROID)
-#if defined(ENABLE_EXTENSIONS)
// By default, JavaScript and images are enabled in guest content.
void GetGuestViewDefaultContentSettingRules(
bool incognito,
@@ -655,7 +657,6 @@ void GetGuestViewDefaultContentSettingRules(
std::string(),
incognito));
}
-#endif // defined(ENABLE_EXTENSIONS)
void CreateUsbDeviceManager(
RenderFrameHost* render_frame_host,
@@ -694,6 +695,7 @@ void CreateWebUsbPermissionBubble(
ChromeContentBrowserClient::ChromeContentBrowserClient()
:
weak_factory_(this) {
+ extra_parts_.push_back(new chrome::ChromeContentBrowserClientGuestViewPart);
#if defined(ENABLE_PLUGINS)
for (size_t i = 0; i < arraysize(kPredefinedAllowedDevChannelOrigins); ++i)
allowed_dev_channel_origins_.insert(kPredefinedAllowedDevChannelOrigins[i]);
@@ -944,11 +946,7 @@ void ChromeContentBrowserClient::RenderProcessWillLaunch(
RendererContentSettingRules rules;
if (host->IsForGuestsOnly()) {
-#if defined(ENABLE_EXTENSIONS)
GetGuestViewDefaultContentSettingRules(profile->IsOffTheRecord(), &rules);
-#else
- NOTREACHED();
-#endif
} else {
GetRendererContentSettingRules(
HostContentSettingsMapFactory::GetForProfile(profile), &rules);
@@ -2656,6 +2654,10 @@ void ChromeContentBrowserClient::RegisterRenderFrameMojoServices(
registry->AddService(
base::Bind(&CreateWebUsbPermissionBubble, render_frame_host));
#endif // !defined(OS_ANDROID) && !defined(OS_IOS)
+ registry->AddService(base::Bind(
+ &framelet::FrameletFactoryImpl::CreateService, render_frame_host,
+ base::Bind(&chrome::ChromeGuestViewManagerDelegate::Create,
+ render_frame_host->GetSiteInstance()->GetBrowserContext())));
}
void ChromeContentBrowserClient::RegisterOutOfProcessMojoApplications(
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/extensions/api/chrome_extensions_api_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698