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

Unified Diff: content/shell/browser/shell_content_browser_client.cc

Issue 1470823002: Enable builtin Mojo JS modules in layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@usb-testing
Patch Set: self review Created 5 years, 1 month 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
Index: content/shell/browser/shell_content_browser_client.cc
diff --git a/content/shell/browser/shell_content_browser_client.cc b/content/shell/browser/shell_content_browser_client.cc
index 8b0ca65cc15b709967a2ead352aa7906b76db481..f7579df3b3b7d2d92f516d11d30038a9a65357dc 100644
--- a/content/shell/browser/shell_content_browser_client.cc
+++ b/content/shell/browser/shell_content_browser_client.cc
@@ -13,8 +13,10 @@
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/page_navigator.h"
#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/render_view_host.h"
#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/browser/storage_partition.h"
+#include "content/public/common/bindings_policy.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "content/public/common/web_preferences.h"
@@ -336,6 +338,15 @@ void ShellContentBrowserClient::OpenURL(
gfx::Size())->web_contents());
}
+int ShellContentBrowserClient::GetDefaultEnabledBindingsForView(
+ RenderViewHost* view) {
+ if (view->GetProcess()->IsForGuestsOnly())
+ return 0;
+ // Allow Mojo EDK usage by default on non-guest frames.
+ return BINDINGS_POLICY_MOJO;
+}
+
+
Charlie Reis 2016/01/15 01:26:51 nit: Remove extra line.
#if defined(OS_ANDROID)
void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
const base::CommandLine& command_line,

Powered by Google App Engine
This is Rietveld 408576698