diff options
Diffstat (limited to 'content/browser')
51 files changed, 136 insertions, 97 deletions
diff --git a/content/browser/debugger/devtools_agent_host.h b/content/browser/debugger/devtools_agent_host.h index 95c9754..ef27fc5 100644 --- a/content/browser/debugger/devtools_agent_host.h +++ b/content/browser/debugger/devtools_agent_host.h @@ -13,7 +13,7 @@ class Message; } // Describes interface for managing devtools agents from the browser process. -class DevToolsAgentHost { +class CONTENT_EXPORT DevToolsAgentHost { public: class CONTENT_EXPORT CloseListener { public: diff --git a/content/browser/debugger/render_view_devtools_agent_host.h b/content/browser/debugger/render_view_devtools_agent_host.h index cd9fd95..691642d 100644 --- a/content/browser/debugger/render_view_devtools_agent_host.h +++ b/content/browser/debugger/render_view_devtools_agent_host.h @@ -11,11 +11,12 @@ #include "base/basictypes.h" #include "content/browser/debugger/devtools_agent_host.h" #include "content/browser/renderer_host/render_view_host_observer.h" +#include "content/common/content_export.h" class RenderViewHost; -class RenderViewDevToolsAgentHost : public DevToolsAgentHost, - private RenderViewHostObserver { +class CONTENT_EXPORT RenderViewDevToolsAgentHost + : public DevToolsAgentHost, private RenderViewHostObserver { public: static DevToolsAgentHost* FindFor(RenderViewHost*); diff --git a/content/browser/device_orientation/provider.h b/content/browser/device_orientation/provider.h index 8fa4831..a44128c 100644 --- a/content/browser/device_orientation/provider.h +++ b/content/browser/device_orientation/provider.h @@ -6,12 +6,13 @@ #define CONTENT_BROWSER_DEVICE_ORIENTATION_PROVIDER_H_ #include "base/memory/ref_counted.h" +#include "content/common/content_export.h" namespace device_orientation { class Orientation; -class Provider : public base::RefCountedThreadSafe<Provider> { +class CONTENT_EXPORT Provider : public base::RefCountedThreadSafe<Provider> { public: class Observer { public: diff --git a/content/browser/device_orientation/provider_impl.h b/content/browser/device_orientation/provider_impl.h index abde52f..db05d31 100644 --- a/content/browser/device_orientation/provider_impl.h +++ b/content/browser/device_orientation/provider_impl.h @@ -13,6 +13,7 @@ #include "content/browser/device_orientation/data_fetcher.h" #include "content/browser/device_orientation/orientation.h" #include "content/browser/device_orientation/provider.h" +#include "content/common/content_export.h" class MessageLoop; @@ -28,7 +29,7 @@ class ProviderImpl : public Provider { // Create a ProviderImpl that uses the NULL-terminated factories array to find // a DataFetcher that can provide orientation data. - ProviderImpl(const DataFetcherFactory factories[]); + CONTENT_EXPORT ProviderImpl(const DataFetcherFactory factories[]); // From Provider. virtual void AddObserver(Observer* observer); diff --git a/content/browser/download/download_create_info.h b/content/browser/download/download_create_info.h index 1ffb47a..e957ec0 100644 --- a/content/browser/download/download_create_info.h +++ b/content/browser/download/download_create_info.h @@ -14,12 +14,13 @@ #include "base/time.h" #include "content/browser/download/download_file.h" #include "content/browser/download/download_request_handle.h" +#include "content/common/content_export.h" #include "content/common/page_transition_types.h" #include "googleurl/src/gurl.h" // Used for informing the download manager of a new download, since we don't // want to pass |DownloadItem|s between threads. -struct DownloadCreateInfo { +struct CONTENT_EXPORT DownloadCreateInfo { DownloadCreateInfo(const FilePath& path, const GURL& url, const base::Time& start_time, diff --git a/content/browser/geolocation/arbitrator_dependency_factory.h b/content/browser/geolocation/arbitrator_dependency_factory.h index 7114b70..484c673 100644 --- a/content/browser/geolocation/arbitrator_dependency_factory.h +++ b/content/browser/geolocation/arbitrator_dependency_factory.h @@ -8,6 +8,7 @@ #include "base/memory/ref_counted.h" #include "base/string16.h" +#include "content/common/content_export.h" class AccessTokenStore; class GURL; @@ -23,7 +24,7 @@ class URLRequestContextGetter; // Allows injection of factory methods for creating the location providers. // RefCounted for simplicity of writing tests. -class GeolocationArbitratorDependencyFactory +class CONTENT_EXPORT GeolocationArbitratorDependencyFactory : public base::RefCounted<GeolocationArbitratorDependencyFactory> { public: // Defines a function that returns the current time. @@ -45,7 +46,7 @@ class GeolocationArbitratorDependencyFactory // The default dependency factory, exposed so that it is possible // to override only certain parts (e.g. the location providers). -class DefaultGeolocationArbitratorDependencyFactory +class CONTENT_EXPORT DefaultGeolocationArbitratorDependencyFactory : public GeolocationArbitratorDependencyFactory { public: // GeolocationArbitratorDependencyFactory diff --git a/content/browser/geolocation/device_data_provider.h b/content/browser/geolocation/device_data_provider.h index e4e2eee..64e52ad 100644 --- a/content/browser/geolocation/device_data_provider.h +++ b/content/browser/geolocation/device_data_provider.h @@ -34,6 +34,7 @@ #include "base/string_util.h" #include "base/task.h" #include "base/threading/non_thread_safe.h" +#include "content/common/content_export.h" // The following data structures are used to store cell radio data and wifi // data. See the Geolocation API design document at @@ -72,7 +73,7 @@ enum RadioType { }; // All data for the cell radio. -struct RadioData { +struct CONTENT_EXPORT RadioData { RadioData(); ~RadioData(); @@ -94,7 +95,7 @@ struct RadioData { }; // Wifi data relating to a single access point. -struct AccessPointData { +struct CONTENT_EXPORT AccessPointData { AccessPointData(); ~AccessPointData(); @@ -116,7 +117,7 @@ struct AccessPointDataLess { }; // All data for wifi. -struct WifiData { +struct CONTENT_EXPORT WifiData { WifiData(); ~WifiData(); @@ -134,7 +135,7 @@ class DeviceDataProvider; // This class just exists to work-around MSVC2005 not being able to have a // template class implement RefCountedThreadSafe -class DeviceDataProviderImplBaseHack +class CONTENT_EXPORT DeviceDataProviderImplBaseHack : public base::RefCountedThreadSafe<DeviceDataProviderImplBaseHack> { protected: friend class base::RefCountedThreadSafe<DeviceDataProviderImplBaseHack>; @@ -343,7 +344,8 @@ class DeviceDataProvider : public base::NonThreadSafe { impl_->StopDataProvider(); } - static DeviceDataProviderImplBase<DataType>* DefaultFactoryFunction(); + static CONTENT_EXPORT DeviceDataProviderImplBase<DataType>* + DefaultFactoryFunction(); // The singleton-like instance of this class. (Not 'true' singleton, as it // may go through multiple create/destroy/create cycles per process instance, diff --git a/content/browser/geolocation/geolocation_observer.h b/content/browser/geolocation/geolocation_observer.h index 68148ea..3110e00 100644 --- a/content/browser/geolocation/geolocation_observer.h +++ b/content/browser/geolocation/geolocation_observer.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,12 +7,13 @@ #pragma once #include "base/basictypes.h" +#include "content/common/content_export.h" struct Geoposition; // This interface is implemented by observers of GeolocationProvider as // well as GeolocationProvider itself as an observer of GeolocationArbitrator. -class GeolocationObserver { +class CONTENT_EXPORT GeolocationObserver { public: // This will be called whenever the 'best available' location is updated, // or when an error is encountered meaning no location data will be diff --git a/content/browser/geolocation/geolocation_provider.h b/content/browser/geolocation/geolocation_provider.h index c57e692..5001fee 100644 --- a/content/browser/geolocation/geolocation_provider.h +++ b/content/browser/geolocation/geolocation_provider.h @@ -24,7 +24,8 @@ struct DefaultSingletonTraits; // observers which will be notified of location updates. Underlying location // arbitrator will only be enabled whilst there is at least one observer // registered. -class GeolocationProvider : public base::Thread, public GeolocationObserver { +class CONTENT_EXPORT GeolocationProvider + : public base::Thread, public GeolocationObserver { public: GeolocationProvider(); @@ -42,7 +43,7 @@ class GeolocationProvider : public base::Thread, public GeolocationObserver { // via AddObserver(). Returns true if the observer was removed. bool RemoveObserver(GeolocationObserver* delegate); - CONTENT_EXPORT void OnPermissionGranted(const GURL& requesting_frame); + void OnPermissionGranted(const GURL& requesting_frame); bool HasPermissionBeenGranted() const; // GeolocationObserver @@ -51,7 +52,7 @@ class GeolocationProvider : public base::Thread, public GeolocationObserver { // Gets a pointer to the singleton instance of the location relayer, which // is in turn bound to the browser's global context objects. Ownership is NOT // returned. - CONTENT_EXPORT static GeolocationProvider* GetInstance(); + static GeolocationProvider* GetInstance(); typedef std::map<GeolocationObserver*, GeolocationObserverOptions> ObserverMap; diff --git a/content/browser/geolocation/location_arbitrator.h b/content/browser/geolocation/location_arbitrator.h index 5370cd1..ffe0182 100644 --- a/content/browser/geolocation/location_arbitrator.h +++ b/content/browser/geolocation/location_arbitrator.h @@ -12,6 +12,7 @@ #include "content/browser/geolocation/access_token_store.h" #include "content/browser/geolocation/location_provider.h" #include "content/browser/geolocation/geolocation_observer.h" +#include "content/common/content_export.h" #include "content/common/geoposition.h" #include "googleurl/src/gurl.h" #include "net/url_request/url_request_context_getter.h" @@ -30,7 +31,8 @@ struct Geoposition; // This class is responsible for handling updates from multiple underlying // providers and resolving them to a single 'best' location fix at any given // moment. -class GeolocationArbitrator : public LocationProviderBase::ListenerInterface { +class CONTENT_EXPORT GeolocationArbitrator + : public LocationProviderBase::ListenerInterface { public: // Number of milliseconds newer a location provider has to be that it's worth // switching to this location provider on the basis of it being fresher diff --git a/content/browser/geolocation/location_provider.h b/content/browser/geolocation/location_provider.h index 2c33e7d..b282527 100644 --- a/content/browser/geolocation/location_provider.h +++ b/content/browser/geolocation/location_provider.h @@ -17,6 +17,7 @@ #include "base/string16.h" #include "base/threading/non_thread_safe.h" +#include "content/common/content_export.h" class AccessTokenStore; struct Geoposition; @@ -27,12 +28,13 @@ class URLRequestContextGetter; } // The base class used by all location providers. -class LocationProviderBase : public base::NonThreadSafe { +class CONTENT_EXPORT LocationProviderBase + : NON_EXPORTED_BASE(public base::NonThreadSafe) { public: // Clients of the location provider must implement this interface. All call- // backs to this interface will happen in the context of the thread on which // the location provider was created. - class ListenerInterface { + class CONTENT_EXPORT ListenerInterface { public: // Used to inform listener that a new position fix is available or that a // fatal error has occurred. Providers should call this for new listeners @@ -90,7 +92,7 @@ class LocationProviderBase : public base::NonThreadSafe { // Factory functions for the various types of location provider to abstract // over the platform-dependent implementations. -LocationProviderBase* NewNetworkLocationProvider( +CONTENT_EXPORT LocationProviderBase* NewNetworkLocationProvider( AccessTokenStore* access_token_store, net::URLRequestContextGetter* context, const GURL& url, diff --git a/content/browser/geolocation/network_location_provider.h b/content/browser/geolocation/network_location_provider.h index b3ef8d0..738dca8 100644 --- a/content/browser/geolocation/network_location_provider.h +++ b/content/browser/geolocation/network_location_provider.h @@ -17,6 +17,7 @@ #include "content/browser/geolocation/device_data_provider.h" #include "content/browser/geolocation/location_provider.h" #include "content/browser/geolocation/network_location_request.h" +#include "content/common/content_export.h" #include "content/common/geoposition.h" class URLFetcherProtectEntry; @@ -28,7 +29,7 @@ class NetworkLocationProvider public NetworkLocationRequest::ListenerInterface { public: // Cache of recently resolved locations. Public for tests. - class PositionCache { + class CONTENT_EXPORT PositionCache { public: // The maximum size of the cache of positions for previously requested // device data. diff --git a/content/browser/geolocation/network_location_request.h b/content/browser/geolocation/network_location_request.h index 89e17ca..45f6806 100644 --- a/content/browser/geolocation/network_location_request.h +++ b/content/browser/geolocation/network_location_request.h @@ -12,6 +12,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "content/browser/geolocation/device_data_provider.h" +#include "content/common/content_export.h" #include "content/common/net/url_fetcher.h" #include "googleurl/src/gurl.h" @@ -29,7 +30,7 @@ struct Position; class NetworkLocationRequest : private URLFetcher::Delegate { public: // ID passed to URLFetcher::Create(). Used for testing. - static int url_fetcher_id_for_tests; + CONTENT_EXPORT static int url_fetcher_id_for_tests; // Interface for receiving callbacks from a NetworkLocationRequest object. class ListenerInterface { public: diff --git a/content/browser/geolocation/wifi_data_provider_common.h b/content/browser/geolocation/wifi_data_provider_common.h index c42586e..1f11ef8 100644 --- a/content/browser/geolocation/wifi_data_provider_common.h +++ b/content/browser/geolocation/wifi_data_provider_common.h @@ -14,6 +14,7 @@ #include "base/task.h" #include "base/threading/thread.h" #include "content/browser/geolocation/device_data_provider.h" +#include "content/common/content_export.h" // Converts a MAC address stored as an array of uint8 to a string. string16 MacAddressAsString16(const uint8 mac_as_int[6]); @@ -64,7 +65,7 @@ class GenericPollingPolicy : public PollingPolicyInterface { // both of which will be create & accessed in the worker thread (only). // Also designed this way to promotes ease of testing the cross-platform // behavior w.r.t. polling & threading. -class WifiDataProviderCommon +class CONTENT_EXPORT WifiDataProviderCommon : public WifiDataProviderImplBase, private base::Thread { public: diff --git a/content/browser/geolocation/wifi_data_provider_win.h b/content/browser/geolocation/wifi_data_provider_win.h index c377628..3173755 100644 --- a/content/browser/geolocation/wifi_data_provider_win.h +++ b/content/browser/geolocation/wifi_data_provider_win.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,10 +7,11 @@ #pragma once #include "content/browser/geolocation/wifi_data_provider_common.h" +#include "content/common/content_export.h" class PollingPolicyInterface; -class Win32WifiDataProvider : public WifiDataProviderCommon { +class CONTENT_EXPORT Win32WifiDataProvider : public WifiDataProviderCommon { public: Win32WifiDataProvider(); diff --git a/content/browser/geolocation/win7_location_api_win.h b/content/browser/geolocation/win7_location_api_win.h index c648b8c..a7be43c 100644 --- a/content/browser/geolocation/win7_location_api_win.h +++ b/content/browser/geolocation/win7_location_api_win.h @@ -13,6 +13,7 @@ #include "base/time.h" #include "base/win/scoped_com_initializer.h" +#include "content/common/content_export.h" struct Geoposition; @@ -20,7 +21,7 @@ struct Geoposition; typedef HRESULT (WINAPI* PropVariantToDoubleFunction) (REFPROPVARIANT propvarIn, DOUBLE *pdblRet); -class Win7LocationApi { +class CONTENT_EXPORT Win7LocationApi { public: virtual ~Win7LocationApi(); // Attempts to load propsys.dll, initialise |location_| and requests the user diff --git a/content/browser/geolocation/win7_location_provider_win.h b/content/browser/geolocation/win7_location_provider_win.h index 8a242ed..ff49494 100644 --- a/content/browser/geolocation/win7_location_provider_win.h +++ b/content/browser/geolocation/win7_location_provider_win.h @@ -9,6 +9,7 @@ #include "base/task.h" #include "content/browser/geolocation/location_provider.h" #include "content/browser/geolocation/win7_location_api_win.h" +#include "content/common/content_export.h" #include "content/common/geoposition.h" // Location provider for Windows 7 that uses the Location and Sensors platform @@ -17,7 +18,7 @@ // TODO(allanwoj): Possibly derive this class and the linux gps provider class // from a single SystemLocationProvider class as their implementation is very // similar. -class Win7LocationProvider : public LocationProviderBase { +class CONTENT_EXPORT Win7LocationProvider : public LocationProviderBase { public: Win7LocationProvider(Win7LocationApi* api); virtual ~Win7LocationProvider(); diff --git a/content/browser/in_process_webkit/webkit_context.h b/content/browser/in_process_webkit/webkit_context.h index c2f21a5..4fbdb28 100644 --- a/content/browser/in_process_webkit/webkit_context.h +++ b/content/browser/in_process_webkit/webkit_context.h @@ -56,13 +56,12 @@ class CONTENT_EXPORT WebKitContext clear_local_state_on_exit_ = clear_local_state; } -#ifdef UNIT_TEST // For unit tests, allow specifying a DOMStorageContext directly so it can be // mocked. - void set_dom_storage_context(DOMStorageContext* dom_storage_context) { + void set_dom_storage_context_for_testing( + DOMStorageContext* dom_storage_context) { dom_storage_context_.reset(dom_storage_context); } -#endif // Tells the DOMStorageContext to purge any memory it does not need. void PurgeMemory(); diff --git a/content/browser/in_process_webkit/webkit_context_unittest.cc b/content/browser/in_process_webkit/webkit_context_unittest.cc index 89123fa..2982e62 100644 --- a/content/browser/in_process_webkit/webkit_context_unittest.cc +++ b/content/browser/in_process_webkit/webkit_context_unittest.cc @@ -57,7 +57,8 @@ TEST(WebKitContextTest, PurgeMemory) { NULL, false, NULL, NULL)); MockDOMStorageContext* mock_context = new MockDOMStorageContext( context.get(), NULL); - context->set_dom_storage_context(mock_context); // Takes ownership. + // Takes ownership. + context->set_dom_storage_context_for_testing(mock_context); // Ensure PurgeMemory() calls our mock object on the right thread. EXPECT_EQ(0, mock_context->purge_count()); diff --git a/content/browser/in_process_webkit/webkit_thread.h b/content/browser/in_process_webkit/webkit_thread.h index 3b2edd2..c6f34fc 100644 --- a/content/browser/in_process_webkit/webkit_thread.h +++ b/content/browser/in_process_webkit/webkit_thread.h @@ -10,12 +10,13 @@ #include "base/memory/scoped_ptr.h" #include "base/threading/thread.h" #include "content/browser/browser_thread.h" +#include "content/common/content_export.h" class BrowserWebKitPlatformSupportImpl; // This creates a WebKit main thread on instantiation (if not in // --single-process mode) on construction and kills it on deletion. -class WebKitThread { +class CONTENT_EXPORT WebKitThread { public: // Called from the UI thread. WebKitThread(); diff --git a/content/browser/renderer_host/backing_store.h b/content/browser/renderer_host/backing_store.h index 1c4bad7..906144c 100644 --- a/content/browser/renderer_host/backing_store.h +++ b/content/browser/renderer_host/backing_store.h @@ -9,6 +9,7 @@ #include <vector> #include "base/basictypes.h" +#include "content/common/content_export.h" #include "ui/gfx/size.h" #include "ui/gfx/surface/transport_dib.h" @@ -24,7 +25,7 @@ class PlatformCanvas; } // Represents a backing store for the pixels in a RenderWidgetHost. -class BackingStore { +class CONTENT_EXPORT BackingStore { public: virtual ~BackingStore(); diff --git a/content/browser/renderer_host/media/audio_input_device_manager.h b/content/browser/renderer_host/media/audio_input_device_manager.h index 7ca04c3..342e1c0 100644 --- a/content/browser/renderer_host/media/audio_input_device_manager.h +++ b/content/browser/renderer_host/media/audio_input_device_manager.h @@ -17,6 +17,7 @@ #include "base/threading/thread.h" #include "content/browser/renderer_host/media/media_stream_provider.h" +#include "content/common/content_export.h" #include "content/common/media/media_stream_options.h" #include "media/audio/audio_device_name.h" @@ -24,7 +25,7 @@ namespace media_stream { class AudioInputDeviceManagerEventHandler; -class AudioInputDeviceManager : public MediaStreamProvider { +class CONTENT_EXPORT AudioInputDeviceManager : public MediaStreamProvider { public: // Calling Start() with this kFakeOpenSessionId will open the default device, // even though Open() has not been called. This is used to be able to use the diff --git a/content/browser/renderer_host/media/audio_renderer_host.h b/content/browser/renderer_host/media/audio_renderer_host.h index b281278..d2308a5 100644 --- a/content/browser/renderer_host/media/audio_renderer_host.h +++ b/content/browser/renderer_host/media/audio_renderer_host.h @@ -62,6 +62,7 @@ #include "base/shared_memory.h" #include "content/browser/browser_message_filter.h" #include "content/browser/browser_thread.h" +#include "content/common/content_export.h" #include "media/audio/audio_io.h" #include "media/audio/audio_output_controller.h" #include "media/audio/simple_sources.h" @@ -74,7 +75,7 @@ namespace content { class ResourceContext; } // namespace content -class AudioRendererHost +class CONTENT_EXPORT AudioRendererHost : public BrowserMessageFilter, public media::AudioOutputController::EventHandler { public: diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host.h b/content/browser/renderer_host/media/media_stream_dispatcher_host.h index c02d675..9397230 100644 --- a/content/browser/renderer_host/media/media_stream_dispatcher_host.h +++ b/content/browser/renderer_host/media/media_stream_dispatcher_host.h @@ -12,6 +12,7 @@ #include "content/browser/browser_message_filter.h" #include "content/browser/renderer_host/media/media_stream_manager.h" #include "content/browser/renderer_host/media/media_stream_requester.h" +#include "content/common/content_export.h" #include "content/common/media/media_stream_options.h" namespace content { @@ -23,7 +24,7 @@ namespace media_stream { // MediaStreamDispatcherHost is a delegate for Media Stream API messages used by // MediaStreamImpl. It's the complement of MediaStreamDispatcher // (owned by RenderView). -class MediaStreamDispatcherHost +class CONTENT_EXPORT MediaStreamDispatcherHost : public BrowserMessageFilter, public MediaStreamRequester { public: diff --git a/content/browser/renderer_host/media/media_stream_manager.h b/content/browser/renderer_host/media/media_stream_manager.h index 9a477aa..9ddda6b 100644 --- a/content/browser/renderer_host/media/media_stream_manager.h +++ b/content/browser/renderer_host/media/media_stream_manager.h @@ -41,11 +41,11 @@ class VideoCaptureManager; // start the media flow. // The classes requesting new media streams are answered using // MediaStreamManager::Listener. -class MediaStreamManager +class CONTENT_EXPORT MediaStreamManager : public MediaStreamProviderListener, public SettingsRequester { public: - CONTENT_EXPORT MediaStreamManager(); + MediaStreamManager(); virtual ~MediaStreamManager(); // Used to access VideoCaptureManager. diff --git a/content/browser/renderer_host/media/media_stream_provider.h b/content/browser/renderer_host/media/media_stream_provider.h index 5c924b6..cab027a 100644 --- a/content/browser/renderer_host/media/media_stream_provider.h +++ b/content/browser/renderer_host/media/media_stream_provider.h @@ -15,6 +15,7 @@ #include <list> #include <string> +#include "content/common/content_export.h" #include "content/common/media/media_stream_options.h" namespace media_stream { @@ -32,7 +33,7 @@ enum MediaStreamProviderError { enum { kInvalidMediaCaptureSessionId = 0xFFFFFFFF }; // Callback class used by MediaStreamProvider. -class MediaStreamProviderListener { +class CONTENT_EXPORT MediaStreamProviderListener { public: // Called by a MediaStreamProvider when a stream has been opened. virtual void Opened(MediaStreamType stream_type, @@ -56,7 +57,7 @@ class MediaStreamProviderListener { }; // Implemented by a manager class providing captured media. -class MediaStreamProvider { +class CONTENT_EXPORT MediaStreamProvider { public: // Registers a listener, only one listener is allowed. virtual void Register(MediaStreamProviderListener* listener) = 0; diff --git a/content/browser/renderer_host/media/media_stream_requester.h b/content/browser/renderer_host/media/media_stream_requester.h index da879fa5..8d51bec 100644 --- a/content/browser/renderer_host/media/media_stream_requester.h +++ b/content/browser/renderer_host/media/media_stream_requester.h @@ -7,6 +7,7 @@ #include <string> +#include "content/common/content_export.h" #include "content/common/media/media_stream_options.h" namespace media_stream { @@ -14,7 +15,7 @@ namespace media_stream { // MediaStreamRequester must be implemented by the class requesting a new media // stream to be opened. MediaStreamManager will use this interface to signal // success and error for a request. -class MediaStreamRequester { +class CONTENT_EXPORT MediaStreamRequester { public: // Called as a reply of a successful call to GenerateStream. virtual void StreamGenerated(const std::string& label, diff --git a/content/browser/renderer_host/media/media_stream_settings_requester.h b/content/browser/renderer_host/media/media_stream_settings_requester.h index 267cc95..cdbcfff 100644 --- a/content/browser/renderer_host/media/media_stream_settings_requester.h +++ b/content/browser/renderer_host/media/media_stream_settings_requester.h @@ -7,12 +7,13 @@ #include <string> +#include "content/common/content_export.h" #include "content/common/media/media_stream_options.h" namespace media_stream { // Implemented by the class requesting media capture device usage. -class SettingsRequester { +class CONTENT_EXPORT SettingsRequester { public: // Called to get available devices for a certain media type. A call to // |AvailableDevices| with the currently available capture devices is diff --git a/content/browser/renderer_host/media/video_capture_controller_event_handler.h b/content/browser/renderer_host/media/video_capture_controller_event_handler.h index 4396c32..77314a9 100644 --- a/content/browser/renderer_host/media/video_capture_controller_event_handler.h +++ b/content/browser/renderer_host/media/video_capture_controller_event_handler.h @@ -7,9 +7,10 @@ #include "base/shared_memory.h" #include "base/time.h" +#include "content/common/content_export.h" // ID used for identifying an object of VideoCaptureController. -struct VideoCaptureControllerID { +struct CONTENT_EXPORT VideoCaptureControllerID { VideoCaptureControllerID(int device_id); bool operator<(const VideoCaptureControllerID& vc) const; @@ -20,7 +21,7 @@ struct VideoCaptureControllerID { // VideoCaptureControllerEventHandler is the interface for // VideoCaptureController to notify clients about the events such as // BufferReady, FrameInfo, Error, etc. -class VideoCaptureControllerEventHandler { +class CONTENT_EXPORT VideoCaptureControllerEventHandler { public: // An Error has occurred in the VideoCaptureDevice. virtual void OnError(const VideoCaptureControllerID& id) = 0; diff --git a/content/browser/renderer_host/media/video_capture_host.h b/content/browser/renderer_host/media/video_capture_host.h index 9a0dbff..b5dfebc 100644 --- a/content/browser/renderer_host/media/video_capture_host.h +++ b/content/browser/renderer_host/media/video_capture_host.h @@ -41,13 +41,14 @@ #include "base/memory/ref_counted.h" #include "content/browser/browser_message_filter.h" #include "content/browser/renderer_host/media/video_capture_controller.h" +#include "content/common/content_export.h" #include "ipc/ipc_message.h" namespace content { class ResourceContext; } // namespace content -class VideoCaptureHost +class CONTENT_EXPORT VideoCaptureHost : public BrowserMessageFilter, public VideoCaptureControllerEventHandler { public: diff --git a/content/browser/renderer_host/media/video_capture_manager.h b/content/browser/renderer_host/media/video_capture_manager.h index 581efa6..f5040d4 100644 --- a/content/browser/renderer_host/media/video_capture_manager.h +++ b/content/browser/renderer_host/media/video_capture_manager.h @@ -14,6 +14,7 @@ #include "base/threading/thread.h" #include "content/browser/renderer_host/media/media_stream_provider.h" +#include "content/common/content_export.h" #include "content/common/media/media_stream_options.h" #include "media/video/capture/video_capture_device.h" #include "media/video/capture/video_capture_types.h" @@ -21,7 +22,7 @@ namespace media_stream { // VideoCaptureManager opens/closes and start/stops video capture devices. -class VideoCaptureManager : public MediaStreamProvider { +class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider { public: // Calling |Start| of this id will open the first device, even though open has // not been called. This is used to be able to use video capture devices diff --git a/content/browser/renderer_host/render_view_host.h b/content/browser/renderer_host/render_view_host.h index 582c918..789db05 100644 --- a/content/browser/renderer_host/render_view_host.h +++ b/content/browser/renderer_host/render_view_host.h @@ -353,19 +353,17 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHost { void ToggleSpeechInput(); -#if defined(UNIT_TEST) - // These functions shouldn't be necessary outside of testing. - void set_save_accessibility_tree_for_testing(bool save) { save_accessibility_tree_for_testing_ = save; } - const webkit_glue::WebAccessibility& accessibility_tree() { + const webkit_glue::WebAccessibility& accessibility_tree_for_testing() { return accessibility_tree_; } - bool is_waiting_for_unload_ack() { return is_waiting_for_unload_ack_; } -#endif + bool is_waiting_for_unload_ack_for_testing() { + return is_waiting_for_unload_ack_; + } // Checks that the given renderer can request |url|, if not it sets it to an // empty url. diff --git a/content/browser/renderer_host/render_view_host_factory.h b/content/browser/renderer_host/render_view_host_factory.h index 267dcf2..6f09695 100644 --- a/content/browser/renderer_host/render_view_host_factory.h +++ b/content/browser/renderer_host/render_view_host_factory.h @@ -51,11 +51,11 @@ class RenderViewHostFactory { // Registers your factory to be called when new RenderViewHosts are created. // We have only one global factory, so there must be no factory registered // before the call. This class does NOT take ownership of the pointer. - static void RegisterFactory(RenderViewHostFactory* factory); + CONTENT_EXPORT static void RegisterFactory(RenderViewHostFactory* factory); // Unregister the previously registered factory. With no factory registered, // the default RenderViewHosts will be created. - static void UnregisterFactory(); + CONTENT_EXPORT static void UnregisterFactory(); private: // The current globally registered factory. This is NULL when we should diff --git a/content/browser/renderer_host/render_view_host_manager_browsertest.cc b/content/browser/renderer_host/render_view_host_manager_browsertest.cc index 135fa42..019e22d 100644 --- a/content/browser/renderer_host/render_view_host_manager_browsertest.cc +++ b/content/browser/renderer_host/render_view_host_manager_browsertest.cc @@ -83,8 +83,8 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest, // Wait for the cross-site transition in the new tab to finish. ui_test_utils::WaitForLoadStop(browser()->GetSelectedTabContents()); - EXPECT_FALSE(browser()->GetSelectedTabContents()->render_manager()-> - pending_render_view_host()); + EXPECT_FALSE(browser()->GetSelectedTabContents()-> + render_manager_for_testing()->pending_render_view_host()); // Should have a new SiteInstance. scoped_refptr<SiteInstance> noref_blank_site_instance( diff --git a/content/browser/renderer_host/render_view_host_unittest.cc b/content/browser/renderer_host/render_view_host_unittest.cc index 8cb626d..4bd7e3b 100644 --- a/content/browser/renderer_host/render_view_host_unittest.cc +++ b/content/browser/renderer_host/render_view_host_unittest.cc @@ -55,7 +55,7 @@ TEST_F(RenderViewHostTest, ResetUnloadOnReload) { rvh()->SendShouldCloseACK(true); contents()->Stop(); controller().Reload(false); - EXPECT_FALSE(rvh()->is_waiting_for_unload_ack()); + EXPECT_FALSE(rvh()->is_waiting_for_unload_ack_for_testing()); } class MockDraggingRenderViewHostDelegateView diff --git a/content/browser/renderer_host/resource_dispatcher_host_request_info.h b/content/browser/renderer_host/resource_dispatcher_host_request_info.h index 5a0e0a2..8bd3983 100644 --- a/content/browser/renderer_host/resource_dispatcher_host_request_info.h +++ b/content/browser/renderer_host/resource_dispatcher_host_request_info.h @@ -37,7 +37,7 @@ class BlobData; class ResourceDispatcherHostRequestInfo : public net::URLRequest::UserData { public: // This will take a reference to the handler. - ResourceDispatcherHostRequestInfo( + CONTENT_EXPORT ResourceDispatcherHostRequestInfo( ResourceHandler* handler, ChildProcessInfo::ProcessType process_type, int child_id, diff --git a/content/browser/renderer_host/resource_message_filter.h b/content/browser/renderer_host/resource_message_filter.h index b2d5e25..afa4bc4 100644 --- a/content/browser/renderer_host/resource_message_filter.h +++ b/content/browser/renderer_host/resource_message_filter.h @@ -7,6 +7,7 @@ #include "base/memory/scoped_ptr.h" #include "content/browser/browser_message_filter.h" +#include "content/common/content_export.h" #include "content/common/child_process_info.h" #include "webkit/glue/resource_type.h" @@ -25,7 +26,7 @@ class URLRequestContext; // delayed by costly UI processing that may be occuring on the main thread of // the browser. It also means that any hangs in starting a network request // will not interfere with browser UI. -class ResourceMessageFilter : public BrowserMessageFilter { +class CONTENT_EXPORT ResourceMessageFilter : public BrowserMessageFilter { public: // Allows selecting the net::URLRequestContext used to service requests. class URLRequestContextSelector { diff --git a/content/browser/renderer_host/resource_queue.h b/content/browser/renderer_host/resource_queue.h index 9ad148df..3f867ee 100644 --- a/content/browser/renderer_host/resource_queue.h +++ b/content/browser/renderer_host/resource_queue.h @@ -45,7 +45,7 @@ class ResourceQueueDelegate { // Makes it easy to delay starting URL requests until specified conditions are // met. -class ResourceQueue { +class CONTENT_EXPORT ResourceQueue { public: typedef std::set<ResourceQueueDelegate*> DelegateSet; @@ -77,8 +77,8 @@ class ResourceQueue { // A delegate should call StartDelayedRequest when it wants to allow the // request to start. If it was the last delegate that demanded the request // to be delayed, the request will be started. - CONTENT_EXPORT void StartDelayedRequest(ResourceQueueDelegate* delegate, - const GlobalRequestID& request_id); + void StartDelayedRequest(ResourceQueueDelegate* delegate, + const GlobalRequestID& request_id); private: typedef std::map<GlobalRequestID, net::URLRequest*> RequestMap; diff --git a/content/browser/renderer_host/test_render_view_host.cc b/content/browser/renderer_host/test_render_view_host.cc index d64c046..200ccd2 100644 --- a/content/browser/renderer_host/test_render_view_host.cc +++ b/content/browser/renderer_host/test_render_view_host.cc @@ -306,7 +306,7 @@ TestRenderViewHost* RenderViewHostTestHarness::rvh() { TestRenderViewHost* RenderViewHostTestHarness::pending_rvh() { return static_cast<TestRenderViewHost*>( - contents()->render_manager()->pending_render_view_host()); + contents()->render_manager_for_testing()->pending_render_view_host()); } TestRenderViewHost* RenderViewHostTestHarness::active_rvh() { diff --git a/content/browser/resolve_proxy_msg_helper.h b/content/browser/resolve_proxy_msg_helper.h index f728cf1..10289a3 100644 --- a/content/browser/resolve_proxy_msg_helper.h +++ b/content/browser/resolve_proxy_msg_helper.h @@ -11,6 +11,7 @@ #include "base/memory/ref_counted.h" #include "content/browser/browser_message_filter.h" +#include "content/common/content_export.h" #include "googleurl/src/gurl.h" #include "net/base/completion_callback.h" #include "net/proxy/proxy_service.h" @@ -29,7 +30,7 @@ class URLRequestContextGetter; // the stored IPC::Message pointers for pending requests. // // This object is expected to live on the IO thread. -class ResolveProxyMsgHelper : public BrowserMessageFilter { +class CONTENT_EXPORT ResolveProxyMsgHelper : public BrowserMessageFilter { public: explicit ResolveProxyMsgHelper(net::URLRequestContextGetter* getter); // Constructor used by unittests. diff --git a/content/browser/speech/endpointer/endpointer.h b/content/browser/speech/endpointer/endpointer.h index c8cf80a..2d74839 100644 --- a/content/browser/speech/endpointer/endpointer.h +++ b/content/browser/speech/endpointer/endpointer.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 @@ #include "base/basictypes.h" #include "content/browser/speech/endpointer/energy_endpointer.h" +#include "content/common/content_export.h" class EpStatus; @@ -40,7 +41,7 @@ namespace speech_input { // The timeout length is speech_input_complete_silence_length until // long_speech_length, when it changes to // long_speech_input_complete_silence_length. -class Endpointer { +class CONTENT_EXPORT Endpointer { public: explicit Endpointer(int sample_rate); diff --git a/content/browser/speech/endpointer/energy_endpointer.h b/content/browser/speech/endpointer/energy_endpointer.h index 061571b..b440c4d 100644 --- a/content/browser/speech/endpointer/energy_endpointer.h +++ b/content/browser/speech/endpointer/energy_endpointer.h @@ -42,6 +42,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "content/browser/speech/endpointer/energy_endpointer_params.h" +#include "content/common/content_export.h" namespace speech_input { @@ -54,7 +55,7 @@ enum EpStatus { EP_POST_SPEECH, }; -class EnergyEndpointer { +class CONTENT_EXPORT EnergyEndpointer { public: // The default construction MUST be followed by Init(), before any // other use can be made of the instance. diff --git a/content/browser/speech/endpointer/energy_endpointer_params.h b/content/browser/speech/endpointer/energy_endpointer_params.h index 5fd923d..5a3ea42 100644 --- a/content/browser/speech/endpointer/energy_endpointer_params.h +++ b/content/browser/speech/endpointer/energy_endpointer_params.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. @@ -6,11 +6,12 @@ #define CONTENT_BROWSER_SPEECH_ENDPOINTER_ENERGY_ENDPOINTER_PARAMS_H_ #include "base/basictypes.h" +#include "content/common/content_export.h" namespace speech_input { // Input parameters for the EnergyEndpointer class. -class EnergyEndpointerParams { +class CONTENT_EXPORT EnergyEndpointerParams { public: EnergyEndpointerParams(); diff --git a/content/browser/speech/speech_recognition_request.h b/content/browser/speech/speech_recognition_request.h index 4ff780a..c4be1d2 100644 --- a/content/browser/speech/speech_recognition_request.h +++ b/content/browser/speech/speech_recognition_request.h @@ -29,7 +29,7 @@ namespace speech_input { class SpeechRecognitionRequest : public URLFetcher::Delegate { public: // ID passed to URLFetcher::Create(). Used for testing. - static int url_fetcher_id_for_tests; + CONTENT_EXPORT static int url_fetcher_id_for_tests; // Interface for receiving callbacks from this object. class CONTENT_EXPORT Delegate { @@ -42,25 +42,26 @@ class SpeechRecognitionRequest : public URLFetcher::Delegate { }; // |url| is the server address to which the request wil be sent. - SpeechRecognitionRequest(net::URLRequestContextGetter* context, - Delegate* delegate); + CONTENT_EXPORT SpeechRecognitionRequest(net::URLRequestContextGetter* context, + Delegate* delegate); - virtual ~SpeechRecognitionRequest(); + CONTENT_EXPORT virtual ~SpeechRecognitionRequest(); // Sends a new request with the given audio data, returns true if successful. // The same object can be used to send multiple requests but only after the // previous request has completed. - void Start(const std::string& language, - const std::string& grammar, - bool censor_results, - const std::string& hardware_info, - const std::string& origin_url, - const std::string& content_type); + CONTENT_EXPORT void Start(const std::string& language, + const std::string& grammar, + bool censor_results, + const std::string& hardware_info, + const std::string& origin_url, + const std::string& content_type); // Send a single chunk of audio immediately to the server. - void UploadAudioChunk(const std::string& audio_data, bool is_last_chunk); + CONTENT_EXPORT void UploadAudioChunk(const std::string& audio_data, + bool is_last_chunk); - bool HasPendingRequest() { return url_fetcher_ != NULL; } + CONTENT_EXPORT bool HasPendingRequest() { return url_fetcher_ != NULL; } // URLFetcher::Delegate methods. virtual void OnURLFetchComplete(const URLFetcher* source) OVERRIDE; diff --git a/content/browser/tab_contents/render_view_host_manager.h b/content/browser/tab_contents/render_view_host_manager.h index 1fe6a4f..022c9f3 100644 --- a/content/browser/tab_contents/render_view_host_manager.h +++ b/content/browser/tab_contents/render_view_host_manager.h @@ -106,7 +106,7 @@ class RenderViewHostManager // Returns the view associated with the current RenderViewHost, or NULL if // there is no current one. - RenderWidgetHostView* GetRenderWidgetHostView() const; + CONTENT_EXPORT RenderWidgetHostView* GetRenderWidgetHostView() const; // Returns the pending render view host, or NULL if there is no pending one. RenderViewHost* pending_render_view_host() const { diff --git a/content/browser/tab_contents/render_view_host_manager_unittest.cc b/content/browser/tab_contents/render_view_host_manager_unittest.cc index 4b07ea18..f1492b3 100644 --- a/content/browser/tab_contents/render_view_host_manager_unittest.cc +++ b/content/browser/tab_contents/render_view_host_manager_unittest.cc @@ -75,7 +75,7 @@ TEST_F(RenderViewHostManagerTest, NewTabPageProcesses) { contents2.controller().LoadURL(kNtpUrl, GURL(), PageTransition::LINK, std::string()); TestRenderViewHost* ntp_rvh2 = static_cast<TestRenderViewHost*>( - contents2.render_manager()->current_host()); + contents2.render_manager_for_testing()->current_host()); EXPECT_FALSE(contents2.cross_navigation_pending()); ntp_rvh2->SendNavigate(100, kNtpUrl); @@ -85,7 +85,7 @@ TEST_F(RenderViewHostManagerTest, NewTabPageProcesses) { std::string()); EXPECT_TRUE(contents2.cross_navigation_pending()); TestRenderViewHost* dest_rvh2 = static_cast<TestRenderViewHost*>( - contents2.render_manager()->pending_render_view_host()); + contents2.render_manager_for_testing()->pending_render_view_host()); ASSERT_TRUE(dest_rvh2); ntp_rvh2->SendShouldCloseACK(true); dest_rvh2->SendNavigate(101, kDestUrl); @@ -104,7 +104,7 @@ TEST_F(RenderViewHostManagerTest, NewTabPageProcesses) { contents2.controller().LoadURL(kNtpUrl, GURL(), PageTransition::LINK, std::string()); dest_rvh2->SendShouldCloseACK(true); - static_cast<TestRenderViewHost*>(contents2.render_manager()-> + static_cast<TestRenderViewHost*>(contents2.render_manager_for_testing()-> pending_render_view_host())->SendNavigate(102, kNtpUrl); dest_rvh2->OnSwapOutACK(); @@ -348,7 +348,8 @@ TEST_F(RenderViewHostManagerTest, PageDoesBackAndReload) { // We should have a new pending RVH. // Note that in this case, the navigation has not committed, so evil_rvh will // not be deleted yet. - EXPECT_NE(evil_rvh, contents()->render_manager()->pending_render_view_host()); + EXPECT_NE(evil_rvh, contents()->render_manager_for_testing()-> + pending_render_view_host()); // Before that RVH has committed, the evil page reloads itself. ViewHostMsg_FrameNavigate_Params params; @@ -364,8 +365,9 @@ TEST_F(RenderViewHostManagerTest, PageDoesBackAndReload) { // That should have cancelled the pending RVH, and the evil RVH should be the // current one. - EXPECT_TRUE(contents()->render_manager()->pending_render_view_host() == NULL); - EXPECT_EQ(evil_rvh, contents()->render_manager()->current_host()); + EXPECT_TRUE(contents()->render_manager_for_testing()-> + pending_render_view_host() == NULL); + EXPECT_EQ(evil_rvh, contents()->render_manager_for_testing()->current_host()); // Also we should not have a pending navigation entry. NavigationEntry* entry = contents()->controller().GetActiveEntry(); diff --git a/content/browser/tab_contents/tab_contents.h b/content/browser/tab_contents/tab_contents.h index 64bca21..0943f31 100644 --- a/content/browser/tab_contents/tab_contents.h +++ b/content/browser/tab_contents/tab_contents.h @@ -247,10 +247,10 @@ class CONTENT_EXPORT TabContents : public PageNavigator, // returns false. bool NeedToFireBeforeUnload(); -#ifdef UNIT_TEST // Expose the render manager for testing. - RenderViewHostManager* render_manager() { return &render_manager_; } -#endif + RenderViewHostManager* render_manager_for_testing() { + return &render_manager_; + } // In the underlying RenderViewHostManager, swaps in the provided // RenderViewHost to replace the current RenderViewHost. The current RVH diff --git a/content/browser/trace_controller.h b/content/browser/trace_controller.h index 1e7d41b..0214906 100644 --- a/content/browser/trace_controller.h +++ b/content/browser/trace_controller.h @@ -20,7 +20,7 @@ class TraceMessageFilter; // Objects interested in receiving trace data derive from TraceSubscriber. // See also: trace_message_filter.h // See also: child_trace_message_filter.h -class TraceSubscriber { +class CONTENT_EXPORT TraceSubscriber { public: // Called once after TraceController::EndTracingAsync. virtual void OnEndTracingComplete() = 0; diff --git a/content/browser/trace_subscriber_stdio.h b/content/browser/trace_subscriber_stdio.h index 9220380..15bf41b 100644 --- a/content/browser/trace_subscriber_stdio.h +++ b/content/browser/trace_subscriber_stdio.h @@ -10,9 +10,10 @@ #include "base/file_util.h" #include "content/browser/trace_controller.h" +#include "content/common/content_export.h" // Stdio implementation of TraceSubscriber. Use this to write traces to a file. -class TraceSubscriberStdio : public TraceSubscriber { +class CONTENT_EXPORT TraceSubscriberStdio : public TraceSubscriber { public: TraceSubscriberStdio(); // Creates or overwrites the specified file. Check IsValid() for success. diff --git a/content/browser/webui/empty_web_ui_factory.h b/content/browser/webui/empty_web_ui_factory.h index ce5c0d1..670a6b4 100644 --- a/content/browser/webui/empty_web_ui_factory.h +++ b/content/browser/webui/empty_web_ui_factory.h @@ -7,11 +7,12 @@ #include "base/memory/singleton.h" #include "content/browser/webui/web_ui_factory.h" +#include "content/common/content_export.h" namespace content { // A stubbed out version of WebUIFactory. -class EmptyWebUIFactory : public content::WebUIFactory { +class CONTENT_EXPORT EmptyWebUIFactory : public content::WebUIFactory { public: // Returns the singleton instance. static EmptyWebUIFactory* GetInstance(); diff --git a/content/browser/webui/web_ui_factory.h b/content/browser/webui/web_ui_factory.h index 74c20df..a32cb94 100644 --- a/content/browser/webui/web_ui_factory.h +++ b/content/browser/webui/web_ui_factory.h @@ -7,6 +7,7 @@ #pragma once #include "content/browser/webui/web_ui.h" +#include "content/common/content_export.h" class TabContents; class GURL; @@ -17,7 +18,7 @@ class BrowserContext; // Interface for an object which controls which URLs are considered WebUI URLs // and creates WebUI instances for given URLs. -class WebUIFactory { +class CONTENT_EXPORT WebUIFactory { public: // Returns a WebUI instance for the given URL, or NULL if the URL doesn't // correspond to a WebUI. |