Index: services/shell/public/c/main.h |
diff --git a/services/shell/public/c/main.h b/services/shell/public/c/main.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bae2fdc7a6da2a956a08726d6f5b7dce96ceb5fe |
--- /dev/null |
+++ b/services/shell/public/c/main.h |
@@ -0,0 +1,33 @@ |
+// Copyright 2016 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 SERVICES_SHELL_PUBLIC_C_MAIN_H_ |
+#define SERVICES_SHELL_PUBLIC_C_MAIN_H_ |
+ |
+#include "mojo/public/c/system/types.h" |
+ |
+// Implement ServiceMain directly as the entry point for a service. |
+// |
+// MojoResult ServiceMain(MojoHandle service_request) { |
+// ... |
+// } |
+// |
+ |
+#if defined(__cplusplus) |
+extern "C" { |
+#endif |
+ |
+#if defined(WIN32) |
+__declspec(dllexport) MojoResult |
+ __cdecl ServiceMain(MojoHandle application_request); |
+#else // !defined(WIN32) |
+__attribute__((visibility("default"))) MojoResult |
+ ServiceMain(MojoHandle service_provider_handle); |
+#endif // defined(WIN32) |
+ |
+#ifdef __cplusplus |
+} // extern "C" |
+#endif |
+ |
+#endif // SERVICES_SHELL_PUBLIC_C_MAIN_H_ |