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

Unified Diff: content/public/browser/web_contents_user_data.h

Issue 13928035: WIP Component build of autofill Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make windows compiling Created 7 years, 8 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 | « components/webdata/common/web_data_service_consumer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/web_contents_user_data.h
diff --git a/content/public/browser/web_contents_user_data.h b/content/public/browser/web_contents_user_data.h
index e737ff30edb0e36df3f207aa1692f6acac08d178..5312884dba4bc401e82ca1d306363ec5bd78233a 100644
--- a/content/public/browser/web_contents_user_data.h
+++ b/content/public/browser/web_contents_user_data.h
@@ -9,6 +9,12 @@
#include "base/supports_user_data.h"
#include "content/public/browser/web_contents.h"
+#if defined(COMPONENT_BUILD) && defined(WIN32) && defined(EXPORT_WEB_CONTENT_USER_DATA)
+#define EXPORT_DECL __declspec(dllexport)
+#else
+#define EXPORT_DECL
+#endif
+
namespace content {
// A base class for classes attached to, and scoped to, the lifetime of a
@@ -28,7 +34,7 @@ namespace content {
// DEFINE_WEB_CONTENTS_USER_DATA_KEY(FooTabHelper);
//
template <typename T>
-class WebContentsUserData : public base::SupportsUserData::Data {
+class EXPORT_DECL WebContentsUserData : public base::SupportsUserData::Data {
public:
// Creates an object of type T, and attaches it to the specified WebContents.
// If an instance is already attached, does nothing.
@@ -68,10 +74,13 @@ class WebContentsUserData : public base::SupportsUserData::Data {
// a declaration. Without it, this would be merely a declaration of a template
// specialization. (C++98: 14.7.3.15; C++11: 14.7.3.13)
//
kaiwang 2013/04/18 22:14:36 Please ignore the change below. It's not necessary
-#define DEFINE_WEB_CONTENTS_USER_DATA_KEY(TYPE) \
-template<> \
+#define DEFINE_EXPORTED_WEB_CONTENTS_USER_DATA_KEY(TYPE, EXPORT_DECLARATION) \
+template<> EXPORT_DECLARATION \
int content::WebContentsUserData<TYPE>::kLocatorKey = 0
+#define DEFINE_WEB_CONTENTS_USER_DATA_KEY(TYPE) \
+DEFINE_EXPORTED_WEB_CONTENTS_USER_DATA_KEY(TYPE, )
+
} // namespace content
#endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_USER_DATA_H_
« no previous file with comments | « components/webdata/common/web_data_service_consumer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698