OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 IOS_WEB_VIEW_PUBLIC_CWV_EXPORT_H_ |
| 6 #define IOS_WEB_VIEW_PUBLIC_CWV_EXPORT_H_ |
| 7 |
| 8 // All public classes in //ios/web_view must be prefixed with CWV_EXPORT, so |
| 9 // that clients of //ios/web_view dynamic library can link them. |
| 10 // |
| 11 // This is because a dynamic library only exports symbols marked |
| 12 // __attribute__((visibility("default"))). |
| 13 // |
| 14 // Define a macro CWV_EXPORT instead of directly using __attribute__. |
| 15 // This makes it possible to export symbols only when *building* the dynamic |
| 16 // library (by checking CWV_IMPLEMENTATION), not when *using* the dynamic |
| 17 // library. |
| 18 #if defined(CWV_IMPLEMENTATION) |
| 19 #define CWV_EXPORT __attribute__((visibility("default"))) |
| 20 #else |
| 21 #define CWV_EXPORT |
| 22 #endif |
| 23 |
| 24 #endif // IOS_WEB_VIEW_PUBLIC_CWV_EXPORT_H_ |
OLD | NEW |