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

Unified Diff: extensions/shell/app/shell_main_delegate.cc

Issue 437503004: Add NaCl support to app_shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (nacl-init) rebase Created 6 years, 4 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
Index: extensions/shell/app/shell_main_delegate.cc
diff --git a/extensions/shell/app/shell_main_delegate.cc b/extensions/shell/app/shell_main_delegate.cc
index c49319edf55d5f6f9eba9dddff05caf32e5987c6..1fae2d746e4f5ffab9a3dac5581767c81c5fb66f 100644
--- a/extensions/shell/app/shell_main_delegate.cc
+++ b/extensions/shell/app/shell_main_delegate.cc
@@ -22,6 +22,12 @@
#include "chromeos/chromeos_paths.h"
#endif
+#if !defined(DISABLE_NACL)
+#include "components/nacl/common/nacl_paths.h"
+#include "components/nacl/common/nacl_switches.h"
+#include "components/nacl/zygote/nacl_fork_delegate_linux.h"
+#endif
+
namespace {
void InitLogging() {
@@ -54,6 +60,9 @@ bool ShellMainDelegate::BasicStartupComplete(int* exit_code) {
#if defined(OS_CHROMEOS)
chromeos::RegisterPathProvider();
#endif
+#if !defined(DISABLE_NACL)
+ nacl::RegisterPathProvider();
+#endif
extensions::RegisterPathProvider();
return false;
}
@@ -83,6 +92,13 @@ ShellMainDelegate::CreateContentRendererClient() {
return renderer_client_.get();
}
+void ShellMainDelegate::ZygoteStarting(
+ ScopedVector<content::ZygoteForkDelegate>* delegates) {
+#if !defined(DISABLE_NACL)
+ nacl::AddNaClZygoteForkDelegates(delegates);
+#endif
+}
+
scoped_ptr<ShellRendererMainDelegate>
ShellMainDelegate::CreateShellRendererMainDelegate() {
return scoped_ptr<ShellRendererMainDelegate>();
@@ -104,6 +120,9 @@ bool ShellMainDelegate::ProcessNeedsResourceBundle(
return process_type.empty() ||
process_type == switches::kZygoteProcess ||
process_type == switches::kRendererProcess ||
+#if !defined(DISABLE_NACL)
+ process_type == switches::kNaClLoaderProcess ||
+#endif
process_type == switches::kUtilityProcess;
}

Powered by Google App Engine
This is Rietveld 408576698