diff options
author | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-13 22:11:57 +0000 |
---|---|---|
committer | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-13 22:11:57 +0000 |
commit | 8d128d6b9ef0096c874fafb9f80cbb5a03c98f4c (patch) | |
tree | 6d15da0c38831ea9180d3d90caa66d5adc7cb000 /content/common | |
parent | 8ea5d4bd1f750572bec6b6b73732bba147f0be42 (diff) | |
download | chromium_src-8d128d6b9ef0096c874fafb9f80cbb5a03c98f4c.zip chromium_src-8d128d6b9ef0096c874fafb9f80cbb5a03c98f4c.tar.gz chromium_src-8d128d6b9ef0096c874fafb9f80cbb5a03c98f4c.tar.bz2 |
Annotate all of the functions in content that need to be exported, in preparation for creating a content shared library.
R=darin@chromium.org, jam@chromium.org, willchan@chromium.org
BUG=90442
TEST=everything still compiles
Review URL: http://codereview.chromium.org/7800015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100975 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
37 files changed, 205 insertions, 136 deletions
diff --git a/content/common/child_process.h b/content/common/child_process.h index e3786ae..53b77a5 100644 --- a/content/common/child_process.h +++ b/content/common/child_process.h @@ -10,12 +10,13 @@ #include "base/memory/scoped_ptr.h" #include "base/threading/thread.h" #include "base/synchronization/waitable_event.h" +#include "content/common/content_export.h" class ChildThread; // Base class for child processes of the browser process (i.e. renderer and // plugin host). This is a singleton object for each child process. -class ChildProcess { +class CONTENT_EXPORT ChildProcess { public: // Child processes should have an object that derives from this class. // Normally you would immediately call set_main_thread after construction. diff --git a/content/common/child_process_host.h b/content/common/child_process_host.h index 20708c2..5ffb8d9 100644 --- a/content/common/child_process_host.h +++ b/content/common/child_process_host.h @@ -17,6 +17,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +#include "content/common/content_export.h" #include "content/common/content_notification_types.h" #include "ipc/ipc_channel_proxy.h" @@ -30,8 +31,8 @@ class Message; // Provides common functionality for hosting a child process and processing IPC // messages between the host and the child process. Subclasses are responsible // for the actual launching and terminating of the child processes. -class ChildProcessHost : public IPC::Channel::Listener, - public IPC::Message::Sender { +class CONTENT_EXPORT ChildProcessHost : public IPC::Channel::Listener, + public IPC::Message::Sender { public: // These flags may be passed to GetChildPath in order to alter its behavior, diff --git a/content/common/child_process_info.h b/content/common/child_process_info.h index a0c8c27..a0f6e10 100644 --- a/content/common/child_process_info.h +++ b/content/common/child_process_info.h @@ -10,9 +10,10 @@ #include "base/process.h" #include "base/string16.h" +#include "content/common/content_export.h" // Holds information about a child process. -class ChildProcessInfo { +class CONTENT_EXPORT ChildProcessInfo { public: // NOTE: Do not remove or reorder the elements in this enum, and only add new // items at the end. We depend on these specific values in a histogram. diff --git a/content/common/child_process_messages.h b/content/common/child_process_messages.h index b48275d..a503423 100644 --- a/content/common/child_process_messages.h +++ b/content/common/child_process_messages.h @@ -5,9 +5,13 @@ // Common IPC messages used for child processes. // Multiply-included message file, hence no include guard. +#include "content/common/content_export.h" #include "googleurl/src/gurl.h" #include "ipc/ipc_message_macros.h" +#undef IPC_MESSAGE_EXPORT +#define IPC_MESSAGE_EXPORT CONTENT_EXPORT + #define IPC_MESSAGE_START ChildProcessMsgStart // Messages sent from the browser to the child process. diff --git a/content/common/child_thread.h b/content/common/child_thread.h index e1d34e8..8956ff2 100644 --- a/content/common/child_thread.h +++ b/content/common/child_thread.h @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +#include "content/common/content_export.h" #include "content/common/message_router.h" #include "webkit/glue/resource_loader_bridge.h" @@ -24,8 +25,8 @@ class SyncMessageFilter; } // The main thread of a child process derives from this class. -class ChildThread : public IPC::Channel::Listener, - public IPC::Message::Sender { +class CONTENT_EXPORT ChildThread : public IPC::Channel::Listener, + public IPC::Message::Sender { public: // Creates the thread. ChildThread(); diff --git a/content/common/common_param_traits.h b/content/common/common_param_traits.h index 077d734..916f67b 100644 --- a/content/common/common_param_traits.h +++ b/content/common/common_param_traits.h @@ -16,6 +16,7 @@ #include "base/memory/ref_counted.h" #include "base/platform_file.h" +#include "content/common/content_export.h" #include "content/common/dom_storage_common.h" #include "googleurl/src/gurl.h" #include "ipc/ipc_message_utils.h" @@ -46,7 +47,7 @@ class Range; namespace IPC { template <> -struct ParamTraits<GURL> { +struct CONTENT_EXPORT ParamTraits<GURL> { typedef GURL param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); @@ -62,7 +63,7 @@ struct ParamTraits<ResourceType::Type> { }; template <> -struct ParamTraits<net::URLRequestStatus> { +struct CONTENT_EXPORT ParamTraits<net::URLRequestStatus> { typedef net::URLRequestStatus param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); @@ -70,7 +71,7 @@ struct ParamTraits<net::URLRequestStatus> { }; template <> -struct ParamTraits<scoped_refptr<net::UploadData> > { +struct CONTENT_EXPORT ParamTraits<scoped_refptr<net::UploadData> > { typedef scoped_refptr<net::UploadData> param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); @@ -78,7 +79,7 @@ struct ParamTraits<scoped_refptr<net::UploadData> > { }; template<> -struct ParamTraits<net::HostPortPair> { +struct CONTENT_EXPORT ParamTraits<net::HostPortPair> { typedef net::HostPortPair param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); @@ -110,7 +111,7 @@ struct ParamTraits<base::PlatformFileInfo> { }; template <> -struct ParamTraits<gfx::Point> { +struct CONTENT_EXPORT ParamTraits<gfx::Point> { typedef gfx::Point param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); @@ -118,7 +119,7 @@ struct ParamTraits<gfx::Point> { }; template <> -struct ParamTraits<gfx::Size> { +struct CONTENT_EXPORT ParamTraits<gfx::Size> { typedef gfx::Size param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); @@ -126,7 +127,7 @@ struct ParamTraits<gfx::Size> { }; template <> -struct ParamTraits<gfx::Rect> { +struct CONTENT_EXPORT ParamTraits<gfx::Rect> { typedef gfx::Rect param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); @@ -166,7 +167,7 @@ struct ParamTraits<gfx::NativeWindow> { }; template <> -struct ParamTraits<ui::Range> { +struct CONTENT_EXPORT ParamTraits<ui::Range> { typedef ui::Range param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); @@ -214,7 +215,7 @@ struct ParamTraits<TransportDIB::Id> { #endif template <> -struct ParamTraits<SkBitmap> { +struct CONTENT_EXPORT ParamTraits<SkBitmap> { typedef SkBitmap param_type; static void Write(Message* m, const param_type& p); diff --git a/content/common/content_client.h b/content/common/content_client.h index dc2d7901..9f5521f 100644 --- a/content/common/content_client.h +++ b/content/common/content_client.h @@ -12,6 +12,7 @@ #include "base/basictypes.h" #include "base/string16.h" #include "build/build_config.h" +#include "content/common/content_export.h" class CommandLine; class GURL; @@ -40,11 +41,11 @@ class ContentUtilityClient; // Setter and getter for the client. The client should be set early, before any // content code is called. -void SetContentClient(ContentClient* client); -ContentClient* GetContentClient(); +CONTENT_EXPORT void SetContentClient(ContentClient* client); +CONTENT_EXPORT ContentClient* GetContentClient(); // Interface that the embedder implements. -class ContentClient { +class CONTENT_EXPORT ContentClient { public: ContentClient(); virtual ~ContentClient(); diff --git a/content/common/content_constants.h b/content/common/content_constants.h index ad900d0..dd3a9d4 100644 --- a/content/common/content_constants.h +++ b/content/common/content_constants.h @@ -10,6 +10,8 @@ #include <stddef.h> // For size_t +#include "content/common/content_export.h" + namespace content { extern const unsigned int kMaxRendererProcessCount; @@ -28,12 +30,12 @@ extern const size_t kMaxTitleChars; // a data: URI may be legitimately massive, but the full URI would kill all // known operating systems if you dropped it into a UI control. extern const size_t kMaxURLChars; -extern const size_t kMaxURLDisplayChars; +CONTENT_EXPORT extern const size_t kMaxURLDisplayChars; // The render view and render process id associated with the default plugin // instance. -extern const char kDefaultPluginRenderViewId[]; -extern const char kDefaultPluginRenderProcessId[]; +CONTENT_EXPORT extern const char kDefaultPluginRenderViewId[]; +CONTENT_EXPORT extern const char kDefaultPluginRenderProcessId[]; extern const char kStatsFilename[]; extern const int kStatsMaxThreads; diff --git a/content/common/content_counters.h b/content/common/content_counters.h index 16dc638..11ccee3 100644 --- a/content/common/content_counters.h +++ b/content/common/content_counters.h @@ -8,6 +8,8 @@ #define CONTENT_COMMON_CONTENT_COUNTERS_H_ #pragma once +#include "content/common/content_export.h" + namespace base { class StatsCounter; class StatsCounterTimer; @@ -19,7 +21,7 @@ namespace content { class Counters { public: // The amount of time spent in chrome initialization. - static base::StatsCounterTimer& chrome_main(); + CONTENT_EXPORT static base::StatsCounterTimer& chrome_main(); // The amount of time spent in renderer initialization. static base::StatsCounterTimer& renderer_main(); diff --git a/content/common/content_export.h b/content/common/content_export.h index dd76009..fc91b72c 100644 --- a/content/common/content_export.h +++ b/content/common/content_export.h @@ -6,8 +6,7 @@ #define CONTENT_COMMON_CONTENT_EXPORT_H_ #pragma once -// TODO(dpranke): Uncomment to enable component build of content. -#if 0 // defined(COMPONENT_BUILD) +#if 0 // TODO(dpranke): Uncomment: defined(COMPONENT_BUILD). #if defined(WIN32) #if defined(CONTENT_IMPLEMENTATION) diff --git a/content/common/content_paths.h b/content/common/content_paths.h index cdf07a7..b2f4cce 100644 --- a/content/common/content_paths.h +++ b/content/common/content_paths.h @@ -6,6 +6,8 @@ #define CONTENT_COMMON_CONTENT_PATHS_H_ #pragma once +#include "content/common/content_export.h" + // This file declares path keys for the content module. These can be used with // the PathService to access various special directories and files. @@ -24,7 +26,7 @@ enum { }; // Call once to register the provider for the path keys defined above. -void RegisterPathProvider(); +CONTENT_EXPORT void RegisterPathProvider(); } // namespace content diff --git a/content/common/content_switches.h b/content/common/content_switches.h index 478b9b8..eef89e0 100644 --- a/content/common/content_switches.h +++ b/content/common/content_switches.h @@ -9,48 +9,49 @@ #pragma once #include "build/build_config.h" +#include "content/common/content_export.h" namespace switches { -extern const char kAllowFileAccessFromFiles[]; -extern const char kAllowRunningInsecureContent[]; +CONTENT_EXPORT extern const char kAllowFileAccessFromFiles[]; +CONTENT_EXPORT extern const char kAllowRunningInsecureContent[]; extern const char kAllowSandboxDebugging[]; extern const char kBrowserAssertTest[]; extern const char kBrowserCrashTest[]; extern const char kBrowserSubprocessPath[]; // TODO(jam): this doesn't belong in content. -extern const char kChromeFrame[]; -extern const char kDisable3DAPIs[]; -extern const char kDisableAccelerated2dCanvas[]; -extern const char kDisableAcceleratedCompositing[]; -extern const char kDisableAcceleratedLayers[]; -extern const char kDisableAcceleratedPlugins[]; -extern const char kDisableAcceleratedVideo[]; -extern const char kDisableAltWinstation[]; -extern const char kDisableApplicationCache[]; +CONTENT_EXPORT extern const char kChromeFrame[]; +CONTENT_EXPORT extern const char kDisable3DAPIs[]; +CONTENT_EXPORT extern const char kDisableAccelerated2dCanvas[]; +CONTENT_EXPORT extern const char kDisableAcceleratedCompositing[]; +CONTENT_EXPORT extern const char kDisableAcceleratedLayers[]; +CONTENT_EXPORT extern const char kDisableAcceleratedPlugins[]; +CONTENT_EXPORT extern const char kDisableAcceleratedVideo[]; +CONTENT_EXPORT extern const char kDisableAltWinstation[]; +CONTENT_EXPORT extern const char kDisableApplicationCache[]; extern const char kDisableAudio[]; extern const char kDisableBackingStoreLimit[]; -extern const char kDisableDatabases[]; +CONTENT_EXPORT extern const char kDisableDatabases[]; extern const char kDisableDataTransferItems[]; extern const char kDisableDesktopNotifications[]; extern const char kDisableDeviceOrientation[]; -extern const char kDisableExperimentalWebGL[]; +CONTENT_EXPORT extern const char kDisableExperimentalWebGL[]; extern const char kDisableFileSystem[]; extern const char kDisableGeolocation[]; -extern const char kDisableGLMultisampling[]; +CONTENT_EXPORT extern const char kDisableGLMultisampling[]; extern const char kDisableGLSLTranslator[]; extern const char kDisableGpuSandbox[]; extern const char kDisableGpuWatchdog[]; -extern const char kDisableHangMonitor[]; +CONTENT_EXPORT extern const char kDisableHangMonitor[]; extern const char kDisableIndexedDatabase[]; -extern const char kDisableJava[]; -extern const char kDisableJavaScript[]; +CONTENT_EXPORT extern const char kDisableJava[]; +CONTENT_EXPORT extern const char kDisableJavaScript[]; extern const char kDisableJavaScriptI18NAPI[]; -extern const char kDisableLocalStorage[]; -extern const char kDisableLogging[]; -extern const char kDisableSmoothScrolling[]; -extern const char kDisablePlugins[]; -extern const char kDisablePopupBlocking[]; +CONTENT_EXPORT extern const char kDisableLocalStorage[]; +CONTENT_EXPORT extern const char kDisableLogging[]; +CONTENT_EXPORT extern const char kDisableSmoothScrolling[]; +CONTENT_EXPORT extern const char kDisablePlugins[]; +CONTENT_EXPORT extern const char kDisablePopupBlocking[]; extern const char kDisableRendererAccessibility[]; extern const char kDisableSSLFalseStart[]; extern const char kDisableSeccompSandbox[]; @@ -58,18 +59,18 @@ extern const char kDisableSessionStorage[]; extern const char kDisableSharedWorkers[]; extern const char kDisableSpeechInput[]; extern const char kDisableSpellcheckAPI[]; -extern const char kDisableWebAudio[]; +CONTENT_EXPORT extern const char kDisableWebAudio[]; extern const char kDisableWebSockets[]; extern const char kEnableAccelerated2dCanvas[]; -extern const char kEnableAcceleratedDrawing[]; +CONTENT_EXPORT extern const char kEnableAcceleratedDrawing[]; extern const char kEnableAccessibility[]; extern const char kEnableAccessibilityLogging[]; -extern const char kEnableBenchmarking[]; -extern const char kEnableDNSCertProvenanceChecking[]; -extern const char kEnableDeviceMotion[]; -extern const char kDisableFullScreen[]; +CONTENT_EXPORT extern const char kEnableBenchmarking[]; +CONTENT_EXPORT extern const char kEnableDNSCertProvenanceChecking[]; +CONTENT_EXPORT extern const char kEnableDeviceMotion[]; +CONTENT_EXPORT extern const char kDisableFullScreen[]; extern const char kEnableGPUPlugin[]; -extern const char kEnableLogging[]; +CONTENT_EXPORT extern const char kEnableLogging[]; extern const char kEnableMediaStream[]; extern const char kEnableMonitorProfile[]; extern const char kEnableOriginBoundCerts[]; @@ -78,80 +79,85 @@ extern const char kEnableSSLCachedInfo[]; extern const char kEnableSandboxLogging[]; extern const char kEnableSeccompSandbox[]; extern const char kEnableStatsTable[]; -extern const char kEnableTcpFastOpen[]; +CONTENT_EXPORT extern const char kEnableStatsTable[]; +CONTENT_EXPORT extern const char kEnableTcpFastOpen[]; extern const char kEnableVideoFullscreen[]; extern const char kEnableVideoLogging[]; -extern const char kEnableWebIntents[]; -extern const char kExperimentalLocationFeatures[]; +CONTENT_EXPORT extern const char kEnableWebIntents[]; +CONTENT_EXPORT extern const char kExperimentalLocationFeatures[]; // TODO(jam): this doesn't belong in content. -extern const char kExtensionProcess[]; +CONTENT_EXPORT extern const char kExtensionProcess[]; extern const char kExtraPluginDir[]; extern const char kForceFieldTestNameAndValue[]; extern const char kForceRendererAccessibility[]; extern const char kGpuLauncher[]; -extern const char kGpuProcess[]; +CONTENT_EXPORT extern const char kGpuProcess[]; extern const char kGpuStartupDialog[]; -extern const char kIgnoreGpuBlacklist[]; +CONTENT_EXPORT extern const char kIgnoreGpuBlacklist[]; extern const char kInProcessGPU[]; extern const char kInProcessPlugins[]; -extern const char kInProcessWebGL[]; +CONTENT_EXPORT extern const char kInProcessWebGL[]; extern const char kJavaScriptFlags[]; extern const char kLoadPlugin[]; -extern const char kLoggingLevel[]; +CONTENT_EXPORT extern const char kLoggingLevel[]; extern const char kLogPluginMessages[]; extern const char kLowLatencyAudio[]; // TODO(jam): this doesn't belong in content. -extern const char kNaClBrokerProcess[]; -extern const char kNaClLoaderProcess[]; -extern const char kNoDisplayingInsecureContent[]; +CONTENT_EXPORT extern const char kNaClBrokerProcess[]; +CONTENT_EXPORT extern const char kNaClLoaderProcess[]; +// TODO(bradchen): remove kNaClLinuxHelper switch. +// This switch enables the experimental lightweight nacl_helper for Linux. +// It will be going away soon, when the helper is enabled permanently. +extern const char kNaClLinuxHelper[]; +CONTENT_EXPORT extern const char kNoDisplayingInsecureContent[]; extern const char kNoJsRandomness[]; -extern const char kNoReferrers[]; -extern const char kNoSandbox[]; -extern const char kPlaybackMode[]; +CONTENT_EXPORT extern const char kNoReferrers[]; +CONTENT_EXPORT extern const char kNoSandbox[]; +CONTENT_EXPORT extern const char kPlaybackMode[]; extern const char kPluginLauncher[]; -extern const char kPluginPath[]; -extern const char kPluginProcess[]; +CONTENT_EXPORT extern const char kPluginPath[]; +CONTENT_EXPORT extern const char kPluginProcess[]; extern const char kPluginStartupDialog[]; -extern const char kPpapiBrokerProcess[]; -extern const char kPpapiFlashArgs[]; -extern const char kPpapiFlashPath[]; -extern const char kPpapiFlashVersion[]; +CONTENT_EXPORT extern const char kPpapiBrokerProcess[]; +CONTENT_EXPORT extern const char kPpapiFlashArgs[]; +CONTENT_EXPORT extern const char kPpapiFlashPath[]; +CONTENT_EXPORT extern const char kPpapiFlashVersion[]; extern const char kPpapiOutOfProcess[]; extern const char kPpapiPluginLauncher[]; -extern const char kPpapiPluginProcess[]; +CONTENT_EXPORT extern const char kPpapiPluginProcess[]; extern const char kPpapiStartupDialog[]; extern const char kProcessPerSite[]; -extern const char kProcessPerTab[]; -extern const char kProcessType[]; +CONTENT_EXPORT extern const char kProcessPerTab[]; +CONTENT_EXPORT extern const char kProcessType[]; // TODO(jam): this doesn't belong in content. extern const char kProfileImportProcess[]; -extern const char kRecordMode[]; +CONTENT_EXPORT extern const char kRecordMode[]; extern const char kRegisterPepperPlugins[]; -extern const char kRemoteShellPort[]; +CONTENT_EXPORT extern const char kRemoteShellPort[]; extern const char kRendererAssertTest[]; extern const char kRendererCmdPrefix[]; extern const char kRendererCrashTest[]; -extern const char kRendererProcess[]; +CONTENT_EXPORT extern const char kRendererProcess[]; extern const char kRendererStartupDialog[]; // TODO(jam): this doesn't belong in content. -extern const char kServiceProcess[]; +CONTENT_EXPORT extern const char kServiceProcess[]; extern const char kShowPaintRects[]; extern const char kSimpleDataSource[]; -extern const char kSingleProcess[]; +CONTENT_EXPORT extern const char kSingleProcess[]; extern const char kSQLiteIndexedDatabase[]; extern const char kTestSandbox[]; extern const char kUnlimitedQuotaForFiles[]; -extern const char kUserAgent[]; +CONTENT_EXPORT extern const char kUserAgent[]; extern const char kUtilityCmdPrefix[]; -extern const char kUtilityProcess[]; +CONTENT_EXPORT extern const char kUtilityProcess[]; extern const char kUtilityProcessAllowedDir[]; -extern const char kWaitForDebuggerChildren[]; +CONTENT_EXPORT extern const char kWaitForDebuggerChildren[]; extern const char kWebCoreLogChannels[]; extern const char kWebWorkerProcessPerCore[]; extern const char kWebWorkerShareProcesses[]; -extern const char kWorkerProcess[]; -extern const char kZygoteCmdPrefix[]; -extern const char kZygoteProcess[]; +CONTENT_EXPORT extern const char kWorkerProcess[]; +CONTENT_EXPORT extern const char kZygoteCmdPrefix[]; +CONTENT_EXPORT extern const char kZygoteProcess[]; #if defined(OS_WIN) extern const char kAuditHandles[]; diff --git a/content/common/devtools_messages.h b/content/common/devtools_messages.h index 6536f40..5f09147 100644 --- a/content/common/devtools_messages.h +++ b/content/common/devtools_messages.h @@ -42,6 +42,7 @@ #include <map> #include <string> +#include "content/common/content_export.h" #include "ipc/ipc_message_macros.h" // Singly-included section. @@ -52,6 +53,9 @@ typedef std::map<std::string, std::string> DevToolsRuntimeProperties; #endif // CONTENT_COMMON_DEVTOOLS_MESSAGES_H_ +#undef IPC_MESSAGE_EXPORT +#define IPC_MESSAGE_EXPORT CONTENT_EXPORT + #define IPC_MESSAGE_START DevToolsMsgStart // These are messages sent from DevToolsAgent to DevToolsClient through the diff --git a/content/common/gpu/gpu_feature_flags.h b/content/common/gpu/gpu_feature_flags.h index 99c6576..47ec196 100644 --- a/content/common/gpu/gpu_feature_flags.h +++ b/content/common/gpu/gpu_feature_flags.h @@ -12,6 +12,7 @@ #include <string> #include "base/basictypes.h" +#include "content/common/content_export.h" class GpuFeatureFlags { public: @@ -33,7 +34,7 @@ class GpuFeatureFlags { // flags are OR combination of GpuFeatureType. void set_flags(uint32 flags); - uint32 flags() const; + CONTENT_EXPORT uint32 flags() const; // Resets each flag by OR with the corresponding flag in "other". void Combine(const GpuFeatureFlags& other); diff --git a/content/common/hi_res_timer_manager.h b/content/common/hi_res_timer_manager.h index 5c3ae38..ff2ff1f 100644 --- a/content/common/hi_res_timer_manager.h +++ b/content/common/hi_res_timer_manager.h @@ -7,10 +7,12 @@ #pragma once #include "base/system_monitor/system_monitor.h" +#include "content/common/content_export.h" // Ensures that the Windows high resolution timer is only used // when not running on battery power. -class HighResolutionTimerManager : public base::SystemMonitor::PowerObserver { +class CONTENT_EXPORT HighResolutionTimerManager + : public base::SystemMonitor::PowerObserver { public: HighResolutionTimerManager(); virtual ~HighResolutionTimerManager(); diff --git a/content/common/json_value_serializer.h b/content/common/json_value_serializer.h index afb18f8..4b11e52 100644 --- a/content/common/json_value_serializer.h +++ b/content/common/json_value_serializer.h @@ -11,8 +11,9 @@ #include "base/basictypes.h" #include "base/file_path.h" #include "base/values.h" +#include "content/common/content_export.h" -class JSONStringValueSerializer : public base::ValueSerializer { +class CONTENT_EXPORT JSONStringValueSerializer : public base::ValueSerializer { public: // json_string is the string that will be source of the deserialization // or the destination of the serialization. The caller of the constructor @@ -66,7 +67,7 @@ class JSONStringValueSerializer : public base::ValueSerializer { DISALLOW_COPY_AND_ASSIGN(JSONStringValueSerializer); }; -class JSONFileValueSerializer : public base::ValueSerializer { +class CONTENT_EXPORT JSONFileValueSerializer : public base::ValueSerializer { public: // json_file_patch is the path of a file that will be source of the // deserialization or the destination of the serialization. diff --git a/content/common/native_web_keyboard_event.h b/content/common/native_web_keyboard_event.h index 7de71a4..631273e 100644 --- a/content/common/native_web_keyboard_event.h +++ b/content/common/native_web_keyboard_event.h @@ -7,7 +7,9 @@ #pragma once #include "base/basictypes.h" +#include "base/compiler_specific.h" #include "build/build_config.h" +#include "content/common/content_export.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" #if defined(OS_WIN) @@ -24,7 +26,8 @@ typedef struct _GdkEventKey GdkEventKey; // Owns a platform specific event; used to pass own and pass event through // platform independent code. -struct NativeWebKeyboardEvent : public WebKit::WebKeyboardEvent { +struct CONTENT_EXPORT NativeWebKeyboardEvent : + NON_EXPORTED_BASE(public WebKit::WebKeyboardEvent) { NativeWebKeyboardEvent(); #if defined(OS_WIN) diff --git a/content/common/net/url_fetcher.h b/content/common/net/url_fetcher.h index 00ff56f..0d73d64 100644 --- a/content/common/net/url_fetcher.h +++ b/content/common/net/url_fetcher.h @@ -22,6 +22,7 @@ #include "base/message_loop.h" #include "base/platform_file.h" #include "base/time.h" +#include "content/common/content_export.h" class FilePath; class GURL; @@ -68,7 +69,7 @@ typedef std::vector<std::string> ResponseCookies; // NOTE: By default URLFetcher requests are NOT intercepted, except when // interception is explicitly enabled in tests. -class URLFetcher { +class CONTENT_EXPORT URLFetcher { public: enum RequestType { GET, @@ -80,7 +81,7 @@ class URLFetcher { // was received. static const int kInvalidHttpResponseCode; - class Delegate { + class CONTENT_EXPORT Delegate { public: // TODO(skerner): This will be removed in favor of the |source|-only // version below. Leaving this for now to make the initial code review diff --git a/content/common/notification_details.h b/content/common/notification_details.h index 1e822a9..50c7b23 100644 --- a/content/common/notification_details.h +++ b/content/common/notification_details.h @@ -10,11 +10,12 @@ #pragma once #include "base/basictypes.h" +#include "content/common/content_export.h" // Do not declare a NotificationDetails directly--use either // "Details<detailsclassname>(detailsclasspointer)" or // NotificationService::NoDetails(). -class NotificationDetails { +class CONTENT_EXPORT NotificationDetails { public: NotificationDetails(); NotificationDetails(const NotificationDetails& other); diff --git a/content/common/notification_observer.h b/content/common/notification_observer.h index 49f74de..5fa0cb9 100644 --- a/content/common/notification_observer.h +++ b/content/common/notification_observer.h @@ -6,12 +6,14 @@ #define CONTENT_COMMON_NOTIFICATION_OBSERVER_H_ #pragma once +#include "content/common/content_export.h" + class NotificationDetails; class NotificationSource; // This is the base class for notification observers. When a matching // notification is posted to the notification service, Observe is called. -class NotificationObserver { +class CONTENT_EXPORT NotificationObserver { public: NotificationObserver(); virtual ~NotificationObserver(); diff --git a/content/common/notification_registrar.h b/content/common/notification_registrar.h index 9d054bf..912958d 100644 --- a/content/common/notification_registrar.h +++ b/content/common/notification_registrar.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// 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. @@ -9,6 +9,7 @@ #include <vector> #include "base/basictypes.h" +#include "content/common/content_export.h" #include "content/common/content_notification_types.h" class NotificationObserver; @@ -21,7 +22,7 @@ class NotificationSource; // class and use it to register your notifications instead of going through the // notification service directly. It will automatically unregister them for // you. -class NotificationRegistrar { +class CONTENT_EXPORT NotificationRegistrar { public: // This class must not be derived from (we don't have a virtual destructor so // it won't work). Instead, use it as a member in your class. diff --git a/content/common/notification_service.h b/content/common/notification_service.h index a9cd210..b8192e0 100644 --- a/content/common/notification_service.h +++ b/content/common/notification_service.h @@ -13,13 +13,14 @@ #include <map> #include "base/observer_list.h" +#include "content/common/content_export.h" #include "content/common/content_notification_types.h" #include "content/common/notification_details.h" #include "content/common/notification_source.h" class NotificationObserver; -class NotificationService { +class CONTENT_EXPORT NotificationService { public: // Returns the NotificationService object for the current thread, or NULL if // none. diff --git a/content/common/notification_source.h b/content/common/notification_source.h index db5977b..791b4d0 100644 --- a/content/common/notification_source.h +++ b/content/common/notification_source.h @@ -10,11 +10,12 @@ #pragma once #include "base/basictypes.h" +#include "content/common/content_export.h" // Do not declare a NotificationSource directly--use either // "Source<sourceclassname>(sourceclasspointer)" or // NotificationService::AllSources(). -class NotificationSource { +class CONTENT_EXPORT NotificationSource { public: NotificationSource(const NotificationSource& other); ~NotificationSource(); diff --git a/content/common/page_transition_types.h b/content/common/page_transition_types.h index 1bd6ec9..5aaeeac 100644 --- a/content/common/page_transition_types.h +++ b/content/common/page_transition_types.h @@ -7,9 +7,10 @@ #pragma once #include "base/basictypes.h" +#include "content/common/content_export.h" // This class is for scoping only. -class PageTransition { +class CONTENT_EXPORT PageTransition { public: // Types of transitions between pages. These are stored in the history // database to separate visits, and are reported by the renderer for page diff --git a/content/common/pepper_plugin_registry.h b/content/common/pepper_plugin_registry.h index d714e2f..ee2404a4 100644 --- a/content/common/pepper_plugin_registry.h +++ b/content/common/pepper_plugin_registry.h @@ -12,12 +12,13 @@ #include <vector> #include "base/file_path.h" +#include "content/common/content_export.h" #include "ppapi/proxy/proxy_channel.h" #include "webkit/plugins/ppapi/plugin_delegate.h" #include "webkit/plugins/ppapi/plugin_module.h" #include "webkit/plugins/webplugininfo.h" -struct PepperPluginInfo { +struct CONTENT_EXPORT PepperPluginInfo { PepperPluginInfo(); ~PepperPluginInfo(); @@ -71,7 +72,8 @@ class PepperPluginRegistry // has no need to load the pepper plugin modules. It will re-compute the // plugin list every time it is called. Generally, code in the registry should // be using the cached plugin_list_ instead. - static void ComputeList(std::vector<PepperPluginInfo>* plugins); + CONTENT_EXPORT static void ComputeList( + std::vector<PepperPluginInfo>* plugins); // Loads the (native) libraries but does not initialize them (i.e., does not // call PPP_InitializeModule). This is needed by the zygote on Linux to get diff --git a/content/common/plugin_messages.h b/content/common/plugin_messages.h index c3c7ed1..2dc4959 100644 --- a/content/common/plugin_messages.h +++ b/content/common/plugin_messages.h @@ -6,6 +6,7 @@ #include "build/build_config.h" #include "content/common/common_param_traits.h" +#include "content/common/content_export.h" #include "content/common/webkit_param_traits.h" #include "ipc/ipc_channel_handle.h" #include "ipc/ipc_message_macros.h" @@ -17,6 +18,9 @@ #include "base/file_descriptor_posix.h" #endif +#undef IPC_MESSAGE_EXPORT +#define IPC_MESSAGE_EXPORT CONTENT_EXPORT + #define IPC_MESSAGE_START PluginMsgStart IPC_STRUCT_BEGIN(PluginMsg_Init_Params) diff --git a/content/common/property_bag.h b/content/common/property_bag.h index 0e2e204..b83cc58 100644 --- a/content/common/property_bag.h +++ b/content/common/property_bag.h @@ -9,6 +9,7 @@ #include <map> #include "base/basictypes.h" +#include "content/common/content_export.h" template <typename T> class linked_ptr; @@ -42,7 +43,7 @@ class PropertyAccessorBase; // // accessor->SetProperty(object, 22); // } -class PropertyBag { +class CONTENT_EXPORT PropertyBag { public: // The type that uniquely identifies a property type. typedef int PropID; @@ -93,7 +94,7 @@ class PropertyBag { // Manages getting the unique IDs to identify a property. Callers should use // PropertyAccessor below instead. -class PropertyAccessorBase { +class CONTENT_EXPORT PropertyAccessorBase { public: PropertyAccessorBase(); virtual ~PropertyAccessorBase() {} diff --git a/content/common/renderer_preferences.h b/content/common/renderer_preferences.h index 9d5cb0a..e622464 100644 --- a/content/common/renderer_preferences.h +++ b/content/common/renderer_preferences.h @@ -13,6 +13,7 @@ #define CONTENT_COMMON_RENDERER_PREFERENCES_H_ #pragma once +#include "content/common/content_export.h" #include "third_party/skia/include/core/SkColor.h" enum RendererPreferencesHintingEnum { @@ -32,7 +33,7 @@ enum RendererPreferencesSubpixelRenderingEnum { RENDERER_PREFERENCES_SUBPIXEL_RENDERING_VBGR, }; -struct RendererPreferences { +struct CONTENT_EXPORT RendererPreferences { RendererPreferences(); // Whether the renderer's current browser context accept drops from the OS diff --git a/content/common/resource_dispatcher_delegate.h b/content/common/resource_dispatcher_delegate.h index e973dd7..c19ed57 100644 --- a/content/common/resource_dispatcher_delegate.h +++ b/content/common/resource_dispatcher_delegate.h @@ -6,11 +6,12 @@ #define CONTENT_COMMON_RESOURCE_DISPATCHER_DELEGATE_H_ #pragma once +#include "content/common/content_export.h" #include "webkit/glue/resource_loader_bridge.h" // Interface that allows observing request events and optionally replacing the // peer. -class ResourceDispatcherDelegate { +class CONTENT_EXPORT ResourceDispatcherDelegate { public: ResourceDispatcherDelegate(); virtual ~ResourceDispatcherDelegate(); diff --git a/content/common/resource_response.h b/content/common/resource_response.h index 0473e32..8c949a3 100644 --- a/content/common/resource_response.h +++ b/content/common/resource_response.h @@ -11,6 +11,7 @@ #include <string> #include "base/memory/ref_counted.h" +#include "content/common/content_export.h" #include "googleurl/src/gurl.h" #include "net/url_request/url_request_status.h" #include "webkit/glue/resource_loader_bridge.h" @@ -31,7 +32,8 @@ struct SyncLoadResult : ResourceResponseHead { }; // Simple wrapper that refcounts ResourceResponseHead. -struct ResourceResponse : public base::RefCounted<ResourceResponse> { +struct CONTENT_EXPORT ResourceResponse + : public base::RefCounted<ResourceResponse> { ResourceResponse(); ResourceResponseHead response_head; diff --git a/content/common/sandbox_init_wrapper.h b/content/common/sandbox_init_wrapper.h index c144992..fcc096a 100644 --- a/content/common/sandbox_init_wrapper.h +++ b/content/common/sandbox_init_wrapper.h @@ -15,6 +15,8 @@ #include <string> #include "base/basictypes.h" +#include "content/common/content_export.h" + #if defined(OS_WIN) #include "sandbox/src/sandbox.h" #endif @@ -23,7 +25,7 @@ class CommandLine; #if defined(OS_WIN) -class SandboxInitWrapper { +class CONTENT_EXPORT SandboxInitWrapper { public: SandboxInitWrapper() : broker_services_(), target_services_() { } // SetServices() needs to be called before InitializeSandbox() on Win32 with diff --git a/content/common/sandbox_policy.h b/content/common/sandbox_policy.h index 55dc0c5..4d87717 100644 --- a/content/common/sandbox_policy.h +++ b/content/common/sandbox_policy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// 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. @@ -7,6 +7,7 @@ #pragma once #include "base/process.h" +#include "content/common/content_export.h" class CommandLine; class FilePath; @@ -15,12 +16,14 @@ namespace sandbox { class BrokerServices; -void InitBrokerServices(sandbox::BrokerServices* broker_services); +CONTENT_EXPORT void InitBrokerServices( + sandbox::BrokerServices* broker_services); // Starts a sandboxed process with the given directory unsandboxed // and returns a handle to it. -base::ProcessHandle StartProcessWithAccess(CommandLine* cmd_line, - const FilePath& exposed_dir); +CONTENT_EXPORT base::ProcessHandle StartProcessWithAccess( + CommandLine* cmd_line, + const FilePath& exposed_dir); } // namespace sandbox diff --git a/content/common/section_util_win.h b/content/common/section_util_win.h index b07239a..fa08df9 100644 --- a/content/common/section_util_win.h +++ b/content/common/section_util_win.h @@ -8,6 +8,8 @@ #include <windows.h> +#include "content/common/content_export.h" + namespace chrome { // Duplicates a section handle from another process to the current process. @@ -16,7 +18,10 @@ HANDLE GetSectionFromProcess(HANDLE section, HANDLE process, bool read_only); // Duplicates a section handle from the current process for use in another // process. Returns the new valid handle or NULL on failure. -HANDLE GetSectionForProcess(HANDLE section, HANDLE process, bool read_only); +CONTENT_EXPORT HANDLE GetSectionForProcess( + HANDLE section, + HANDLE process, + bool read_only); } // namespace chrome diff --git a/content/common/url_constants.h b/content/common/url_constants.h index 726ec7d..78f7e2f 100644 --- a/content/common/url_constants.h +++ b/content/common/url_constants.h @@ -8,6 +8,8 @@ #define CONTENT_COMMON_URL_CONSTANTS_H_ #pragma once +#include "content/common/content_export.h" + namespace chrome { // Null terminated list of schemes that are savable. @@ -16,29 +18,29 @@ extern const char* kSavableSchemes[]; // Canonical schemes you can use as input to GURL.SchemeIs(). // TODO(jam): some of these don't below in the content layer, but are accessed // from there. -extern const char kAboutScheme[]; -extern const char kBlobScheme[]; -extern const char kChromeDevToolsScheme[]; -extern const char kChromeInternalScheme[]; -extern const char kChromeUIScheme[]; // The scheme used for WebUIs. -extern const char kCrosScheme[]; // The scheme used for ChromeOS. -extern const char kDataScheme[]; -extern const char kExtensionScheme[]; -extern const char kFileScheme[]; -extern const char kFileSystemScheme[]; -extern const char kFtpScheme[]; -extern const char kHttpScheme[]; -extern const char kHttpsScheme[]; -extern const char kJavaScriptScheme[]; -extern const char kMailToScheme[]; -extern const char kMetadataScheme[]; -extern const char kViewSourceScheme[]; +CONTENT_EXPORT extern const char kAboutScheme[]; +CONTENT_EXPORT extern const char kBlobScheme[]; +CONTENT_EXPORT extern const char kChromeDevToolsScheme[]; +CONTENT_EXPORT extern const char kChromeInternalScheme[]; +CONTENT_EXPORT extern const char kChromeUIScheme[]; // Used for WebUIs. +CONTENT_EXPORT extern const char kCrosScheme[]; // Used for ChromeOS. +CONTENT_EXPORT extern const char kDataScheme[]; +CONTENT_EXPORT extern const char kExtensionScheme[]; +CONTENT_EXPORT extern const char kFileScheme[]; +CONTENT_EXPORT extern const char kFileSystemScheme[]; +CONTENT_EXPORT extern const char kFtpScheme[]; +CONTENT_EXPORT extern const char kHttpScheme[]; +CONTENT_EXPORT extern const char kHttpsScheme[]; +CONTENT_EXPORT extern const char kJavaScriptScheme[]; +CONTENT_EXPORT extern const char kMailToScheme[]; +CONTENT_EXPORT extern const char kMetadataScheme[]; +CONTENT_EXPORT extern const char kViewSourceScheme[]; // Used to separate a standard scheme and the hostname: "://". -extern const char kStandardSchemeSeparator[]; +CONTENT_EXPORT extern const char kStandardSchemeSeparator[]; // About URLs (including schemes). -extern const char kAboutBlankURL[]; +CONTENT_EXPORT extern const char kAboutBlankURL[]; extern const char kAboutCrashURL[]; // Special URL used to start a navigation to an error page. diff --git a/content/common/view_messages.h b/content/common/view_messages.h index d127d71..25ca41b 100644 --- a/content/common/view_messages.h +++ b/content/common/view_messages.h @@ -8,6 +8,7 @@ #include "base/process.h" #include "base/shared_memory.h" #include "content/common/common_param_traits.h" +#include "content/common/content_export.h" #include "content/common/css_colors.h" #include "content/common/edit_command.h" #include "content/common/navigation_gesture.h" @@ -195,6 +196,9 @@ struct ViewMsg_StopFinding_Params { #endif // CONTENT_COMMON_VIEW_MESSAGES_H_ +#undef IPC_MESSAGE_EXPORT +#define IPC_MESSAGE_EXPORT CONTENT_EXPORT + #define IPC_MESSAGE_START ViewMsgStart IPC_ENUM_TRAITS(CSSColors::CSSColorName) diff --git a/content/common/view_types.h b/content/common/view_types.h index ae82e4f..6859180 100644 --- a/content/common/view_types.h +++ b/content/common/view_types.h @@ -7,9 +7,10 @@ #pragma once #include "base/basictypes.h" +#include "content/common/content_export.h" // Indicates different types of views -class ViewType { +class CONTENT_EXPORT ViewType { public: enum Type { INVALID, diff --git a/content/common/webkit_param_traits.h b/content/common/webkit_param_traits.h index a937581..8fce34e 100644 --- a/content/common/webkit_param_traits.h +++ b/content/common/webkit_param_traits.h @@ -17,6 +17,7 @@ #include <string> #include "base/memory/ref_counted.h" +#include "content/common/content_export.h" #include "ipc/ipc_message_utils.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" @@ -227,7 +228,7 @@ struct SimilarTypeTraits<WindowOpenDisposition> { }; template <> -struct ParamTraits<webkit_glue::PasswordForm> { +struct CONTENT_EXPORT ParamTraits<webkit_glue::PasswordForm> { typedef webkit_glue::PasswordForm param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); |