diff options
author | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-14 02:47:54 +0000 |
---|---|---|
committer | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-14 02:47:54 +0000 |
commit | b2ad61ce69acceabba0db7befa4b6401f3ee000d (patch) | |
tree | 23953651e9a855e20a72db0bf580d6a2de97d661 /webkit/appcache | |
parent | 04b482600c4a8d04c0de4911303deb92d635fb17 (diff) | |
download | chromium_src-b2ad61ce69acceabba0db7befa4b6401f3ee000d.zip chromium_src-b2ad61ce69acceabba0db7befa4b6401f3ee000d.tar.gz chromium_src-b2ad61ce69acceabba0db7befa4b6401f3ee000d.tar.bz2 |
Prepare appcache to build as a DLL in the component build.
This is needed to break the circular dependencies between appcache, chrome,
and content (once we fix the messageloopproxy issue as seen in
http://codereview.chromium.org/7841052/ ).
R=michaeln@chromium.org, jam@chromium.org
BUG=none
TEST=none
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=100831
Review URL: http://codereview.chromium.org/7859021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101017 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache')
-rw-r--r-- | webkit/appcache/appcache_backend_impl.h | 3 | ||||
-rw-r--r-- | webkit/appcache/appcache_export.h | 27 | ||||
-rw-r--r-- | webkit/appcache/appcache_frontend_impl.h | 5 | ||||
-rw-r--r-- | webkit/appcache/appcache_interceptor.h | 4 | ||||
-rw-r--r-- | webkit/appcache/appcache_interfaces.h | 11 | ||||
-rw-r--r-- | webkit/appcache/appcache_service.h | 5 | ||||
-rw-r--r-- | webkit/appcache/view_appcache_internals_job.h | 3 | ||||
-rw-r--r-- | webkit/appcache/web_application_cache_host_impl.h | 4 | ||||
-rw-r--r-- | webkit/appcache/webkit_appcache.gypi | 10 |
9 files changed, 59 insertions, 13 deletions
diff --git a/webkit/appcache/appcache_backend_impl.h b/webkit/appcache/appcache_backend_impl.h index 9a0e1ae..67e7e99 100644 --- a/webkit/appcache/appcache_backend_impl.h +++ b/webkit/appcache/appcache_backend_impl.h @@ -6,13 +6,14 @@ #define WEBKIT_APPCACHE_APPCACHE_BACKEND_IMPL_H_ #include "base/hash_tables.h" +#include "webkit/appcache/appcache_export.h" #include "webkit/appcache/appcache_host.h" namespace appcache { class AppCacheService; -class AppCacheBackendImpl { +class APPCACHE_EXPORT AppCacheBackendImpl { public: AppCacheBackendImpl(); ~AppCacheBackendImpl(); diff --git a/webkit/appcache/appcache_export.h b/webkit/appcache/appcache_export.h new file mode 100644 index 0000000..130816a --- /dev/null +++ b/webkit/appcache/appcache_export.h @@ -0,0 +1,27 @@ +// 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. + +#ifndef WEBKIT_APPCACHE_APPCACHE_EXPORT_H_ +#define WEBKIT_APPCACHE_APPCACHE_EXPORT_H_ +#pragma once + +// TODO(dpranke): Uncomment to enable appcache component build. +#if 0 // defined(COMPONENT_BUILD) +#if defined(WIN32) + +#if defined(APPCACHE_IMPLEMENTATION) +#define APPCACHE_EXPORT __declspec(dllexport) +#else +#define APPCACHE_EXPORT __declspec(dllimport) +#endif // defined(APPCACHE_IMPLEMENTATION) + +#else // defined(WIN32) +#define APPCACHE_EXPORT __attribute__((visibility("default"))) +#endif + +#else // defined(COMPONENT_BUILD) +#define APPCACHE_EXPORT +#endif + +#endif // WEBKIT_APPCACHE_APPCACHE_EXPORT_H_ diff --git a/webkit/appcache/appcache_frontend_impl.h b/webkit/appcache/appcache_frontend_impl.h index 159cbec..ce37d26 100644 --- a/webkit/appcache/appcache_frontend_impl.h +++ b/webkit/appcache/appcache_frontend_impl.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,11 +7,12 @@ #include <string> #include <vector> +#include "webkit/appcache/appcache_export.h" #include "webkit/appcache/appcache_interfaces.h" namespace appcache { -class AppCacheFrontendImpl : public AppCacheFrontend { +class APPCACHE_EXPORT AppCacheFrontendImpl : public AppCacheFrontend { public: virtual void OnCacheSelected( int host_id, const appcache::AppCacheInfo& info); diff --git a/webkit/appcache/appcache_interceptor.h b/webkit/appcache/appcache_interceptor.h index 1ddd7d2..423fd65 100644 --- a/webkit/appcache/appcache_interceptor.h +++ b/webkit/appcache/appcache_interceptor.h @@ -8,6 +8,7 @@ #include "base/memory/singleton.h" #include "googleurl/src/gurl.h" #include "net/url_request/url_request.h" +#include "webkit/appcache/appcache_export.h" #include "webkit/glue/resource_type.h" namespace appcache { @@ -17,7 +18,8 @@ class AppCacheService; // An interceptor to hijack requests and potentially service them out of // the appcache. -class AppCacheInterceptor : public net::URLRequest::Interceptor { +class APPCACHE_EXPORT AppCacheInterceptor + : public net::URLRequest::Interceptor { public: // Registers a singleton instance with the net library. // Should be called early in the IO thread prior to initiating requests. diff --git a/webkit/appcache/appcache_interfaces.h b/webkit/appcache/appcache_interfaces.h index d04a7da..70baf3a 100644 --- a/webkit/appcache/appcache_interfaces.h +++ b/webkit/appcache/appcache_interfaces.h @@ -11,6 +11,7 @@ #include "base/file_path.h" #include "base/time.h" #include "googleurl/src/gurl.h" +#include "webkit/appcache/appcache_export.h" namespace net { class URLRequest; @@ -54,7 +55,7 @@ enum LogLevel { LOG_ERROR, }; -struct AppCacheInfo { +struct APPCACHE_EXPORT AppCacheInfo { AppCacheInfo(); ~AppCacheInfo(); @@ -71,7 +72,7 @@ struct AppCacheInfo { typedef std::vector<AppCacheInfo> AppCacheInfoVector; // Type to hold information about a single appcache resource. -struct AppCacheResourceInfo { +struct APPCACHE_EXPORT AppCacheResourceInfo { AppCacheResourceInfo(); ~AppCacheResourceInfo(); @@ -88,7 +89,7 @@ struct AppCacheResourceInfo { typedef std::vector<AppCacheResourceInfo> AppCacheResourceInfoVector; // Interface used by backend (browser-process) to talk to frontend (renderer). -class AppCacheFrontend { +class APPCACHE_EXPORT AppCacheFrontend { public: virtual void OnCacheSelected( int host_id, const appcache::AppCacheInfo& info) = 0; @@ -109,7 +110,7 @@ class AppCacheFrontend { }; // Interface used by frontend (renderer) to talk to backend (browser-process). -class AppCacheBackend { +class APPCACHE_EXPORT AppCacheBackend { public: virtual void RegisterHost(int host_id) = 0; virtual void UnregisterHost(int host_id) = 0; @@ -149,7 +150,7 @@ bool IsSchemeSupported(const GURL& url); bool IsMethodSupported(const std::string& method); bool IsSchemeAndMethodSupported(const net::URLRequest* request); -extern const FilePath::CharType kAppCacheDatabaseName[]; +APPCACHE_EXPORT extern const FilePath::CharType kAppCacheDatabaseName[]; } // namespace diff --git a/webkit/appcache/appcache_service.h b/webkit/appcache/appcache_service.h index 2b8cdd4..f8bc5b7 100644 --- a/webkit/appcache/appcache_service.h +++ b/webkit/appcache/appcache_service.h @@ -14,6 +14,7 @@ #include "net/base/completion_callback.h" #include "net/base/net_errors.h" #include "testing/gtest/include/gtest/gtest_prod.h" +#include "webkit/appcache/appcache_export.h" #include "webkit/appcache/appcache_interfaces.h" #include "webkit/appcache/appcache_storage.h" @@ -39,7 +40,7 @@ class AppCacheQuotaClient; class AppCachePolicy; // Refcounted container to avoid copying the collection in callbacks. -struct AppCacheInfoCollection +struct APPCACHE_EXPORT AppCacheInfoCollection : public base::RefCountedThreadSafe<AppCacheInfoCollection> { AppCacheInfoCollection(); virtual ~AppCacheInfoCollection(); @@ -50,7 +51,7 @@ struct AppCacheInfoCollection // Class that manages the application cache service. Sends notifications // to many frontends. One instance per user-profile. Each instance has // exclusive access to it's cache_directory on disk. -class AppCacheService { +class APPCACHE_EXPORT AppCacheService { public: // If not using quota management, the proxy may be NULL. explicit AppCacheService(quota::QuotaManagerProxy* quota_manager_proxy); diff --git a/webkit/appcache/view_appcache_internals_job.h b/webkit/appcache/view_appcache_internals_job.h index 2d45c51..762a703 100644 --- a/webkit/appcache/view_appcache_internals_job.h +++ b/webkit/appcache/view_appcache_internals_job.h @@ -6,6 +6,7 @@ #define WEBKIT_APPCACHE_VIEW_APPCACHE_INTERNALS_JOB_H_ #include "base/basictypes.h" +#include "webkit/appcache/appcache_export.h" namespace net { class URLRequest; @@ -16,7 +17,7 @@ namespace appcache { class AppCacheService; -class ViewAppCacheInternalsJobFactory { +class APPCACHE_EXPORT ViewAppCacheInternalsJobFactory { public: static net::URLRequestJob* CreateJobForRequest( net::URLRequest* request, AppCacheService* service); diff --git a/webkit/appcache/web_application_cache_host_impl.h b/webkit/appcache/web_application_cache_host_impl.h index 7b6789a..7595a5d 100644 --- a/webkit/appcache/web_application_cache_host_impl.h +++ b/webkit/appcache/web_application_cache_host_impl.h @@ -11,6 +11,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebApplicationCacheHostClient.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" +#include "webkit/appcache/appcache_export.h" #include "webkit/appcache/appcache_interfaces.h" namespace WebKit { @@ -19,7 +20,8 @@ class WebFrame; namespace appcache { -class WebApplicationCacheHostImpl : public WebKit::WebApplicationCacheHost { +class APPCACHE_EXPORT WebApplicationCacheHostImpl + : NON_EXPORTED_BASE(public WebKit::WebApplicationCacheHost) { public: // Returns the host having given id or NULL if there is no such host. static WebApplicationCacheHostImpl* FromId(int id); diff --git a/webkit/appcache/webkit_appcache.gypi b/webkit/appcache/webkit_appcache.gypi index cfce447..1c7c13b 100644 --- a/webkit/appcache/webkit_appcache.gypi +++ b/webkit/appcache/webkit_appcache.gypi @@ -6,11 +6,20 @@ 'targets': [ { 'target_name': 'appcache', + # TODO(dpranke): Uncomment '<(component)', + # 'type': '<(component)', 'type': 'static_library', + 'defines': [ + 'APPCACHE_IMPLEMENTATION', + ], 'dependencies': [ + 'quota', + '<(DEPTH)/base/base.gyp:base_i18n', '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl', '<(DEPTH)/net/net.gyp:net', '<(DEPTH)/sql/sql.gyp:sql', + '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + # TODO(dpranke): Uncomment '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', ], 'sources': [ # This list contains all .h and .cc in appcache except for test code. @@ -23,6 +32,7 @@ 'appcache_disk_cache.cc', 'appcache_disk_cache.h', 'appcache_entry.h', + 'appcache_export.h', 'appcache_frontend_impl.cc', 'appcache_frontend_impl.h', 'appcache_group.cc', |