diff options
author | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-30 00:28:14 +0000 |
---|---|---|
committer | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-30 00:28:14 +0000 |
commit | 03ff5e59b44cc3ad7bfc80e01af2d8bf53dcc34b (patch) | |
tree | 4890392665cbbec1941db05fa7b1ed68d9b79c46 | |
parent | 1347570839022dfc6b51ad0580352a7585b21562 (diff) | |
download | chromium_src-03ff5e59b44cc3ad7bfc80e01af2d8bf53dcc34b.zip chromium_src-03ff5e59b44cc3ad7bfc80e01af2d8bf53dcc34b.tar.gz chromium_src-03ff5e59b44cc3ad7bfc80e01af2d8bf53dcc34b.tar.bz2 |
Here are more exports needed for content_unittests to link in the component build.
R=jam@chromium.org, darin@chromium.org
BUG=90442
TEST=
Review URL: http://codereview.chromium.org/8054037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103394 0039d316-1c4b-4281-b951-d872f2087c98
88 files changed, 240 insertions, 159 deletions
diff --git a/chrome/browser/accessibility/renderer_accessibility_browsertest.cc b/chrome/browser/accessibility/renderer_accessibility_browsertest.cc index 30ddd0d..4ca308a 100644 --- a/chrome/browser/accessibility/renderer_accessibility_browsertest.cc +++ b/chrome/browser/accessibility/renderer_accessibility_browsertest.cc @@ -43,7 +43,7 @@ class RendererAccessibilityBrowserTest : public InProcessBrowserTest { view_host->set_save_accessibility_tree_for_testing(true); view_host->EnableRendererAccessibility(); tree_updated_observer.Wait(); - return view_host->accessibility_tree(); + return view_host->accessibility_tree_for_testing(); } // Make sure each node in the tree has an unique id. diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc index bb89457..74452f9 100644 --- a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc +++ b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc @@ -176,8 +176,8 @@ void GeolocationPermissionContextTests::AddNewTab(const GURL& url) { new TabContents(profile(), NULL, MSG_ROUTING_NONE, NULL, NULL); new_tab->controller().LoadURL(url, GURL(), PageTransition::TYPED, std::string()); - static_cast<TestRenderViewHost*>(new_tab->render_manager()->current_host())-> - SendNavigate(extra_tabs_.size() + 1, url); + static_cast<TestRenderViewHost*>(new_tab->render_manager_for_testing()-> + current_host())->SendNavigate(extra_tabs_.size() + 1, url); extra_tabs_.push_back(new TabContentsWrapper(new_tab)); } diff --git a/chrome/browser/printing/print_preview_tab_controller_unittest.cc b/chrome/browser/printing/print_preview_tab_controller_unittest.cc index beb54b2..16b79df 100644 --- a/chrome/browser/printing/print_preview_tab_controller_unittest.cc +++ b/chrome/browser/printing/print_preview_tab_controller_unittest.cc @@ -88,7 +88,8 @@ TEST_F(PrintPreviewTabControllerUnitTest, TitleAfterReload) { // Set up a PrintPreviewUI for |preview_tab|. PrintPreviewUI* preview_ui = new PrintPreviewUI(preview_tab->tab_contents()); // RenderViewHostManager takes ownership of |preview_ui|. - preview_tab->tab_contents()->render_manager()->SetWebUIPostCommit(preview_ui); + preview_tab->tab_contents()->render_manager_for_testing()-> + SetWebUIPostCommit(preview_ui); // Simulate a reload event on |preview_tab|. scoped_ptr<NavigationEntry> entry; diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc index d55bbe4..f5d5a16 100644 --- a/chrome/browser/tab_contents/web_contents_unittest.cc +++ b/chrome/browser/tab_contents/web_contents_unittest.cc @@ -307,7 +307,7 @@ TEST_F(TabContentsTest, CrossSiteBoundaries) { EXPECT_NE(instance1, instance2); EXPECT_TRUE(contents()->pending_rvh() == NULL); // We keep the original RVH around, swapped out. - EXPECT_TRUE(contents()->render_manager()->IsSwappedOut(orig_rvh)); + EXPECT_TRUE(contents()->render_manager_for_testing()->IsSwappedOut(orig_rvh)); EXPECT_EQ(orig_rvh_delete_count, 0); // Going back should switch SiteInstances again. The first SiteInstance is @@ -329,7 +329,8 @@ TEST_F(TabContentsTest, CrossSiteBoundaries) { EXPECT_EQ(goback_rvh, contents()->render_view_host()); EXPECT_EQ(instance1, contents()->GetSiteInstance()); // The pending RVH should now be swapped out, not deleted. - EXPECT_TRUE(contents()->render_manager()->IsSwappedOut(pending_rvh)); + EXPECT_TRUE(contents()->render_manager_for_testing()-> + IsSwappedOut(pending_rvh)); EXPECT_EQ(pending_rvh_delete_count, 0); // Close tab and ensure RVHs are deleted. @@ -772,7 +773,7 @@ TEST_F(TabContentsTest, CrossSiteCantPreemptAfterUnload) { // Simulate the pending renderer's response, which leads to an unload request // being sent to orig_rvh. - contents()->render_manager()->OnCrossSiteResponse(0, 0); + contents()->render_manager_for_testing()->OnCrossSiteResponse(0, 0); // Suppose the original renderer navigates now, while the unload request is in // flight. We should ignore it, wait for the unload ack, and let the pending diff --git a/chrome/browser/ui/webui/web_ui_unittest.cc b/chrome/browser/ui/webui/web_ui_unittest.cc index ee231e1..cc41f1a 100644 --- a/chrome/browser/ui/webui/web_ui_unittest.cc +++ b/chrome/browser/ui/webui/web_ui_unittest.cc @@ -64,10 +64,10 @@ class WebUITest : public TabContentsWrapperTestHarness { // process transition, and our RVH pointer will be the "committed" one. // In the second call to this function from WebUIToStandard, it won't // actually be pending, which is the point of this test. - if (contents->render_manager()->pending_render_view_host()) { + if (contents->render_manager_for_testing()->pending_render_view_host()) { static_cast<TestRenderViewHost*>( - contents->render_manager()->pending_render_view_host())->SendNavigate( - page_id + 1, next_url); + contents->render_manager_for_testing()-> + pending_render_view_host())->SendNavigate(page_id + 1, next_url); } else { static_cast<TestRenderViewHost*>( contents->render_view_host())->SendNavigate(page_id + 1, next_url); diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc index 4fb7e6e..c664f77 100644 --- a/chrome/test/base/ui_test_utils.cc +++ b/chrome/test/base/ui_test_utils.cc @@ -281,7 +281,8 @@ void WaitForBrowserActionUpdated(ExtensionAction* browser_action) { void WaitForLoadStop(TabContents* tab) { // In many cases, the load may have finished before we get here. Only wait if // the tab still has a pending navigation. - if (!tab->IsLoading() && !tab->render_manager()->pending_render_view_host()) + if (!tab->IsLoading() && + !tab->render_manager_for_testing()->pending_render_view_host()) return; TestNotificationObserver observer; RegisterAndWait(&observer, content::NOTIFICATION_LOAD_STOP, 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. diff --git a/content/common/content_constants.h b/content/common/content_constants.h index dd3a9d4..20d4840 100644 --- a/content/common/content_constants.h +++ b/content/common/content_constants.h @@ -14,7 +14,7 @@ namespace content { -extern const unsigned int kMaxRendererProcessCount; +CONTENT_EXPORT extern const unsigned int kMaxRendererProcessCount; // The maximum number of session history entries per tab. extern const int kMaxSessionHistoryEntries; diff --git a/content/common/geoposition.h b/content/common/geoposition.h index 9f8f14e..cff59ae 100644 --- a/content/common/geoposition.h +++ b/content/common/geoposition.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. @@ -12,10 +12,11 @@ #include <string> #include "base/time.h" +#include "content/common/content_export.h" // The internal representation of a geo position. Some properties use different // types when passed to JavaScript. -struct Geoposition { +struct CONTENT_EXPORT Geoposition { public: // Error codes for returning to JavaScript. These values are defined by the // W3C spec. Note that Gears does not use all of these codes, but we need diff --git a/content/common/gpu/gpu_feature_flags.h b/content/common/gpu/gpu_feature_flags.h index 47ec196..b48ec97 100644 --- a/content/common/gpu/gpu_feature_flags.h +++ b/content/common/gpu/gpu_feature_flags.h @@ -14,7 +14,7 @@ #include "base/basictypes.h" #include "content/common/content_export.h" -class GpuFeatureFlags { +class CONTENT_EXPORT GpuFeatureFlags { public: enum GpuFeatureType { kGpuFeatureAccelerated2dCanvas = 1 << 0, @@ -34,7 +34,7 @@ class GpuFeatureFlags { // flags are OR combination of GpuFeatureType. void set_flags(uint32 flags); - CONTENT_EXPORT uint32 flags() const; + uint32 flags() const; // Resets each flag by OR with the corresponding flag in "other". void Combine(const GpuFeatureFlags& other); diff --git a/content/common/gpu/gpu_info.h b/content/common/gpu/gpu_info.h index 678cb86..46fbf90 100644 --- a/content/common/gpu/gpu_info.h +++ b/content/common/gpu/gpu_info.h @@ -15,8 +15,9 @@ #include "base/time.h" #include "build/build_config.h" #include "content/common/dx_diag_node.h" +#include "content/common/content_export.h" -struct GPUInfo { +struct CONTENT_EXPORT GPUInfo { GPUInfo(); ~GPUInfo(); diff --git a/content/common/media/media_stream_options.h b/content/common/media/media_stream_options.h index de738e3..77533b3 100644 --- a/content/common/media/media_stream_options.h +++ b/content/common/media/media_stream_options.h @@ -8,12 +8,14 @@ #include <string> #include <vector> +#include "content/common/content_export.h" + namespace media_stream { // StreamOptions is a Chromium representation of WebKit's // WebGenerateStreamOptionFlags. It describes the components in a request for a // new media stream. -struct StreamOptions { +struct CONTENT_EXPORT StreamOptions { enum VideoOption { kNoCamera = 0, kFacingUser, @@ -41,7 +43,7 @@ enum MediaStreamType { }; // StreamDeviceInfo describes information about a device. -struct StreamDeviceInfo { +struct CONTENT_EXPORT StreamDeviceInfo { static const int kNoId; StreamDeviceInfo(); diff --git a/content/common/request_extra_data.h b/content/common/request_extra_data.h index 9ca3021a..96f8029 100644 --- a/content/common/request_extra_data.h +++ b/content/common/request_extra_data.h @@ -6,12 +6,15 @@ #define CONTENT_COMMON_REQUEST_EXTRA_DATA_H_ #pragma once +#include "base/compiler_specific.h" +#include "content/common/content_export.h" #include "content/common/page_transition_types.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" // The RenderView stores an instance of this class in the "extra data" of each // ResourceRequest (see RenderView::willSendRequest). -class RequestExtraData : public WebKit::WebURLRequest::ExtraData { +class CONTENT_EXPORT RequestExtraData + : NON_EXPORTED_BASE(public WebKit::WebURLRequest::ExtraData) { public: RequestExtraData(bool is_main_frame, int64 frame_id, diff --git a/content/common/resource_dispatcher.h b/content/common/resource_dispatcher.h index 15d7b1f..fd400fe 100644 --- a/content/common/resource_dispatcher.h +++ b/content/common/resource_dispatcher.h @@ -15,6 +15,7 @@ #include "base/memory/linked_ptr.h" #include "base/shared_memory.h" #include "base/task.h" +#include "content/common/content_export.h" #include "ipc/ipc_channel.h" #include "webkit/glue/resource_loader_bridge.h" @@ -24,7 +25,7 @@ struct ResourceResponseHead; // This class serves as a communication interface between the // ResourceDispatcherHost in the browser process and the ResourceLoaderBridge in // the child process. It can be used from any child process. -class ResourceDispatcher : public IPC::Channel::Listener { +class CONTENT_EXPORT ResourceDispatcher : public IPC::Channel::Listener { public: explicit ResourceDispatcher(IPC::Message::Sender* sender); virtual ~ResourceDispatcher(); diff --git a/content/common/resource_messages.h b/content/common/resource_messages.h index 15d505b..85aa035 100644 --- a/content/common/resource_messages.h +++ b/content/common/resource_messages.h @@ -12,6 +12,8 @@ #include "net/base/upload_data.h" #define IPC_MESSAGE_START ResourceMsgStart +#undef IPC_MESSAGE_EXPORT +#define IPC_MESSAGE_EXPORT CONTENT_EXPORT IPC_STRUCT_TRAITS_BEGIN(webkit_glue::ResourceResponseInfo) IPC_STRUCT_TRAITS_MEMBER(request_time) diff --git a/content/common/url_constants.h b/content/common/url_constants.h index 78f7e2f..801f1abd 100644 --- a/content/common/url_constants.h +++ b/content/common/url_constants.h @@ -41,7 +41,7 @@ CONTENT_EXPORT extern const char kStandardSchemeSeparator[]; // About URLs (including schemes). CONTENT_EXPORT extern const char kAboutBlankURL[]; -extern const char kAboutCrashURL[]; +CONTENT_EXPORT extern const char kAboutCrashURL[]; // Special URL used to start a navigation to an error page. extern const char kUnreachableWebDataURL[]; diff --git a/content/content.gyp b/content/content.gyp index cdc8712..be3f85c 100644 --- a/content/content.gyp +++ b/content/content.gyp @@ -12,6 +12,9 @@ 'content_shell.gypi', 'content_tests.gypi', ], + 'target_defaults': { + 'defines': ['CONTENT_IMPLEMENTATION'], + }, 'conditions': [ # In component mode, we build all of content as a single DLL. # However, in the static mode, we need to build content as multiple @@ -21,11 +24,6 @@ # chrome_exe to have to depend on allocator). # TODO(dpranke): Uncomment: ['component == "static_library"', { ['1 == 1', { - 'target_defaults': { - 'defines': [ - 'CONTENT_IMPLEMENTATION', - ], - }, 'targets': [ {'target_name': 'content', 'type': 'none', @@ -122,6 +120,7 @@ 'targets': [ { 'target_name': 'closure_blocks_leopard_compat', + 'defines!': ['CONTENT_IMPLEMENTATION'], 'conditions': [ ['mac_sdk == "10.5"', { 'type': 'shared_library', @@ -182,9 +181,6 @@ }, { # component != static_library 'target_defaults': { - 'defines': [ - 'CONTENT_IMPLEMENTATION', - ], }, 'targets': [ {'target_name': 'content', diff --git a/content/content_shell.gypi b/content/content_shell.gypi index b1ad775..2634d77 100644 --- a/content/content_shell.gypi +++ b/content/content_shell.gypi @@ -7,6 +7,7 @@ { 'target_name': 'content_shell', 'type': 'executable', + 'defines!': ['CONTENT_IMPLEMENTATION'], 'variables': { 'chromium_code': 1, }, diff --git a/content/content_tests.gypi b/content/content_tests.gypi index bc67eb2..998c9078 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -7,12 +7,16 @@ { 'target_name': 'test_support_content', 'type': 'static_library', + 'defines!': ['CONTENT_IMPLEMENTATION'], 'dependencies': [ + '../build/temp_gyp/googleurl.gyp:googleurl', 'content_common', '../skia/skia.gyp:skia', '../testing/gmock.gyp:gmock', '../testing/gtest.gyp:gtest', + '../ui/gfx/surface/surface.gyp:surface', '../ui/ui.gyp:ui_test_support', + '../webkit/support/webkit_support.gyp:appcache', ], 'include_dirs': [ '..', @@ -72,6 +76,7 @@ { 'target_name': 'content_unittests', 'type': 'executable', + 'defines!': ['CONTENT_IMPLEMENTATION'], 'dependencies': [ 'content_browser', 'content_gpu', @@ -79,6 +84,7 @@ 'content_renderer', 'test_support_content', '../base/base.gyp:test_support_base', + '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../crypto/crypto.gyp:crypto', '../gpu/gpu.gyp:gpu_unittest_utils', '../ipc/ipc.gyp:test_support_ipc', @@ -90,6 +96,8 @@ '../third_party/libjingle/libjingle.gyp:libjingle', '../ui/gfx/gl/gl.gyp:gl', '../ui/ui.gyp:ui', + '../webkit/support/webkit_support.gyp:glue', + '../webkit/support/webkit_support.gyp:quota', ], 'include_dirs': [ '..', @@ -200,6 +208,7 @@ 'targets': [ { 'target_name': 'omx_video_decode_accelerator_unittest', + 'defines!': ['CONTENT_IMPLEMENTATION'], 'type': 'executable', 'dependencies': [ '../base/base.gyp:base', diff --git a/content/gpu/gpu_info_collector.h b/content/gpu/gpu_info_collector.h index f911c9c..d2a42ef 100644 --- a/content/gpu/gpu_info_collector.h +++ b/content/gpu/gpu_info_collector.h @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "build/build_config.h" +#include "content/common/content_export.h" #include "content/common/gpu/gpu_info.h" struct IDirect3D9; @@ -29,19 +30,20 @@ bool CollectPreliminaryGraphicsInfo(GPUInfo* gpu_info); // The selection between the two methods is done in the cc file. // A D3D argument is passed in for testing purposes -bool CollectGraphicsInfoD3D(IDirect3D9* d3d, GPUInfo* gpu_info); +bool CONTENT_EXPORT CollectGraphicsInfoD3D(IDirect3D9* d3d, GPUInfo* gpu_info); // Collects D3D driver version/date through registry lookup. // Note that this does not require a D3D context. // device_id here is the raw data in DISPLAY_DEVICE. -bool CollectDriverInfoD3D(const std::wstring& device_id, GPUInfo* gpu_info); +bool CONTENT_EXPORT CollectDriverInfoD3D(const std::wstring& device_id, + GPUInfo* gpu_info); // Collect the DirectX Disagnostics information about the attached displays. bool GetDxDiagnostics(DxDiagNode* output); #endif // All platforms have a GL version for collecting information -bool CollectGraphicsInfoGL(GPUInfo* gpu_info); +bool CONTENT_EXPORT CollectGraphicsInfoGL(GPUInfo* gpu_info); // Collect GL and Shading language version information bool CollectGLVersionInfo(GPUInfo* gpu_info); diff --git a/content/renderer/active_notification_tracker.h b/content/renderer/active_notification_tracker.h index 7cfb5ae..4a445a8 100644 --- a/content/renderer/active_notification_tracker.h +++ b/content/renderer/active_notification_tracker.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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. @@ -11,6 +11,7 @@ #include "base/basictypes.h" #include "base/id_map.h" #include "base/hash_tables.h" +#include "content/common/content_export.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebNotification.h" namespace WebKit { @@ -20,7 +21,7 @@ class WebNotificationPermissionCallback; // This class manages the set of active Notification objects in either // a render or worker process. This class should be accessed only on // the main thread. -class ActiveNotificationTracker { +class CONTENT_EXPORT ActiveNotificationTracker { public: ActiveNotificationTracker(); ~ActiveNotificationTracker(); diff --git a/content/renderer/media/audio_message_filter.h b/content/renderer/media/audio_message_filter.h index 68b8460..0f98cfa 100644 --- a/content/renderer/media/audio_message_filter.h +++ b/content/renderer/media/audio_message_filter.h @@ -16,6 +16,7 @@ #include "base/shared_memory.h" #include "base/sync_socket.h" #include "content/common/media/audio_stream_state.h" +#include "content/common/content_export.h" #include "ipc/ipc_channel_proxy.h" #include "media/audio/audio_buffers_state.h" @@ -25,9 +26,10 @@ namespace base { class Time; } -class AudioMessageFilter : public IPC::ChannelProxy::MessageFilter { +class CONTENT_EXPORT AudioMessageFilter + : public IPC::ChannelProxy::MessageFilter { public: - class Delegate { + class CONTENT_EXPORT Delegate { public: // Called when an audio packet is requested from the browser process. virtual void OnRequestPacket(AudioBuffersState buffers_state) = 0; diff --git a/content/renderer/media/audio_renderer_impl.h b/content/renderer/media/audio_renderer_impl.h index 802e1ae..22d4b6f 100644 --- a/content/renderer/media/audio_renderer_impl.h +++ b/content/renderer/media/audio_renderer_impl.h @@ -44,6 +44,7 @@ #include "base/shared_memory.h" #include "base/synchronization/lock.h" #include "base/threading/simple_thread.h" +#include "content/common/content_export.h" #include "content/renderer/media/audio_message_filter.h" #include "media/audio/audio_io.h" #include "media/audio/audio_manager.h" @@ -52,7 +53,7 @@ class AudioMessageFilter; -class AudioRendererImpl +class CONTENT_EXPORT AudioRendererImpl : public media::AudioRendererBase, public AudioMessageFilter::Delegate, public base::DelegateSimpleThread::Delegate, diff --git a/content/renderer/media/capture_video_decoder.h b/content/renderer/media/capture_video_decoder.h index f616700..0c874ab 100644 --- a/content/renderer/media/capture_video_decoder.h +++ b/content/renderer/media/capture_video_decoder.h @@ -8,6 +8,7 @@ #include <deque> #include "base/time.h" +#include "content/common/content_export.h" #include "media/base/demuxer_stream.h" #include "media/base/filters.h" #include "media/base/video_frame.h" @@ -20,7 +21,7 @@ class VideoCaptureImplManager; // A filter takes raw frames from video capture engine and passes them to media // engine as a video decoder filter. -class CaptureVideoDecoder +class CONTENT_EXPORT CaptureVideoDecoder : public media::VideoDecoder, public media::VideoCapture::EventHandler { public: diff --git a/content/renderer/media/media_stream_dispatcher.h b/content/renderer/media/media_stream_dispatcher.h index d154c8b..deb543c 100644 --- a/content/renderer/media/media_stream_dispatcher.h +++ b/content/renderer/media/media_stream_dispatcher.h @@ -11,6 +11,7 @@ #include "base/basictypes.h" #include "base/message_loop.h" +#include "content/common/content_export.h" #include "content/common/media/media_stream_options.h" #include "content/renderer/media/media_stream_dispatcher_eventhandler.h" #include "content/renderer/render_view_observer.h" @@ -20,7 +21,7 @@ // and Audio input devices. // It's the complement of MediaStreamDispatcherHost (owned by // BrowserRenderProcessHost). -class MediaStreamDispatcher : public RenderViewObserver { +class CONTENT_EXPORT MediaStreamDispatcher : public RenderViewObserver { public: explicit MediaStreamDispatcher(RenderView* render_view); virtual ~MediaStreamDispatcher(); diff --git a/content/renderer/media/media_stream_dispatcher_eventhandler.h b/content/renderer/media/media_stream_dispatcher_eventhandler.h index 4388eea..134801e 100644 --- a/content/renderer/media/media_stream_dispatcher_eventhandler.h +++ b/content/renderer/media/media_stream_dispatcher_eventhandler.h @@ -7,9 +7,10 @@ #include <string> +#include "content/common/content_export.h" #include "content/common/media/media_stream_options.h" -class MediaStreamDispatcherEventHandler { +class CONTENT_EXPORT MediaStreamDispatcherEventHandler { public: // A new media stream have been created. virtual void OnStreamGenerated( diff --git a/content/renderer/media/rtc_video_decoder.h b/content/renderer/media/rtc_video_decoder.h index d5ffb7b..eb59e22 100644 --- a/content/renderer/media/rtc_video_decoder.h +++ b/content/renderer/media/rtc_video_decoder.h @@ -8,9 +8,11 @@ #include <deque> #include <string> +#include "base/compiler_specific.h" #include "base/gtest_prod_util.h" #include "base/synchronization/lock.h" #include "base/time.h" +#include "content/common/content_export.h" #include "media/base/filters.h" #include "media/base/video_frame.h" #include "third_party/libjingle/source/talk/session/phone/mediachannel.h" @@ -22,9 +24,9 @@ namespace cricket { class VideoFrame; } // namespace cricket -class RTCVideoDecoder +class CONTENT_EXPORT RTCVideoDecoder : public media::VideoDecoder, - public cricket::VideoRenderer { + NON_EXPORTED_BASE(public cricket::VideoRenderer) { public: RTCVideoDecoder(MessageLoop* message_loop, const std::string& url); virtual ~RTCVideoDecoder(); diff --git a/content/renderer/media/video_capture_impl.h b/content/renderer/media/video_capture_impl.h index 7cb76af..8e3f690 100644 --- a/content/renderer/media/video_capture_impl.h +++ b/content/renderer/media/video_capture_impl.h @@ -12,6 +12,7 @@ #include <list> #include <map> +#include "content/common/content_export.h" #include "content/renderer/media/video_capture_message_filter.h" #include "media/video/capture/video_capture.h" @@ -19,9 +20,8 @@ namespace base { class MessageLoopProxy; } -class VideoCaptureImpl - : public media::VideoCapture, - public VideoCaptureMessageFilter::Delegate { +class CONTENT_EXPORT VideoCaptureImpl + : public media::VideoCapture, public VideoCaptureMessageFilter::Delegate { public: // media::VideoCapture interface. virtual void StartCapture(media::VideoCapture::EventHandler* handler, diff --git a/content/renderer/media/video_capture_impl_manager.h b/content/renderer/media/video_capture_impl_manager.h index 282eb3c..8427957f 100644 --- a/content/renderer/media/video_capture_impl_manager.h +++ b/content/renderer/media/video_capture_impl_manager.h @@ -16,12 +16,13 @@ #include "base/threading/thread.h" #include "base/message_loop_proxy.h" #include "base/synchronization/lock.h" +#include "content/common/content_export.h" #include "media/video/capture/video_capture.h" class VideoCaptureImpl; class VideoCaptureMessageFilter; -class VideoCaptureImplManager +class CONTENT_EXPORT VideoCaptureImplManager : public base::RefCountedThreadSafe<VideoCaptureImplManager> { public: VideoCaptureImplManager(); diff --git a/content/renderer/media/video_capture_message_filter.h b/content/renderer/media/video_capture_message_filter.h index eecb339..6c67f8e 100644 --- a/content/renderer/media/video_capture_message_filter.h +++ b/content/renderer/media/video_capture_message_filter.h @@ -14,12 +14,14 @@ #include "base/message_loop_proxy.h" #include "base/shared_memory.h" +#include "content/common/content_export.h" #include "ipc/ipc_channel_proxy.h" #include "media/video/capture/video_capture.h" -class VideoCaptureMessageFilter : public IPC::ChannelProxy::MessageFilter { +class CONTENT_EXPORT VideoCaptureMessageFilter + : public IPC::ChannelProxy::MessageFilter { public: - class Delegate { + class CONTENT_EXPORT Delegate { public: // Called when a video frame buffer is created in the browser process. virtual void OnBufferCreated(base::SharedMemoryHandle handle, diff --git a/content/renderer/paint_aggregator.h b/content/renderer/paint_aggregator.h index 84d36907..23642a0 100644 --- a/content/renderer/paint_aggregator.h +++ b/content/renderer/paint_aggregator.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 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,11 +9,12 @@ #include <vector> #include "base/basictypes.h" +#include "content/common/content_export.h" #include "ui/gfx/rect.h" // This class is responsible for aggregating multiple invalidation and scroll // commands to produce a scroll and repaint sequence. -class PaintAggregator { +class CONTENT_EXPORT PaintAggregator { public: // This structure describes an aggregation of InvalidateRect and ScrollRect // calls. If |scroll_rect| is non-empty, then that rect should be scrolled @@ -22,7 +23,7 @@ class PaintAggregator { // are non-empty, then scrolling should be performed before repainting. // |scroll_delta| can only specify scrolling in one direction (i.e., the x // and y members cannot both be non-zero). - struct PendingUpdate { + struct CONTENT_EXPORT PendingUpdate { PendingUpdate(); ~PendingUpdate(); diff --git a/ipc/param_traits_macros.h b/ipc/param_traits_macros.h index df57adf..9b276e0 100644 --- a/ipc/param_traits_macros.h +++ b/ipc/param_traits_macros.h @@ -11,7 +11,7 @@ #define IPC_STRUCT_TRAITS_BEGIN(struct_name) \ namespace IPC { \ template <> \ - struct ParamTraits<struct_name> { \ + struct IPC_MESSAGE_EXPORT ParamTraits<struct_name> { \ typedef struct_name param_type; \ static void Write(Message* m, const param_type& p); \ static bool Read(const Message* m, void** iter, param_type* p); \ diff --git a/media/audio/audio_output_controller.h b/media/audio/audio_output_controller.h index 528f0d2..88c4e06 100644 --- a/media/audio/audio_output_controller.h +++ b/media/audio/audio_output_controller.h @@ -47,6 +47,8 @@ class MessageLoop; // In this mode a DataSource object is given to the AudioOutputController // and AudioOutputController reads from it synchronously. // +#include "media/base/media_export.h" + namespace media { class MEDIA_EXPORT AudioOutputController @@ -69,7 +71,7 @@ class MEDIA_EXPORT AudioOutputController // An event handler that receives events from the AudioOutputController. The // following methods are called on the audio controller thread. - class EventHandler { + class MEDIA_EXPORT EventHandler { public: virtual ~EventHandler() {} virtual void OnCreated(AudioOutputController* controller) = 0; diff --git a/media/video/capture/video_capture.h b/media/video/capture/video_capture.h index c4f6d70..ea2bd8f 100644 --- a/media/video/capture/video_capture.h +++ b/media/video/capture/video_capture.h @@ -10,12 +10,13 @@ #include "base/memory/ref_counted.h" #include "base/time.h" +#include "media/base/media_export.h" #include "media/base/video_frame.h" #include "media/video/capture/video_capture_types.h" namespace media { -class VideoCapture { +class MEDIA_EXPORT VideoCapture { public: // Current status of the video capture device in the browser process. Browser // process sends information about the current capture state and error to the diff --git a/webkit/appcache/appcache.h b/webkit/appcache/appcache.h index ca86740..fb7a90e 100644 --- a/webkit/appcache/appcache.h +++ b/webkit/appcache/appcache.h @@ -15,6 +15,7 @@ #include "googleurl/src/gurl.h" #include "webkit/appcache/appcache_database.h" #include "webkit/appcache/appcache_entry.h" +#include "webkit/appcache/appcache_export.h" #include "webkit/appcache/manifest_parser.h" namespace appcache { @@ -31,7 +32,7 @@ class AppCache : public base::RefCounted<AppCache> { typedef std::map<GURL, AppCacheEntry> EntryMap; typedef std::set<AppCacheHost*> AppCacheHosts; - AppCache(AppCacheService *service, int64 cache_id); + APPCACHE_EXPORT AppCache(AppCacheService *service, int64 cache_id); int64 cache_id() const { return cache_id_; } @@ -43,7 +44,7 @@ class AppCache : public base::RefCounted<AppCache> { AppCacheService* service() const { return service_; } // Adds a new entry. Entry must not already be in cache. - void AddEntry(const GURL& url, const AppCacheEntry& entry); + void APPCACHE_EXPORT AddEntry(const GURL& url, const AppCacheEntry& entry); // Adds a new entry or modifies an existing entry by merging the types // of the new entry with the existing entry. Returns true if a new entry diff --git a/webkit/appcache/appcache_database.h b/webkit/appcache/appcache_database.h index c19b6db..7e2dc3f 100644 --- a/webkit/appcache/appcache_database.h +++ b/webkit/appcache/appcache_database.h @@ -15,6 +15,7 @@ #include "base/memory/scoped_ptr.h" #include "base/time.h" #include "googleurl/src/gurl.h" +#include "webkit/appcache/appcache_export.h" namespace sql { class Connection; @@ -179,7 +180,7 @@ class AppCacheDatabase { const sql::Statement& statement, OnlineWhiteListRecord* record); // Database creation - bool LazyOpen(bool create_if_needed); + APPCACHE_EXPORT bool LazyOpen(bool create_if_needed); bool EnsureDatabaseVersion(); bool CreateSchema(); bool UpgradeSchema(); diff --git a/webkit/appcache/appcache_group.h b/webkit/appcache/appcache_group.h index 236b43d..3dd87bf 100644 --- a/webkit/appcache/appcache_group.h +++ b/webkit/appcache/appcache_group.h @@ -14,6 +14,7 @@ #include "base/observer_list.h" #include "base/task.h" #include "base/time.h" +#include "webkit/appcache/appcache_export.h" #include "googleurl/src/gurl.h" namespace appcache { @@ -42,8 +43,9 @@ class AppCacheGroup : public base::RefCounted<AppCacheGroup> { DOWNLOADING, }; - AppCacheGroup(AppCacheService* service, const GURL& manifest_url, - int64 group_id); + APPCACHE_EXPORT AppCacheGroup(AppCacheService* service, + const GURL& manifest_url, + int64 group_id); // Adds/removes an update observer, the AppCacheGroup does not take // ownership of the observer. @@ -62,7 +64,7 @@ class AppCacheGroup : public base::RefCounted<AppCacheGroup> { AppCache* newest_complete_cache() const { return newest_complete_cache_; } - void AddCache(AppCache* complete_cache); + APPCACHE_EXPORT void AddCache(AppCache* complete_cache); void RemoveCache(AppCache* cache); bool HasCache() const { return newest_complete_cache_ != NULL; } diff --git a/webkit/appcache/appcache_storage_impl.h b/webkit/appcache/appcache_storage_impl.h index dee3bed..3e7b0da 100644 --- a/webkit/appcache/appcache_storage_impl.h +++ b/webkit/appcache/appcache_storage_impl.h @@ -15,6 +15,7 @@ #include "base/task.h" #include "webkit/appcache/appcache_database.h" #include "webkit/appcache/appcache_disk_cache.h" +#include "webkit/appcache/appcache_export.h" #include "webkit/appcache/appcache_storage.h" namespace appcache { @@ -119,7 +120,7 @@ class AppCacheStorageImpl : public AppCacheStorage { const GURL& fallback_url, const AppCacheEntry& fallback_entry, int64 cache_id, const GURL& manifest_url); - AppCacheDiskCache* disk_cache(); + APPCACHE_EXPORT AppCacheDiskCache* disk_cache(); // The directory in which we place files in the file system. FilePath cache_directory_; |