Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MOJO_PUBLIC_CPP_SYSTEM_MAIN_H_ | |
| 6 #define MOJO_PUBLIC_CPP_SYSTEM_MAIN_H_ | |
| 7 | |
| 8 #include "mojo/public/cpp/system/core.h" | |
| 9 | |
| 10 #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
| |
| 11 #if !defined(CDECL) | |
| 12 #define CDECL __cdecl | |
| 13 #endif | |
| 14 #define MOJO_MAIN_EXPORT __declspec(dllexport) | |
| 15 #else | |
| 16 #define CDECL | |
| 17 #define MOJO_MAIN_EXPORT __attribute__((visibility("default"))) | |
| 18 #endif | |
| 19 | |
| 20 // 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.
| |
| 21 // are not required in the definition, so you should write | |
| 22 // | |
| 23 // MojoResult MojoMain(MojoHandle shell_handle) { | |
| 24 // ... | |
| 25 // } | |
| 26 // | |
| 27 // 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.
| |
| 28 // launching an ApplicationImpl. | |
| 29 // TODO(davemoore): Establish this as part of our SDK for third party mojo | |
| 30 // application writers. | |
| 31 extern "C" MOJO_MAIN_EXPORT MojoResult CDECL MojoMain( | |
| 32 MojoHandle service_provider_handle); | |
| 33 | |
| 34 #endif // MOJO_PUBLIC_CPP_SYSTEM_MAIN_H_ | |
| OLD | NEW |