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

Unified Diff: sky/engine/public/platform/WebCommon.h

Issue 719063002: Revert "Remove support for MSVC" (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
Index: sky/engine/public/platform/WebCommon.h
diff --git a/sky/engine/public/platform/WebCommon.h b/sky/engine/public/platform/WebCommon.h
index 501f1d6cb77489cc165785c1cb3f87d018ddb2c0..9967267124fbc07fcac56c3c567b1ecb35c06b84 100644
--- a/sky/engine/public/platform/WebCommon.h
+++ b/sky/engine/public/platform/WebCommon.h
@@ -44,9 +44,27 @@
#endif
#if defined(COMPONENT_BUILD)
- #define BLINK_EXPORT __attribute__((visibility("default")))
- #define BLINK_PLATFORM_EXPORT __attribute__((visibility("default")))
- #define BLINK_COMMON_EXPORT __attribute__((visibility("default")))
+ #if defined(WIN32)
+ #if BLINK_IMPLEMENTATION
+ #define BLINK_EXPORT __declspec(dllexport)
+ #else // BLINK_IMPLEMENTATION
+ #define BLINK_EXPORT __declspec(dllimport)
+ #endif
+ #if BLINK_PLATFORM_IMPLEMENTATION
+ #define BLINK_PLATFORM_EXPORT __declspec(dllexport)
+ #else // BLINK_PLATFORM_IMPLEMENTATION
+ #define BLINK_PLATFORM_EXPORT __declspec(dllimport)
+ #endif
+ #if BLINK_COMMON_IMPLEMENTATION
+ #define BLINK_COMMON_EXPORT __declspec(dllexport)
+ #else // BLINK_COMMON_IMPLEMENTATION
+ #define BLINK_COMMON_EXPORT __declspec(dllimport)
+ #endif
+ #else // defined(WIN32)
+ #define BLINK_EXPORT __attribute__((visibility("default")))
+ #define BLINK_PLATFORM_EXPORT __attribute__((visibility("default")))
+ #define BLINK_COMMON_EXPORT __attribute__((visibility("default")))
+ #endif
#else // defined(COMPONENT_BUILD)
#define BLINK_EXPORT
#define BLINK_PLATFORM_EXPORT
@@ -58,7 +76,17 @@
// Basic types
#include <stddef.h> // For size_t
+
+#if defined(WIN32)
+// Visual Studio doesn't have stdint.h.
+typedef short int16_t;
+typedef unsigned short uint16_t;
+typedef int int32_t;
+typedef unsigned int uint32_t;
+typedef unsigned __int64 uint64_t;
+#else
#include <stdint.h> // For int32_t
+#endif
namespace blink {
@@ -66,7 +94,11 @@ namespace blink {
typedef int32_t WebUChar32;
// UTF-16 character type
+#if defined(WIN32)
+typedef wchar_t WebUChar;
+#else
typedef unsigned short WebUChar;
+#endif
// Latin-1 character type
typedef unsigned char WebLChar;

Powered by Google App Engine
This is Rietveld 408576698