Index: components/nacl/common/nacl_delegate.h |
diff --git a/components/nacl/common/nacl_delegate.h b/components/nacl/common/nacl_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0f4386162c9e30d381f398a73e08276bb989d914 |
--- /dev/null |
+++ b/components/nacl/common/nacl_delegate.h |
@@ -0,0 +1,53 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_NACL_COMMON_NACL_DELEGATE_H_ |
+#define COMPONENTS_NACL_COMMON_NACL_DELEGATE_H_ |
+ |
+#include "build/build_config.h" |
+ |
+namespace base { |
+class FilePath; |
+} |
+ |
+// This class encapsulates all the dependencies that nacl has on chrome |
+class NaClDelegate { |
+ public: |
+ enum NaClSwitch { |
+ kDisableBreakpad, |
+ kDisableLogging, |
+ kEnableDCHECK, |
+ kEnableLogging, |
+ kFullMemoryCrashReport, |
+ kLoggingLevel, |
+ kMemoryProfiling, |
+ kNaClBrokerProcess, |
+ kNaClLoaderProcess, |
+ kNoErrorDialogs, |
+ kNoSandbox, |
+ kProcessType, |
+ kSilentDumpOnDCHECK, |
+ kTestNaClSandbox, |
+#if defined(OS_MACOSX) |
+ kEnableSandboxLogging, |
+#endif |
+ }; |
jam
2013/06/14 23:18:53
this is very hacky, please find a clean way of doi
|
+ |
+ enum NaClFilePath { |
+ kFileNaClHelper, |
+ kFileNaClHelperBootstrap, |
+ }; |
+ |
+ NaClDelegate() {} |
+ ~NaClDelegate() {} |
+ const char* GetSwitch(NaClSwitch switch_name); |
+ |
+#if defined(OS_POSIX) && !defined(OS_MACOSX) |
+ bool GetFilePath(NaClFilePath path, base::FilePath* file_path); |
+#endif |
+}; |
+ |
+extern NaClDelegate* GetNaClDelegate(); |
+ |
+#endif // COMPONENTS_NACL_COMMON_NACL_DELEGATE_H_ |