diff options
author | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-30 23:47:49 +0000 |
---|---|---|
committer | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-30 23:47:49 +0000 |
commit | f3112a530100f9361f98c81aea8d9483a133a980 (patch) | |
tree | a6766b321c65636cfe96621ff54163e6fc1199f0 /content | |
parent | 08202909defd4f7890548dc73f1ec4e58fd0aec7 (diff) | |
download | chromium_src-f3112a530100f9361f98c81aea8d9483a133a980.zip chromium_src-f3112a530100f9361f98c81aea8d9483a133a980.tar.gz chromium_src-f3112a530100f9361f98c81aea8d9483a133a980.tar.bz2 |
more content exports needed for unit_tests and browser_tests.
R=jam@chromium.org
BUG=90442
TEST=
Review URL: http://codereview.chromium.org/8082019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103584 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
37 files changed, 91 insertions, 73 deletions
diff --git a/content/app/content_main.cc b/content/app/content_main.cc index 12cc816..6f16030 100644 --- a/content/app/content_main.cc +++ b/content/app/content_main.cc @@ -17,6 +17,7 @@ #include "base/string_number_conversions.h" #include "content/app/content_main_delegate.h" #include "content/app/startup_helper_win.h" +#include "content/browser/browser_main.h" #include "content/common/content_constants.h" #include "content/common/content_paths.h" #include "content/common/content_switches.h" @@ -57,7 +58,6 @@ int tc_set_new_mode(int mode); } #endif -extern int BrowserMain(const MainFunctionParams&); extern int GpuMain(const MainFunctionParams&); extern int PluginMain(const MainFunctionParams&); extern int PpapiPluginMain(const MainFunctionParams&); diff --git a/content/browser/accessibility/browser_accessibility.h b/content/browser/accessibility/browser_accessibility.h index 1426e5c..80a0250 100644 --- a/content/browser/accessibility/browser_accessibility.h +++ b/content/browser/accessibility/browser_accessibility.h @@ -12,6 +12,7 @@ #include "base/basictypes.h" #include "build/build_config.h" +#include "content/common/content_export.h" #include "webkit/glue/webaccessibility.h" class BrowserAccessibilityManager; @@ -39,7 +40,7 @@ typedef std::map<WebAccessibility::StringAttribute, string16> StringAttrMap; // APIs. // //////////////////////////////////////////////////////////////////////////////// -class BrowserAccessibility { +class CONTENT_EXPORT BrowserAccessibility { public: // Creates a platform specific BrowserAccessibility. Ownership passes to the // caller. diff --git a/content/browser/accessibility/browser_accessibility_manager.h b/content/browser/accessibility/browser_accessibility_manager.h index 0c9dde6..336c8af 100644 --- a/content/browser/accessibility/browser_accessibility_manager.h +++ b/content/browser/accessibility/browser_accessibility_manager.h @@ -34,7 +34,7 @@ class CONTENT_EXPORT BrowserAccessibilityDelegate { virtual gfx::Rect GetViewBounds() const = 0; }; -class BrowserAccessibilityFactory { +class CONTENT_EXPORT BrowserAccessibilityFactory { public: virtual ~BrowserAccessibilityFactory() {} @@ -44,7 +44,7 @@ class BrowserAccessibilityFactory { }; // Manages a tree of BrowserAccessibility objects. -class BrowserAccessibilityManager { +class CONTENT_EXPORT BrowserAccessibilityManager { public: // Creates the platform specific BrowserAccessibilityManager. Ownership passes // to the caller. diff --git a/content/browser/browser_main.h b/content/browser/browser_main.h index f45c72b..60abacd 100644 --- a/content/browser/browser_main.h +++ b/content/browser/browser_main.h @@ -127,4 +127,6 @@ class CONTENT_EXPORT BrowserMainParts { } // namespace content +CONTENT_EXPORT int BrowserMain(const MainFunctionParams& parameters); + #endif // CONTENT_BROWSER_BROWSER_MAIN_H_ diff --git a/content/browser/download/download_file_manager.h b/content/browser/download/download_file_manager.h index 0838e40..20a2b6a 100644 --- a/content/browser/download/download_file_manager.h +++ b/content/browser/download/download_file_manager.h @@ -68,13 +68,13 @@ class URLRequestContextGetter; } // Manages all in progress downloads. -class DownloadFileManager +class CONTENT_EXPORT DownloadFileManager : public base::RefCountedThreadSafe<DownloadFileManager> { public: explicit DownloadFileManager(ResourceDispatcherHost* rdh); // Called on shutdown on the UI thread. - CONTENT_EXPORT void Shutdown(); + void Shutdown(); // Called on UI thread to make DownloadFileManager start the download. void StartDownload(DownloadCreateInfo* info); diff --git a/content/browser/download/download_item.h b/content/browser/download/download_item.h index 2a9b8b9..c3d78ac 100644 --- a/content/browser/download/download_item.h +++ b/content/browser/download/download_item.h @@ -338,10 +338,7 @@ class CONTENT_EXPORT DownloadItem { std::string DebugString(bool verbose) const; -#ifdef UNIT_TEST - // Mock opening downloads (for testing only). - void TestMockDownloadOpen() { open_enabled_ = false; } -#endif + void MockDownloadOpenForTesting() { open_enabled_ = false; } private: // Construction common to all constructors. |active| should be true for new diff --git a/content/browser/download/download_types.h b/content/browser/download/download_types.h index 952b195..7ee8043 100644 --- a/content/browser/download/download_types.h +++ b/content/browser/download/download_types.h @@ -24,7 +24,7 @@ class IOBuffer; // waiting for the task to run on the file thread. Access to the write buffers // is synchronized via the lock. Each entry in 'contents' represents one data // buffer and its size in bytes. -struct DownloadBuffer { +struct CONTENT_EXPORT DownloadBuffer { DownloadBuffer(); ~DownloadBuffer(); diff --git a/content/browser/geolocation/access_token_store.h b/content/browser/geolocation/access_token_store.h index e40bb92..804f22b 100644 --- a/content/browser/geolocation/access_token_store.h +++ b/content/browser/geolocation/access_token_store.h @@ -45,8 +45,9 @@ class AccessTokenStore : public base::RefCountedThreadSafe<AccessTokenStore>, // so it is efficient to piggyback it onto this request. // Takes ownership of |callback|. // Returns a handle which can subsequently be used with CancelRequest(). - Handle LoadAccessTokens(CancelableRequestConsumerBase* consumer, - LoadAccessTokensCallbackType* callback); + CONTENT_EXPORT Handle LoadAccessTokens( + CancelableRequestConsumerBase* consumer, + LoadAccessTokensCallbackType* callback); virtual void SaveAccessToken( const GURL& server_url, const string16& access_token) = 0; diff --git a/content/browser/in_process_webkit/dom_storage_browsertest.cc b/content/browser/in_process_webkit/dom_storage_browsertest.cc index c7eb882..93fc04d 100644 --- a/content/browser/in_process_webkit/dom_storage_browsertest.cc +++ b/content/browser/in_process_webkit/dom_storage_browsertest.cc @@ -38,7 +38,8 @@ IN_PROC_BROWSER_TEST_F(DOMStorageBrowserTest, ClearLocalState) { { TestingProfile profile; WebKitContext *webkit_context = profile.GetWebKitContext(); - webkit_context->dom_storage_context()->set_data_path(temp_dir.path()); + webkit_context->dom_storage_context()-> + set_data_path_for_testing(temp_dir.path()); webkit_context->set_clear_local_state_on_exit(true); } // Make sure we wait until the destructor has run. diff --git a/content/browser/in_process_webkit/dom_storage_context.h b/content/browser/in_process_webkit/dom_storage_context.h index 09b0ef6..84acb5b 100644 --- a/content/browser/in_process_webkit/dom_storage_context.h +++ b/content/browser/in_process_webkit/dom_storage_context.h @@ -109,10 +109,9 @@ class CONTENT_EXPORT DOMStorageContext { clear_local_state_on_exit_ = clear_local_state; } -#ifdef UNIT_TEST - // For unit tests allow to override the |data_path_|. - void set_data_path(const FilePath& data_path) { data_path_ = data_path; } -#endif + void set_data_path_for_testing(const FilePath& data_path) { + data_path_ = data_path; + } private: diff --git a/content/browser/in_process_webkit/indexed_db_browsertest.cc b/content/browser/in_process_webkit/indexed_db_browsertest.cc index 06d1603..9390481 100644 --- a/content/browser/in_process_webkit/indexed_db_browsertest.cc +++ b/content/browser/in_process_webkit/indexed_db_browsertest.cc @@ -146,7 +146,7 @@ IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, ClearLocalState) { // With the levelDB backend, these are directories. WebKitContext *webkit_context = profile.GetWebKitContext(); IndexedDBContext* idb_context = webkit_context->indexed_db_context(); - idb_context->set_data_path(temp_dir.path()); + idb_context->set_data_path_for_testing(temp_dir.path()); protected_path = idb_context->GetIndexedDBFilePath( DatabaseUtil::GetOriginIdentifier(kProtectedOrigin)); unprotected_path = idb_context->GetIndexedDBFilePath( @@ -195,7 +195,7 @@ IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, ClearSessionOnlyDatabases) { // Override the storage policy with our own. idb_context->special_storage_policy_ = special_storage_policy; - idb_context->set_data_path(temp_dir.path()); + idb_context->set_data_path_for_testing(temp_dir.path()); normal_path = idb_context->GetIndexedDBFilePath( DatabaseUtil::GetOriginIdentifier(kNormalOrigin)); diff --git a/content/browser/in_process_webkit/indexed_db_context.h b/content/browser/in_process_webkit/indexed_db_context.h index 4094109..a7207e6 100644 --- a/content/browser/in_process_webkit/indexed_db_context.h +++ b/content/browser/in_process_webkit/indexed_db_context.h @@ -75,10 +75,10 @@ class CONTENT_EXPORT IndexedDBContext quota::QuotaManagerProxy* quota_manager_proxy(); -#ifdef UNIT_TEST // For unit tests allow to override the |data_path_|. - void set_data_path(const FilePath& data_path) { data_path_ = data_path; } -#endif + void set_data_path_for_testing(const FilePath& data_path) { + data_path_ = data_path; + } private: FRIEND_TEST(ExtensionServiceTest, ClearExtensionData); diff --git a/content/browser/in_process_webkit/indexed_db_quota_client.h b/content/browser/in_process_webkit/indexed_db_quota_client.h index 29ded7b..8b2838e 100644 --- a/content/browser/in_process_webkit/indexed_db_quota_client.h +++ b/content/browser/in_process_webkit/indexed_db_quota_client.h @@ -10,6 +10,7 @@ #include "base/memory/ref_counted.h" #include "base/message_loop_proxy.h" +#include "content/common/content_export.h" #include "webkit/quota/quota_client.h" #include "webkit/quota/quota_task.h" #include "webkit/quota/quota_types.h" @@ -22,10 +23,10 @@ class IndexedDBContext; class IndexedDBQuotaClient : public quota::QuotaClient, public quota::QuotaTaskObserver { public: - IndexedDBQuotaClient( + CONTENT_EXPORT IndexedDBQuotaClient( base::MessageLoopProxy* tracker_thread, IndexedDBContext* indexed_db_context); - virtual ~IndexedDBQuotaClient(); + CONTENT_EXPORT virtual ~IndexedDBQuotaClient(); // QuotaClient method overrides virtual ID id() const OVERRIDE; diff --git a/content/browser/in_process_webkit/indexed_db_quota_client_unittest.cc b/content/browser/in_process_webkit/indexed_db_quota_client_unittest.cc index 72fdc49..1ce0d5d 100644 --- a/content/browser/in_process_webkit/indexed_db_quota_client_unittest.cc +++ b/content/browser/in_process_webkit/indexed_db_quota_client_unittest.cc @@ -47,7 +47,7 @@ class IndexedDBQuotaClientTest : public testing::Test { FilePath indexeddb_dir = temp_dir_.path().Append( IndexedDBContext::kIndexedDBDirectory); ASSERT_TRUE(file_util::CreateDirectory(indexeddb_dir)); - idb_context()->set_data_path(indexeddb_dir); + idb_context()->set_data_path_for_testing(indexeddb_dir); } ~IndexedDBQuotaClientTest() { diff --git a/content/browser/intents/intent_injector.h b/content/browser/intents/intent_injector.h index f658446..60d5cb9 100644 --- a/content/browser/intents/intent_injector.h +++ b/content/browser/intents/intent_injector.h @@ -9,6 +9,7 @@ #include "base/basictypes.h" #include "base/string16.h" #include "content/browser/tab_contents/tab_contents_observer.h" +#include "content/common/content_export.h" #include "content/common/intents_messages.h" class RenderViewHost; @@ -26,7 +27,7 @@ class Message; // logic will create one of these to take care of passing intent data down into // the context of the service, which will be running in the TabContents on which // this class is an observer. Deletes itself when the tab is closed. -class IntentInjector : public TabContentsObserver { +class CONTENT_EXPORT IntentInjector : public TabContentsObserver { public: // |tab_contents| must not be NULL. explicit IntentInjector(TabContents* tab_contents); diff --git a/content/browser/net/url_request_failed_dns_job.h b/content/browser/net/url_request_failed_dns_job.h index 852371f..da1042e 100644 --- a/content/browser/net/url_request_failed_dns_job.h +++ b/content/browser/net/url_request_failed_dns_job.h @@ -21,7 +21,7 @@ class URLRequestFailedDnsJob : public net::URLRequestJob { const std::string& scheme); // A test URL that can be used in UI tests. - static const char kTestUrl[]; + CONTENT_EXPORT static const char kTestUrl[]; // Adds the testing URLs to the net::URLRequestFilter. CONTENT_EXPORT static void AddUrlHandler(); diff --git a/content/browser/net/url_request_slow_download_job.h b/content/browser/net/url_request_slow_download_job.h index 9cbde81..01aae0a 100644 --- a/content/browser/net/url_request_slow_download_job.h +++ b/content/browser/net/url_request_slow_download_job.h @@ -34,9 +34,9 @@ class URLRequestSlowDownloadJob : public net::URLRequestJob { const std::string& scheme); // Test URLs. - static const char kUnknownSizeUrl[]; - static const char kKnownSizeUrl[]; - static const char kFinishDownloadUrl[]; + CONTENT_EXPORT static const char kUnknownSizeUrl[]; + CONTENT_EXPORT static const char kKnownSizeUrl[]; + CONTENT_EXPORT static const char kFinishDownloadUrl[]; // Adds the testing URLs to the net::URLRequestFilter. CONTENT_EXPORT static void AddUrlHandler(); diff --git a/content/browser/plugin_process_host.h b/content/browser/plugin_process_host.h index 8cfc249..ae051ef 100644 --- a/content/browser/plugin_process_host.h +++ b/content/browser/plugin_process_host.h @@ -16,6 +16,7 @@ #include "base/basictypes.h" #include "base/memory/ref_counted.h" #include "content/browser/browser_child_process_host.h" +#include "content/common/content_export.h" #include "webkit/plugins/webplugininfo.h" #include "ui/gfx/native_widget_types.h" @@ -41,7 +42,7 @@ class GURL; // starting the plugin process when a plugin is created that doesn't already // have a process. After that, most of the communication is directly between // the renderer and plugin processes. -class PluginProcessHost : public BrowserChildProcessHost { +class CONTENT_EXPORT PluginProcessHost : public BrowserChildProcessHost { public: class Client { public: diff --git a/content/browser/renderer_host/browser_render_process_host.h b/content/browser/renderer_host/browser_render_process_host.h index 456de48..794cc76 100644 --- a/content/browser/renderer_host/browser_render_process_host.h +++ b/content/browser/renderer_host/browser_render_process_host.h @@ -15,6 +15,7 @@ #include "base/synchronization/waitable_event_watcher.h" #include "base/timer.h" #include "content/browser/child_process_launcher.h" +#include "content/common/content_export.h" #include "content/browser/renderer_host/render_process_host.h" #include "ui/gfx/surface/transport_dib.h" @@ -41,9 +42,10 @@ class WaitableEvent; // keeps a list of RenderView (renderer) and TabContents (browser) which // are correlated with IDs. This way, the Views and the corresponding ViewHosts // communicate through the two process objects. -class BrowserRenderProcessHost : public RenderProcessHost, - public ChildProcessLauncher::Client, - public base::WaitableEventWatcher::Delegate { +class CONTENT_EXPORT BrowserRenderProcessHost + : public RenderProcessHost, + public ChildProcessLauncher::Client, + public base::WaitableEventWatcher::Delegate { public: explicit BrowserRenderProcessHost(content::BrowserContext* browser_context); virtual ~BrowserRenderProcessHost(); diff --git a/content/browser/renderer_host/p2p/socket_host.h b/content/browser/renderer_host/p2p/socket_host.h index a3af7b3..e69ed259 100644 --- a/content/browser/renderer_host/p2p/socket_host.h +++ b/content/browser/renderer_host/p2p/socket_host.h @@ -5,6 +5,7 @@ #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ +#include "content/common/content_export.h" #include "content/common/p2p_sockets.h" #include "ipc/ipc_message.h" @@ -13,7 +14,7 @@ namespace content { // Base class for P2P sockets. -class P2PSocketHost { +class CONTENT_EXPORT P2PSocketHost { public: // Creates P2PSocketHost of the specific type. static P2PSocketHost* Create(IPC::Message::Sender* message_sender, diff --git a/content/browser/renderer_host/p2p/socket_host_tcp.h b/content/browser/renderer_host/p2p/socket_host_tcp.h index c2757cd..e92b0f0 100644 --- a/content/browser/renderer_host/p2p/socket_host_tcp.h +++ b/content/browser/renderer_host/p2p/socket_host_tcp.h @@ -24,7 +24,7 @@ class StreamSocket; namespace content { -class P2PSocketHostTcp : public P2PSocketHost { +class CONTENT_EXPORT P2PSocketHostTcp : public P2PSocketHost { public: P2PSocketHostTcp(IPC::Message::Sender* message_sender, int routing_id, int id); diff --git a/content/browser/renderer_host/p2p/socket_host_tcp_server.h b/content/browser/renderer_host/p2p/socket_host_tcp_server.h index 110075e..f964774 100644 --- a/content/browser/renderer_host/p2p/socket_host_tcp_server.h +++ b/content/browser/renderer_host/p2p/socket_host_tcp_server.h @@ -12,6 +12,7 @@ #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "content/browser/renderer_host/p2p/socket_host.h" +#include "content/common/content_export.h" #include "content/common/p2p_sockets.h" #include "net/socket/tcp_server_socket.h" @@ -21,7 +22,7 @@ class StreamSocket; namespace content { -class P2PSocketHostTcpServer : public P2PSocketHost { +class CONTENT_EXPORT P2PSocketHostTcpServer : public P2PSocketHost { public: P2PSocketHostTcpServer(IPC::Message::Sender* message_sender, int routing_id, int id); diff --git a/content/browser/renderer_host/p2p/socket_host_udp.h b/content/browser/renderer_host/p2p/socket_host_udp.h index d49f2c4a..83be566 100644 --- a/content/browser/renderer_host/p2p/socket_host_udp.h +++ b/content/browser/renderer_host/p2p/socket_host_udp.h @@ -13,13 +13,14 @@ #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "content/browser/renderer_host/p2p/socket_host.h" +#include "content/common/content_export.h" #include "content/common/p2p_sockets.h" #include "net/base/ip_endpoint.h" #include "net/udp/udp_server_socket.h" namespace content { -class P2PSocketHostUdp : public P2PSocketHost { +class CONTENT_EXPORT P2PSocketHostUdp : public P2PSocketHost { public: P2PSocketHostUdp(IPC::Message::Sender* message_sender, int routing_id, int id); diff --git a/content/browser/renderer_host/render_view_host_delegate.h b/content/browser/renderer_host/render_view_host_delegate.h index 428a5bf..d807111 100644 --- a/content/browser/renderer_host/render_view_host_delegate.h +++ b/content/browser/renderer_host/render_view_host_delegate.h @@ -160,7 +160,7 @@ class CONTENT_EXPORT RenderViewHostDelegate : public IPC::Channel::Listener { // Functions for managing switching of Renderers. For TabContents, this is // implemented by the RenderViewHostManager - class RendererManagement { + class CONTENT_EXPORT RendererManagement { public: // Notification whether we should close the page, after an explicit call to // AttemptToClosePage. This is called before a cross-site request or before diff --git a/content/browser/speech/speech_input_dispatcher_host.h b/content/browser/speech/speech_input_dispatcher_host.h index 4642bcb..8dbb65e 100644 --- a/content/browser/speech/speech_input_dispatcher_host.h +++ b/content/browser/speech/speech_input_dispatcher_host.h @@ -8,6 +8,7 @@ #include "base/memory/scoped_ptr.h" #include "content/browser/browser_message_filter.h" #include "content/browser/speech/speech_input_manager.h" +#include "content/common/content_export.h" #include "net/url_request/url_request_context_getter.h" struct SpeechInputHostMsg_StartRecognition_Params; @@ -38,7 +39,7 @@ class SpeechInputDispatcherHost : public BrowserMessageFilter, bool* message_was_ok); // Singleton manager setter useful for tests. - static void set_manager(SpeechInputManager* manager) { + CONTENT_EXPORT static void set_manager(SpeechInputManager* manager) { manager_ = manager; } diff --git a/content/browser/tab_contents/navigation_controller.h b/content/browser/tab_contents/navigation_controller.h index d63a1ed..dff4d76 100644 --- a/content/browser/tab_contents/navigation_controller.h +++ b/content/browser/tab_contents/navigation_controller.h @@ -311,11 +311,9 @@ class CONTENT_EXPORT NavigationController { static void DisablePromptOnRepost(); // Maximum number of entries before we start removing entries from the front. -#ifdef UNIT_TEST - static void set_max_entry_count(size_t max_entry_count) { + static void set_max_entry_count_for_testing(size_t max_entry_count) { max_entry_count_ = max_entry_count; } -#endif static size_t max_entry_count() { return max_entry_count_; } // Cancels a repost that brought up a warning. diff --git a/content/browser/tab_contents/navigation_controller_unittest.cc b/content/browser/tab_contents/navigation_controller_unittest.cc index 88ad37b..47c61e6 100644 --- a/content/browser/tab_contents/navigation_controller_unittest.cc +++ b/content/browser/tab_contents/navigation_controller_unittest.cc @@ -1387,7 +1387,7 @@ TEST_F(NavigationControllerTest, EnforceMaxNavigationCount) { size_t original_count = NavigationController::max_entry_count(); const int kMaxEntryCount = 5; - NavigationController::set_max_entry_count(kMaxEntryCount); + NavigationController::set_max_entry_count_for_testing(kMaxEntryCount); int url_index; // Load up to the max count, all entries should be there. @@ -1429,7 +1429,7 @@ TEST_F(NavigationControllerTest, EnforceMaxNavigationCount) { EXPECT_EQ(controller().GetEntryAtIndex(0)->url(), GURL("http:////www.a.com/4")); - NavigationController::set_max_entry_count(original_count); + NavigationController::set_max_entry_count_for_testing(original_count); } // Tests that we can do a restore and navigate to the restored entries and diff --git a/content/browser/tab_contents/render_view_host_manager.h b/content/browser/tab_contents/render_view_host_manager.h index 022c9f3..df33f08 100644 --- a/content/browser/tab_contents/render_view_host_manager.h +++ b/content/browser/tab_contents/render_view_host_manager.h @@ -29,7 +29,7 @@ class BrowserContext; // Manages RenderViewHosts for a TabContents. Normally there is only one and // it is easy to do. But we can also have transitions of processes (and hence // RenderViewHosts) that can get complex. -class RenderViewHostManager +class CONTENT_EXPORT RenderViewHostManager : public RenderViewHostDelegate::RendererManagement, public NotificationObserver { public: @@ -106,7 +106,7 @@ class RenderViewHostManager // Returns the view associated with the current RenderViewHost, or NULL if // there is no current one. - CONTENT_EXPORT RenderWidgetHostView* GetRenderWidgetHostView() const; + 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/common/content_switches.h b/content/common/content_switches.h index 03743ec..41385d1 100644 --- a/content/common/content_switches.h +++ b/content/common/content_switches.h @@ -20,7 +20,7 @@ extern const char kAuditHandles[]; extern const char kAuditAllHandles[]; CONTENT_EXPORT extern const char kBrowserAssertTest[]; CONTENT_EXPORT extern const char kBrowserCrashTest[]; -extern const char kBrowserSubprocessPath[]; +CONTENT_EXPORT extern const char kBrowserSubprocessPath[]; // TODO(jam): this doesn't belong in content. CONTENT_EXPORT extern const char kChromeFrame[]; CONTENT_EXPORT extern const char kDisable3DAPIs[]; @@ -36,7 +36,7 @@ extern const char kDisableBackingStoreLimit[]; CONTENT_EXPORT extern const char kDisableDatabases[]; extern const char kDisableDataTransferItems[]; extern const char kDisableDesktopNotifications[]; -extern const char kDisableDeviceOrientation[]; +CONTENT_EXPORT extern const char kDisableDeviceOrientation[]; CONTENT_EXPORT extern const char kDisableExperimentalWebGL[]; extern const char kDisableFileSystem[]; extern const char kDisableGeolocation[]; @@ -60,7 +60,7 @@ extern const char kDisableSSLFalseStart[]; extern const char kDisableSeccompSandbox[]; extern const char kDisableSessionStorage[]; extern const char kDisableSharedWorkers[]; -extern const char kDisableSpeechInput[]; +CONTENT_EXPORT extern const char kDisableSpeechInput[]; extern const char kDisableSpellcheckAPI[]; CONTENT_EXPORT extern const char kDisableWebAudio[]; extern const char kDisableWebSockets[]; @@ -98,7 +98,7 @@ CONTENT_EXPORT extern const char kIgnoreGpuBlacklist[]; extern const char kInProcessGPU[]; extern const char kInProcessPlugins[]; CONTENT_EXPORT extern const char kInProcessWebGL[]; -extern const char kJavaScriptFlags[]; +CONTENT_EXPORT extern const char kJavaScriptFlags[]; extern const char kLoadPlugin[]; CONTENT_EXPORT extern const char kLoggingLevel[]; extern const char kLogPluginMessages[]; @@ -145,7 +145,7 @@ CONTENT_EXPORT extern const char kServiceProcess[]; extern const char kShowPaintRects[]; extern const char kSimpleDataSource[]; CONTENT_EXPORT extern const char kSingleProcess[]; -extern const char kSQLiteIndexedDatabase[]; +CONTENT_EXPORT extern const char kSQLiteIndexedDatabase[]; extern const char kTestSandbox[]; extern const char kUnlimitedQuotaForFiles[]; CONTENT_EXPORT extern const char kUserAgent[]; diff --git a/content/common/indexed_db_key.h b/content/common/indexed_db_key.h index 04a4b60..ee7acd8 100644 --- a/content/common/indexed_db_key.h +++ b/content/common/indexed_db_key.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. @@ -8,9 +8,10 @@ #include "base/basictypes.h" #include "base/string16.h" +#include "content/common/content_export.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h" -class IndexedDBKey { +class CONTENT_EXPORT IndexedDBKey { public: IndexedDBKey(); // Defaults to WebKit::WebIDBKey::InvalidType. explicit IndexedDBKey(const WebKit::WebIDBKey& key); diff --git a/content/common/net/url_fetcher.h b/content/common/net/url_fetcher.h index 74bbf7b..ba2b465 100644 --- a/content/common/net/url_fetcher.h +++ b/content/common/net/url_fetcher.h @@ -187,11 +187,9 @@ class CONTENT_EXPORT URLFetcher { base::TimeDelta backoff_delay() const { return backoff_delay_; } // Sets the back-off delay, allowing to mock 5xx requests in unit-tests. -#if defined(UNIT_TEST) - void set_backoff_delay(base::TimeDelta backoff_delay) { + void set_backoff_delay_for_testing(base::TimeDelta backoff_delay) { backoff_delay_ = backoff_delay; } -#endif // defined(UNIT_TEST) // By default, the response is saved in a string. Call this method to save the // response to a temporary file instead. Must be called before Start(). diff --git a/content/common/serialized_script_value.h b/content/common/serialized_script_value.h index 7352298..f6f0515 100644 --- a/content/common/serialized_script_value.h +++ b/content/common/serialized_script_value.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/string16.h" +#include "content/common/content_export.h" namespace WebKit { class WebSerializedScriptValue; } -class SerializedScriptValue { +class CONTENT_EXPORT SerializedScriptValue { public: SerializedScriptValue(); SerializedScriptValue(bool is_null, bool is_invalid, const string16& data); diff --git a/content/renderer/p2p/p2p_transport_impl.h b/content/renderer/p2p/p2p_transport_impl.h index 82072b1..d4d1baa 100644 --- a/content/renderer/p2p/p2p_transport_impl.h +++ b/content/renderer/p2p/p2p_transport_impl.h @@ -8,7 +8,9 @@ #include <string> #include "base/basictypes.h" +#include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" +#include "content/common/content_export.h" #include "net/base/completion_callback.h" #include "third_party/libjingle/source/talk/base/sigslot.h" #include "webkit/glue/p2p_transport.h" @@ -36,8 +38,9 @@ namespace content { class P2PPortAllocator; class P2PSocketDispatcher; -class P2PTransportImpl : public webkit_glue::P2PTransport, - public sigslot::has_slots<> { +class CONTENT_EXPORT P2PTransportImpl + : NON_EXPORTED_BASE(public webkit_glue::P2PTransport), + public sigslot::has_slots<> { public: // Creates P2PTransportImpl using specified NetworkManager and // PacketSocketFactory. Takes ownership of |network_manager| and diff --git a/content/renderer/render_view.h b/content/renderer/render_view.h index 8666b69..245e196 100644 --- a/content/renderer/render_view.h +++ b/content/renderer/render_view.h @@ -177,7 +177,7 @@ class RenderView : public RenderWidget, // responsible for creating this RenderView (corresponding to parent_hwnd). // |counter| is either a currently initialized counter, or NULL (in which case // we treat this RenderView as a top level window). - static RenderView* Create( + CONTENT_EXPORT static RenderView* Create( RenderThreadBase* render_thread, gfx::NativeViewId parent_hwnd, int32 opener_id, @@ -816,7 +816,7 @@ class RenderView : public RenderWidget, const WebKit::WebMediaPlayerAction& action); void OnMouseLockLost(); void OnMoveOrResizeStarted(); - void OnNavigate(const ViewMsg_Navigate_Params& params); + CONTENT_EXPORT void OnNavigate(const ViewMsg_Navigate_Params& params); void OnPaste(); #if defined(OS_MACOSX) void OnPluginImeCompositionCompleted(const string16& text, int plugin_id); @@ -837,7 +837,8 @@ class RenderView : public RenderWidget, void OnSetBackground(const SkBitmap& background); void OnSetWebUIProperty(const std::string& name, const std::string& value); void OnSetEditCommandsForNextKeyEvent(const EditCommands& edit_commands); - void OnSetHistoryLengthAndPrune(int history_length, int32 minimum_page_id); + CONTENT_EXPORT void OnSetHistoryLengthAndPrune(int history_length, + int32 minimum_page_id); void OnSetInitialFocus(bool reverse); #if defined(OS_MACOSX) void OnSetInLiveResize(bool in_live_resize); diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h index 0980575..f44f289 100644 --- a/content/renderer/render_widget.h +++ b/content/renderer/render_widget.h @@ -9,9 +9,11 @@ #include <vector> #include "base/basictypes.h" +#include "base/compiler_specific.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/time.h" +#include "content/common/content_export.h" #include "content/renderer/paint_aggregator.h" #include "ipc/ipc_channel.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h" @@ -60,10 +62,11 @@ class PluginInstance; // RenderWidget provides a communication bridge between a WebWidget and // a RenderWidgetHost, the latter of which lives in a different process. -class RenderWidget : public IPC::Channel::Listener, - public IPC::Message::Sender, - virtual public WebKit::WebWidgetClient, - public base::RefCounted<RenderWidget> { +class CONTENT_EXPORT RenderWidget + : public IPC::Channel::Listener, + public IPC::Message::Sender, + NON_EXPORTED_BASE(virtual public WebKit::WebWidgetClient), + public base::RefCounted<RenderWidget> { public: // Creates a new RenderWidget. The opener_id is the routing ID of the // RenderView that this widget lives inside. The render_thread is any diff --git a/content/renderer/renderer_main_platform_delegate.h b/content/renderer/renderer_main_platform_delegate.h index c57e90e..8ca6ba4 100644 --- a/content/renderer/renderer_main_platform_delegate.h +++ b/content/renderer/renderer_main_platform_delegate.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. @@ -6,9 +6,10 @@ #define CHROME_RENDERER_RENDERER_MAIN_PLATFORM_DELEGATE_H_ #pragma once +#include "content/common/content_export.h" #include "content/common/main_function_params.h" -class RendererMainPlatformDelegate { +class CONTENT_EXPORT RendererMainPlatformDelegate { public: explicit RendererMainPlatformDelegate(const MainFunctionParams& parameters); ~RendererMainPlatformDelegate(); diff --git a/content/renderer/renderer_webkitplatformsupport_impl.h b/content/renderer/renderer_webkitplatformsupport_impl.h index 9517693..def554b 100644 --- a/content/renderer/renderer_webkitplatformsupport_impl.h +++ b/content/renderer/renderer_webkitplatformsupport_impl.h @@ -6,8 +6,10 @@ #define CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ #pragma once +#include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" #include "base/platform_file.h" +#include "content/common/content_export.h" #include "webkit/glue/webkitplatformsupport_impl.h" class WebSharedWorkerRepositoryImpl; @@ -21,8 +23,8 @@ namespace webkit_glue { class WebClipboardImpl; } -class RendererWebKitPlatformSupportImpl - : public webkit_glue::WebKitPlatformSupportImpl { +class CONTENT_EXPORT RendererWebKitPlatformSupportImpl + : NON_EXPORTED_BASE(public webkit_glue::WebKitPlatformSupportImpl) { public: RendererWebKitPlatformSupportImpl(); virtual ~RendererWebKitPlatformSupportImpl(); |