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

Unified Diff: mojo/public/cpp/system/main.h

Issue 441853002: mojo: first take on removing mojo_main_{chromium,standalone}. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gn 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
« no previous file with comments | « mojo/public/cpp/system/core.h ('k') | mojo/services/html_viewer/html_viewer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/system/main.h
diff --git a/mojo/public/cpp/system/main.h b/mojo/public/cpp/system/main.h
new file mode 100644
index 0000000000000000000000000000000000000000..8f8d95f24b1083c4139bc1a95d436635e5db5d0d
--- /dev/null
+++ b/mojo/public/cpp/system/main.h
@@ -0,0 +1,34 @@
+// Copyright 2014 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 MOJO_PUBLIC_CPP_SYSTEM_MAIN_H_
+#define MOJO_PUBLIC_CPP_SYSTEM_MAIN_H_
+
+#include "mojo/public/cpp/system/core.h"
+
+#if defined(WIN32)
viettrungluu 2014/08/19 22:30:57 I think I'd write this as #if defined(WIN32) exte
tim (not reviewing) 2014/08/20 18:02:06 Thanks for the explanation. I removed the extra ex
+#if !defined(CDECL)
+#define CDECL __cdecl
+#endif
+#define MOJO_MAIN_EXPORT __declspec(dllexport)
+#else
+#define CDECL
+#define MOJO_MAIN_EXPORT __attribute__((visibility("default")))
+#endif
+
+// DSOs should implement MojoMain directly. Note that the fancy decorations
viettrungluu 2014/08/19 22:30:57 You shouldn't mention "DSOs", since the fact that
tim (not reviewing) 2014/08/20 18:02:06 Noted. Done.
+// are not required in the definition, so you should write
+//
+// MojoResult MojoMain(MojoHandle shell_handle) {
+// ...
+// }
+//
+// See public/cpp/application/application_runner* for recommended way of
viettrungluu 2014/08/19 22:30:57 I think you can omit this comment. cpp/system does
tim (not reviewing) 2014/08/20 18:02:06 OK, done.
+// launching an ApplicationImpl.
+// TODO(davemoore): Establish this as part of our SDK for third party mojo
+// application writers.
+extern "C" MOJO_MAIN_EXPORT MojoResult CDECL MojoMain(
+ MojoHandle service_provider_handle);
+
+#endif // MOJO_PUBLIC_CPP_SYSTEM_MAIN_H_
« no previous file with comments | « mojo/public/cpp/system/core.h ('k') | mojo/services/html_viewer/html_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698