diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-12 21:06:00 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-12 21:06:00 +0000 |
commit | ceee766d4e91209be4e81c84106c88b4bf812fec (patch) | |
tree | 909a9483db1cd58d141f48733f401942eb67216c | |
parent | f242fe73b6dda508ce3a5a2d730a759afca0b1fd (diff) | |
download | chromium_src-ceee766d4e91209be4e81c84106c88b4bf812fec.zip chromium_src-ceee766d4e91209be4e81c84106c88b4bf812fec.tar.gz chromium_src-ceee766d4e91209be4e81c84106c88b4bf812fec.tar.bz2 |
Chrome\Common: Define the common api for building chrome\common as a dll.
COMMON_API is the public interface for the module.
COMMON_TEST is intended to be used for symbols that have to be
exported only in order to test them.
BUG=82326
Review URL: http://codereview.chromium.org/7011007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85184 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/chrome_common.gypi | 1 | ||||
-rw-r--r-- | chrome/common/common_api.h | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi index e01028c..2ff892a 100644 --- a/chrome/chrome_common.gypi +++ b/chrome/chrome_common.gypi @@ -146,6 +146,7 @@ 'common/chrome_content_plugin_client.h', 'common/cloud_print/cloud_print_proxy_info.cc', 'common/cloud_print/cloud_print_proxy_info.h', + 'common/common_api.h', 'common/common_glue.cc', 'common/common_message_generator.cc', 'common/common_message_generator.h', diff --git a/chrome/common/common_api.h b/chrome/common/common_api.h new file mode 100644 index 0000000..4d70ca7 --- /dev/null +++ b/chrome/common/common_api.h @@ -0,0 +1,26 @@ +// Copyright (c) 2011 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 CHROME_COMMON_COMMON_API_H_ +#define CHROME_COMMON_COMMON_API_H_ +#pragma once + +// Defines COMMON_API so that funtionality implemented by the common module can +// be exported to consumers, and COMMON_TEST that allows unit tests to access +// features not intended to be used directly by real consumers. + +#if defined(WIN32) && defined(COMMON_DLL) +#if defined(COMMON_IMPLEMENTATION) +#define COMMON_API __declspec(dllexport) +#define COMMON_TEST __declspec(dllexport) +#else +#define COMMON_API __declspec(dllimport) +#define COMMON_TEST __declspec(dllimport) +#endif // defined(COMMON_IMPLEMENTATION) +#else +#define COMMON_API +#define COMMON_TEST +#endif + +#endif // CHROME_COMMON_COMMON_API_H_ |