| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MOJO_PUBLIC_C_SYSTEM_MAIN_H_ | 5 #ifndef MOJO_PUBLIC_C_SYSTEM_MAIN_H_ |
| 6 #define MOJO_PUBLIC_C_SYSTEM_MAIN_H_ | 6 #define MOJO_PUBLIC_C_SYSTEM_MAIN_H_ |
| 7 | 7 |
| 8 #include "mojo/public/c/system/handle.h" | 8 #include "mojo/public/c/system/handle.h" |
| 9 #include "mojo/public/c/system/macros.h" |
| 9 #include "mojo/public/c/system/result.h" | 10 #include "mojo/public/c/system/result.h" |
| 10 | 11 |
| 11 // Implement MojoMain directly as the entry point for an application. | 12 // Implement MojoMain directly as the entry point for an application. |
| 12 // | 13 // |
| 13 // MojoResult MojoMain(MojoHandle application_request) { | 14 // MojoResult MojoMain(MojoHandle application_request) { |
| 14 // ... | 15 // ... |
| 15 // } | 16 // } |
| 16 | 17 |
| 17 #if defined(__cplusplus) | 18 MOJO_BEGIN_EXTERN_C |
| 18 extern "C" { | |
| 19 #endif | |
| 20 | 19 |
| 21 __attribute__((visibility("default"))) MojoResult MojoMain( | 20 __attribute__((visibility("default"))) MojoResult MojoMain( |
| 22 MojoHandle application_request); | 21 MojoHandle application_request); |
| 23 | 22 |
| 24 #ifdef __cplusplus | 23 MOJO_END_EXTERN_C |
| 25 } // extern "C" | |
| 26 #endif | |
| 27 | 24 |
| 28 #endif // MOJO_PUBLIC_C_SYSTEM_MAIN_H_ | 25 #endif // MOJO_PUBLIC_C_SYSTEM_MAIN_H_ |
| OLD | NEW |