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

Unified Diff: public/platform/WebCommon.h

Issue 16024011: Construct a minimal blink library in-place (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix mac again Created 7 years, 6 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 | « public/platform/WebCString.h ('k') | public/platform/WebFilterOperation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebCommon.h
diff --git a/public/platform/WebCommon.h b/public/platform/WebCommon.h
index 0140077b53c884e451f8940b6f999126abb36ede..a14363d9c30f46fdfec701589d373485eba0c404 100644
--- a/public/platform/WebCommon.h
+++ b/public/platform/WebCommon.h
@@ -31,30 +31,43 @@
#ifndef WebCommon_h
#define WebCommon_h
-// -----------------------------------------------------------------------------
-// Default configuration
-
#if !defined(WEBKIT_IMPLEMENTATION)
- #define WEBKIT_IMPLEMENTATION 0
+#define WEBKIT_IMPLEMENTATION 0
#endif
-// -----------------------------------------------------------------------------
-// Exported symbols need to be annotated with WEBKIT_EXPORT
-
#if defined(WEBKIT_DLL)
- #if defined(WIN32)
- #if WEBKIT_IMPLEMENTATION
- #define WEBKIT_EXPORT __declspec(dllexport)
- #else
- #define WEBKIT_EXPORT __declspec(dllimport)
- #endif
- #else
- #define WEBKIT_EXPORT __attribute__((visibility("default")))
- #endif
-#else
- #define WEBKIT_EXPORT
+#if defined(WIN32)
+#if WEBKIT_IMPLEMENTATION
+#define WEBKIT_EXPORT __declspec(dllexport)
+#else // WEBKIT_IMPLEMENTATION
+#define WEBKIT_EXPORT __declspec(dllimport)
+#endif
+#else // defined(WIN32)
+#define WEBKIT_EXPORT __attribute__((visibility("default")))
+#endif
+#else // defined(WEBKIT_DLL)
+#define WEBKIT_EXPORT
#endif
+#if !defined(BLINK_COMMON_IMPLEMENTATION)
+#define BLINK_COMMON_IMPLEMENTATION 0
+#endif
+
+#if defined(COMPONENT_BUILD)
+#if defined(WIN32)
+#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_COMMON_EXPORT __attribute__((visibility("default")))
+#endif
+#else // defined(COMPONENT_BUILD)
+#define BLINK_COMMON_EXPORT
+#endif
+
+
// -----------------------------------------------------------------------------
// Basic types
@@ -83,11 +96,11 @@ typedef unsigned char WebLChar;
// -----------------------------------------------------------------------------
// Assertions
-WEBKIT_EXPORT void failedAssertion(const char* file, int line, const char* function, const char* assertion);
+BLINK_COMMON_EXPORT void failedAssertion(const char* file, int line, const char* function, const char* assertion);
} // namespace WebKit
-// Ideally, only use inside the public directory but outside of WEBKIT_IMPLEMENTATION blocks. (Otherwise use WTF's ASSERT.)
+// Ideally, only use inside the public directory but outside of INSIDE_WEBKIT blocks. (Otherwise use WTF's ASSERT.)
#if defined(NDEBUG)
#define WEBKIT_ASSERT(assertion) ((void)0)
#else
« no previous file with comments | « public/platform/WebCString.h ('k') | public/platform/WebFilterOperation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698