summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-16 21:55:18 +0000
committerdpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-16 21:55:18 +0000
commit5cba9ff723227ca847c8cb4186be45ea903f9794 (patch)
tree3eb4776e934e7a7fb3a007a80bb08f549b0368d6
parent1562042283de1138d4386d1fea05d9028fbc8b0c (diff)
downloadchromium_src-5cba9ff723227ca847c8cb4186be45ea903f9794.zip
chromium_src-5cba9ff723227ca847c8cb4186be45ea903f9794.tar.gz
chromium_src-5cba9ff723227ca847c8cb4186be45ea903f9794.tar.bz2
Enable content component (again!).
This version fixes a problem with the windows incremental linking build. We can't incrementally link chrome when content is being built as a DLL because chrome links in webkit_glue and webkit_glue depends on symbols defined in content. We can remove this when we fix glue. R=jam@chromium.org BUG=90442, 98755. Review URL: http://codereview.chromium.org/8570024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110360 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/common.gypi8
-rw-r--r--chrome/chrome_exe.gypi4
-rw-r--r--chrome/chrome_installer_util.gypi19
-rw-r--r--chrome/chrome_tests.gypi20
-rw-r--r--chrome/nacl.gypi1
-rw-r--r--content/browser/net/url_request_abort_on_end_job.h3
-rw-r--r--content/browser/worker_host/worker_process_host.h3
-rw-r--r--content/common/content_export.h2
-rw-r--r--content/content.gyp12
-rw-r--r--content/public/common/show_desktop_notification_params.h3
-rw-r--r--content/renderer/media/audio_input_device.h4
-rw-r--r--content/renderer/media/webrtc_audio_device_impl.h3
-rw-r--r--content/renderer/pepper_plugin_delegate_impl.h2
-rw-r--r--webkit/appcache/appcache_export.h3
-rw-r--r--webkit/appcache/webkit_appcache.gypi15
15 files changed, 81 insertions, 21 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 21269b0..b9de7c5 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -960,6 +960,14 @@
['component=="shared_library"', {
'defines': ['COMPONENT_BUILD'],
}],
+ ['component=="shared_library" and incremental_chrome_dll==1', {
+ # TODO(dpranke): We can't incrementally link chrome when
+ # content is being built as a DLL because chrome links in
+ # webkit_glue and webkit_glue depends on symbols defined in
+ # content. We can remove this when we fix glue.
+ # See http://code.google.com/p/chromium/issues/detail?id=98755 .
+ 'defines': ['COMPILE_CONTENT_STATICALLY'],
+ }],
['toolkit_views==1', {
'defines': ['TOOLKIT_VIEWS=1'],
}],
diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi
index e19d4ea..b5b1997 100644
--- a/chrome/chrome_exe.gypi
+++ b/chrome/chrome_exe.gypi
@@ -495,6 +495,9 @@
'app/client_util.cc',
],
}],
+ ['OS=="win" and component=="shared_library"', {
+ 'defines': ['COMPILE_CONTENT_STATICALLY'],
+ }]
],
},
],
@@ -534,6 +537,7 @@
],
'defines': [
'<@(nacl_win64_defines)',
+ 'COMPILE_CONTENT_STATICALLY',
],
'include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)/chrome',
diff --git a/chrome/chrome_installer_util.gypi b/chrome/chrome_installer_util.gypi
index f6bbe07..95bb537 100644
--- a/chrome/chrome_installer_util.gypi
+++ b/chrome/chrome_installer_util.gypi
@@ -97,13 +97,13 @@
},
'dependencies': [
'installer_util_strings',
- '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
'common_constants',
'chrome_resources.gyp:chrome_resources',
'chrome_resources.gyp:chrome_strings',
- '../content/content.gyp:content_common',
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
+ '<(DEPTH)/content/content.gyp:content_common',
'<(DEPTH)/courgette/courgette.gyp:courgette_lib',
'<(DEPTH)/third_party/bspatch/bspatch.gyp:bspatch',
'<(DEPTH)/third_party/icu/icu.gyp:icui18n',
@@ -141,6 +141,14 @@
'installer/util/shell_util.cc',
'installer/util/shell_util.h',
],
+ 'conditions': [
+ ['component=="shared_library" and incremental_chrome_dll!=1', {
+ 'sources': [ '../content/public/common/content_switches.cc' ],
+ 'defines': [ 'COMPILE_CONTENT_STATICALLY'],
+ }, {
+ 'dependencies': ['<(DEPTH)/content/content.gyp:content_common'],
+ }],
+ ],
},
{
'target_name': 'installer_util_nacl_win64',
@@ -186,8 +194,15 @@
'include_dirs': [
'<(DEPTH)',
],
+ 'conditions': [
+ ['component == "shared_library"', {
+ 'sources': [ '../content/public/common/content_switches.cc' ],
+ 'defines': [ 'COMPILE_CONTENT_STATICALLY'],
+ }],
+ ],
}
],
}],
+
],
}
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 0a6c65d..e6dd03d 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -2360,6 +2360,16 @@
'browser/printing/print_system_task_proxy_unittest.cc',
],
}],
+ ['component=="shared_library" and incremental_chrome_dll!=1', {
+ # This is needed for tests that subclass
+ # RendererWebKitPlatformSupportImpl, which subclasses stuff in
+ # glue, which refers to symbols defined in these files.
+ # Hopefully this can be resolved with http://crbug.com/98755.
+ 'sources': [
+ '../content/renderer/renderer_glue.cc',
+ '../content/common/socket_stream_dispatcher.cc',
+ ]},
+ ],
],
},
{
@@ -2975,6 +2985,16 @@
'../webkit/webkit.gyp:copy_npapi_test_plugin',
],
}],
+ ['component=="shared_library" and incremental_chrome_dll!=1', {
+ # This is needed for tests that subclass
+ # RendererWebKitPlatformSupportImpl, which subclasses stuff in
+ # glue, which refers to symbols defined in these files.
+ # Hopefully this can be resolved with http://crbug.com/98755.
+ 'sources': [
+ '../content/renderer/renderer_glue.cc',
+ '../content/common/socket_stream_dispatcher.cc',
+ ]},
+ ],
], # conditions
}, # target browser_tests
{
diff --git a/chrome/nacl.gypi b/chrome/nacl.gypi
index 432710d..986abdc 100644
--- a/chrome/nacl.gypi
+++ b/chrome/nacl.gypi
@@ -109,6 +109,7 @@
],
'defines': [
'<@(nacl_win64_defines)',
+ 'COMPILE_CONTENT_STATICALLY',
],
'configurations': {
'Common_Base': {
diff --git a/content/browser/net/url_request_abort_on_end_job.h b/content/browser/net/url_request_abort_on_end_job.h
index 8bb4b93..52a9b1d 100644
--- a/content/browser/net/url_request_abort_on_end_job.h
+++ b/content/browser/net/url_request_abort_on_end_job.h
@@ -12,7 +12,6 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
-#include "content/common/content_export.h"
#include "net/url_request/url_request_job.h"
// This url request simulates a network error which occurs immediately after
@@ -33,7 +32,7 @@ class URLRequestAbortOnEndJob : public net::URLRequestJob {
static net::URLRequestJob* Factory(net::URLRequest* request,
const std::string& scheme);
- CONTENT_EXPORT static void AddUrlHandler();
+ static void AddUrlHandler();
private:
explicit URLRequestAbortOnEndJob(net::URLRequest* request);
diff --git a/content/browser/worker_host/worker_process_host.h b/content/browser/worker_host/worker_process_host.h
index a3c4a13..8faa6c4 100644
--- a/content/browser/worker_host/worker_process_host.h
+++ b/content/browser/worker_host/worker_process_host.h
@@ -12,6 +12,7 @@
#include "base/basictypes.h"
#include "base/file_path.h"
#include "content/browser/browser_child_process_host.h"
+#include "content/common/content_export.h"
#include "content/browser/worker_host/worker_document_set.h"
#include "googleurl/src/gurl.h"
@@ -132,7 +133,7 @@ class WorkerProcessHost : public BrowserChildProcessHost {
unsigned long long document_id);
// Terminates the given worker, i.e. based on a UI action.
- void TerminateWorker(int worker_route_id);
+ CONTENT_EXPORT void TerminateWorker(int worker_route_id);
typedef std::list<WorkerInstance> Instances;
const Instances& instances() const { return instances_; }
diff --git a/content/common/content_export.h b/content/common/content_export.h
index fc91b72c..b39cdd5 100644
--- a/content/common/content_export.h
+++ b/content/common/content_export.h
@@ -6,7 +6,7 @@
#define CONTENT_COMMON_CONTENT_EXPORT_H_
#pragma once
-#if 0 // TODO(dpranke): Uncomment: defined(COMPONENT_BUILD).
+#if defined(COMPONENT_BUILD) && !defined(COMPILE_CONTENT_STATICALLY)
#if defined(WIN32)
#if defined(CONTENT_IMPLEMENTATION)
diff --git a/content/content.gyp b/content/content.gyp
index 51ff0f1..a4fc736 100644
--- a/content/content.gyp
+++ b/content/content.gyp
@@ -22,8 +22,14 @@
# upstream unnecessarily (e.g., content_renderer depends on allocator
# and chrome_exe depends on content_common but we don't want
# chrome_exe to have to depend on allocator).
- # TODO(dpranke): Uncomment: ['component == "static_library"', {
- ['1 == 1', {
+ #
+ # TODO(dpranke): Remove the mac conditional once the circular
+ # dependencies in WebKit.gyp are fixed.
+ # See https://bugs.webkit.org/show_bug.cgi?id=68463
+ ['OS=="mac" or component=="static_library" or incremental_chrome_dll==1', {
+ 'target_defines': [
+ 'COMPILE_CONTENT_STATICALLY',
+ ],
'targets': [
{'target_name': 'content',
'type': 'none',
@@ -192,8 +198,6 @@
],
},
{ # component != static_library
- 'target_defaults': {
- },
'targets': [
{'target_name': 'content',
'type': 'shared_library',
diff --git a/content/public/common/show_desktop_notification_params.h b/content/public/common/show_desktop_notification_params.h
index 2f19079..a33a6b9 100644
--- a/content/public/common/show_desktop_notification_params.h
+++ b/content/public/common/show_desktop_notification_params.h
@@ -6,13 +6,14 @@
#define CONTENT_PUBLIC_COMMON_SHOW_DESKTOP_NOTIFICATION_PARAMS_H_
#pragma once
+#include "content/common/content_export.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
namespace content {
// Parameters used when showing an HTML5 notification.
-struct ShowDesktopNotificationHostMsgParams {
+struct CONTENT_EXPORT ShowDesktopNotificationHostMsgParams {
ShowDesktopNotificationHostMsgParams();
~ShowDesktopNotificationHostMsgParams();
diff --git a/content/renderer/media/audio_input_device.h b/content/renderer/media/audio_input_device.h
index ed21eb5..c766cda 100644
--- a/content/renderer/media/audio_input_device.h
+++ b/content/renderer/media/audio_input_device.h
@@ -89,7 +89,7 @@ class CONTENT_EXPORT AudioInputDevice
public base::DelegateSimpleThread::Delegate,
public base::RefCountedThreadSafe<AudioInputDevice> {
public:
- class CaptureCallback {
+ class CONTENT_EXPORT CaptureCallback {
public:
virtual void Capture(const std::vector<float*>& audio_data,
size_t number_of_frames,
@@ -98,7 +98,7 @@ class CONTENT_EXPORT AudioInputDevice
virtual ~CaptureCallback() {}
};
- class CaptureEventHandler {
+ class CONTENT_EXPORT CaptureEventHandler {
public:
// Notification to the client that the device with the specific index has
// been started. This callback is triggered as a result of StartDevice().
diff --git a/content/renderer/media/webrtc_audio_device_impl.h b/content/renderer/media/webrtc_audio_device_impl.h
index d716612..0ee233f 100644
--- a/content/renderer/media/webrtc_audio_device_impl.h
+++ b/content/renderer/media/webrtc_audio_device_impl.h
@@ -9,6 +9,7 @@
#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/message_loop_proxy.h"
@@ -92,7 +93,7 @@
// - Recording is currently not supported on Mac OS X.
//
class CONTENT_EXPORT WebRtcAudioDeviceImpl
- : public webrtc::AudioDeviceModule,
+ : NON_EXPORTED_BASE(public webrtc::AudioDeviceModule),
public AudioDevice::RenderCallback,
public AudioInputDevice::CaptureCallback,
public AudioInputDevice::CaptureEventHandler {
diff --git a/content/renderer/pepper_plugin_delegate_impl.h b/content/renderer/pepper_plugin_delegate_impl.h
index ca9cdda..52d657d 100644
--- a/content/renderer/pepper_plugin_delegate_impl.h
+++ b/content/renderer/pepper_plugin_delegate_impl.h
@@ -59,7 +59,7 @@ struct CustomContextMenuContext;
class TransportDIB;
// This object is NOT thread-safe.
-class BrokerDispatcherWrapper {
+class CONTENT_EXPORT BrokerDispatcherWrapper {
public:
BrokerDispatcherWrapper();
~BrokerDispatcherWrapper();
diff --git a/webkit/appcache/appcache_export.h b/webkit/appcache/appcache_export.h
index 130816a..ece56ee 100644
--- a/webkit/appcache/appcache_export.h
+++ b/webkit/appcache/appcache_export.h
@@ -6,8 +6,7 @@
#define WEBKIT_APPCACHE_APPCACHE_EXPORT_H_
#pragma once
-// TODO(dpranke): Uncomment to enable appcache component build.
-#if 0 // defined(COMPONENT_BUILD)
+#if defined(COMPONENT_BUILD)
#if defined(WIN32)
#if defined(APPCACHE_IMPLEMENTATION)
diff --git a/webkit/appcache/webkit_appcache.gypi b/webkit/appcache/webkit_appcache.gypi
index c3ad2d3..3d88488 100644
--- a/webkit/appcache/webkit_appcache.gypi
+++ b/webkit/appcache/webkit_appcache.gypi
@@ -7,9 +7,6 @@
{
'target_name': 'appcache',
'variables': { 'enable_wexit_time_destructors': 1, },
- # TODO(dpranke): Uncomment '<(component)',
- # 'type': '<(component)',
- 'type': 'static_library',
'defines': [
'APPCACHE_IMPLEMENTATION',
],
@@ -20,7 +17,6 @@
'<(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.
@@ -74,6 +70,17 @@
'webkit_appcache.gypi',
],
'conditions': [
+ [# TODO(dpranke): Remove once the circular dependencies in
+ # WebKit.gyp are fixed on the mac.
+ # See https://bugs.webkit.org/show_bug.cgi?id=68463
+ 'OS=="mac"', {
+ 'type': 'static_library',
+ }, {
+ 'type': '<(component)',
+ 'dependencies': [
+ '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit',
+ ],
+ }],
['inside_chromium_build==0', {
'dependencies': [
'<(DEPTH)/webkit/support/setup_third_party.gyp:third_party_headers',