Fix visibility for CDM API types and functions.

This change does three different things:

1. Renames CDM_EXPORT macro to CDM_API.
   While not strictly necessary, _EXPORT macros in Chrome
   are used for controlling visibility in the components builds.
   See https://chromium.googlesource.com/chromium/src/+/b387864d3341fca140a7bb837e959834d35b0591
   for more details.

2. On POSIX, CDM_API will set visibility("default") for both
   the exporter and importer code. Otherwise, the linker is free to make
   optimizations which will break the code, see
   https://bugs.chromium.org/p/chromium/issues/detail?id=609564#c36

3. Mark interface classes with CDM_API to avoid being hit by devirtualization,
   see https://bugs.chromium.org/p/chromium/issues/detail?id=609564#c35
   and other comments in that bug.

This CL should fix UBSan Vptr buildbot, which has become recently more rigorous
(after a roll of the new Clang).

BUG=609564,609175
R=pcc@chromium.org, xhwang@chromium.org

Review URL: https://codereview.chromium.org/1956123002 .
1 file changed
tree: 032dce79937cf2f14ad06db0d2664d46b2c09a07
  1. codereview.settings
  2. content_decryption_module.h
  3. OWNERS
  4. README