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

Unified Diff: ios/web_view/public/cwv_export.h

Issue 2770633002: Export all CWV* symbols from the ios/web_view dynamic library. (Closed)
Patch Set: Apply review comments. Created 3 years, 9 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 | « ios/web_view/public/cwv_delegate.h ('k') | ios/web_view/public/cwv_html_element.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web_view/public/cwv_export.h
diff --git a/ios/web_view/public/cwv_export.h b/ios/web_view/public/cwv_export.h
new file mode 100644
index 0000000000000000000000000000000000000000..765ab4ec0034f50ab852845f0f313ed3b01cd65c
--- /dev/null
+++ b/ios/web_view/public/cwv_export.h
@@ -0,0 +1,24 @@
+// Copyright 2017 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 IOS_WEB_VIEW_PUBLIC_CWV_EXPORT_H_
+#define IOS_WEB_VIEW_PUBLIC_CWV_EXPORT_H_
+
+// All public classes in //ios/web_view must be prefixed with CWV_EXPORT, so
+// that clients of //ios/web_view dynamic library can link them.
+//
+// This is because a dynamic library only exports symbols marked
+// __attribute__((visibility("default"))).
+//
+// Here I define a macro CWV_EXPORT instead of directly using __attribute__.
michaeldo 2017/03/23 15:12:42 Remove "Here I". I can't find the reference, but w
Hiroshi Ichikawa 2017/03/24 06:34:20 Done.
+// This makes it possible to export symbols only when *building* the dynamic
+// library (by checking CWV_IMPLEMENTATION), not when *using* the dynamic
+// library.
+#if defined(CWV_IMPLEMENTATION)
+#define CWV_EXPORT __attribute__((visibility("default")))
+#else
+#define CWV_EXPORT
+#endif
+
+#endif // IOS_WEB_VIEW_PUBLIC_CWV_EXPORT_H_
« no previous file with comments | « ios/web_view/public/cwv_delegate.h ('k') | ios/web_view/public/cwv_html_element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698