diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-22 00:54:37 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-22 00:54:37 +0000 |
commit | 1a5b4b0a81d4a49c8cd252e670efd5a8aff07115 (patch) | |
tree | 25dd74f55686803859595ddd26464983d9d71b22 /ui | |
parent | 44888852d232a2f900311322f4cc8c93d32df826 (diff) | |
download | chromium_src-1a5b4b0a81d4a49c8cd252e670efd5a8aff07115.zip chromium_src-1a5b4b0a81d4a49c8cd252e670efd5a8aff07115.tar.gz chromium_src-1a5b4b0a81d4a49c8cd252e670efd5a8aff07115.tar.bz2 |
views/examples: Make it possible to build views_examples_with_content_lib target as shared library.
BUG=141187
TBR=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10860058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152702 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/views/examples/examples_window_with_content.h | 7 | ||||
-rw-r--r-- | ui/views/examples/views_examples_export.h | 28 | ||||
-rw-r--r-- | ui/views/views.gyp | 3 |
3 files changed, 35 insertions, 3 deletions
diff --git a/ui/views/examples/examples_window_with_content.h b/ui/views/examples/examples_window_with_content.h index c13f420..371c64d 100644 --- a/ui/views/examples/examples_window_with_content.h +++ b/ui/views/examples/examples_window_with_content.h @@ -5,6 +5,8 @@ #ifndef UI_VIEWS_EXAMPLES_EXAMPLES_WINDOW_WITH_CONTENT_H_ #define UI_VIEWS_EXAMPLES_EXAMPLES_WINDOW_WITH_CONTENT_H_ +#include "ui/views/examples/views_examples_export.h" + namespace content { class BrowserContext; } @@ -18,8 +20,9 @@ enum Operation { }; // Shows a window with the views examples in it. -void ShowExamplesWindow(Operation operation, - content::BrowserContext* browser_context); +VIEWS_EXAMPLES_EXPORT void ShowExamplesWindow( + Operation operation, + content::BrowserContext* browser_context); } // namespace examples } // namespace views diff --git a/ui/views/examples/views_examples_export.h b/ui/views/examples/views_examples_export.h new file mode 100644 index 0000000..4e90f75 --- /dev/null +++ b/ui/views/examples/views_examples_export.h @@ -0,0 +1,28 @@ +#ifndef UI_VIEWS_EXAMPLES_VIEWS_EXAMPLES_EXPORT_H_ +#define UI_VIEWS_EXAMPLES_VIEWS_EXAMPLES_EXPORT_H_ + +// Defines VIEWS_EXAMPLES_EXPORT so that functionality implemented by the +// views_examples_with_content_lib module can be exported to consumers. + +#if defined(COMPONENT_BUILD) +#if defined(WIN32) + +#if defined(VIEWS_EXAMPLES_IMPLEMENTATION) +#define VIEWS_EXAMPLES_EXPORT __declspec(dllexport) +#else +#define VIEWS_EXAMPLES_EXPORT __declspec(dllimport) +#endif // defined(VIEWS_EXAMPLES_IMPLEMENTATION) + +#else // defined(WIN32) +#if defined(VIEWS_EXAMPLES_IMPLEMENTATION) +#define VIEWS_EXAMPLES_EXPORT __attribute__((visibility("default"))) +#else +#define VIEWS_EXAMPLES_EXPORT +#endif +#endif + +#else // defined(COMPONENT_BUILD) +#define VIEWS_EXAMPLES_EXPORT +#endif + +#endif // UI_VIEWS_EXAMPLES_VIEWS_EXAMPLES_EXPORT_H_ diff --git a/ui/views/views.gyp b/ui/views/views.gyp index 6c4d35d..ed24c14 100644 --- a/ui/views/views.gyp +++ b/ui/views/views.gyp @@ -599,7 +599,7 @@ }, # target_name: views_unittests { 'target_name': 'views_examples_with_content_lib', - 'type': 'static_library', + 'type': '<(component)', 'dependencies': [ '../../base/base.gyp:base', '../../base/base.gyp:base_i18n', @@ -666,6 +666,7 @@ 'examples/throbber_example.h', 'examples/tree_view_example.cc', 'examples/tree_view_example.h', + 'examples/views_examples_export.h', 'examples/webview_example.cc', 'examples/webview_example.h', 'examples/widget_example.cc', |