Commit 5cba9ff7 authored by dpranke@chromium.org's avatar dpranke@chromium.org

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
parent 15620422
...@@ -960,6 +960,14 @@ ...@@ -960,6 +960,14 @@
['component=="shared_library"', { ['component=="shared_library"', {
'defines': ['COMPONENT_BUILD'], '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', { ['toolkit_views==1', {
'defines': ['TOOLKIT_VIEWS=1'], 'defines': ['TOOLKIT_VIEWS=1'],
}], }],
......
...@@ -495,6 +495,9 @@ ...@@ -495,6 +495,9 @@
'app/client_util.cc', 'app/client_util.cc',
], ],
}], }],
['OS=="win" and component=="shared_library"', {
'defines': ['COMPILE_CONTENT_STATICALLY'],
}]
], ],
}, },
], ],
...@@ -534,6 +537,7 @@ ...@@ -534,6 +537,7 @@
], ],
'defines': [ 'defines': [
'<@(nacl_win64_defines)', '<@(nacl_win64_defines)',
'COMPILE_CONTENT_STATICALLY',
], ],
'include_dirs': [ 'include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)/chrome', '<(SHARED_INTERMEDIATE_DIR)/chrome',
......
...@@ -97,13 +97,13 @@ ...@@ -97,13 +97,13 @@
}, },
'dependencies': [ 'dependencies': [
'installer_util_strings', 'installer_util_strings',
'<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
'common_constants', 'common_constants',
'chrome_resources.gyp:chrome_resources', 'chrome_resources.gyp:chrome_resources',
'chrome_resources.gyp:chrome_strings', 'chrome_resources.gyp:chrome_strings',
'../content/content.gyp:content_common',
'<(DEPTH)/base/base.gyp:base', '<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '<(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)/courgette/courgette.gyp:courgette_lib',
'<(DEPTH)/third_party/bspatch/bspatch.gyp:bspatch', '<(DEPTH)/third_party/bspatch/bspatch.gyp:bspatch',
'<(DEPTH)/third_party/icu/icu.gyp:icui18n', '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
...@@ -141,6 +141,14 @@ ...@@ -141,6 +141,14 @@
'installer/util/shell_util.cc', 'installer/util/shell_util.cc',
'installer/util/shell_util.h', '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', 'target_name': 'installer_util_nacl_win64',
...@@ -186,8 +194,15 @@ ...@@ -186,8 +194,15 @@
'include_dirs': [ 'include_dirs': [
'<(DEPTH)', '<(DEPTH)',
], ],
'conditions': [
['component == "shared_library"', {
'sources': [ '../content/public/common/content_switches.cc' ],
'defines': [ 'COMPILE_CONTENT_STATICALLY'],
}],
],
} }
], ],
}], }],
], ],
} }
...@@ -2360,6 +2360,16 @@ ...@@ -2360,6 +2360,16 @@
'browser/printing/print_system_task_proxy_unittest.cc', '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 @@ ...@@ -2975,6 +2985,16 @@
'../webkit/webkit.gyp:copy_npapi_test_plugin', '../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 ], # conditions
}, # target browser_tests }, # target browser_tests
{ {
......
...@@ -109,6 +109,7 @@ ...@@ -109,6 +109,7 @@
], ],
'defines': [ 'defines': [
'<@(nacl_win64_defines)', '<@(nacl_win64_defines)',
'COMPILE_CONTENT_STATICALLY',
], ],
'configurations': { 'configurations': {
'Common_Base': { 'Common_Base': {
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include "base/basictypes.h" #include "base/basictypes.h"
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "content/common/content_export.h"
#include "net/url_request/url_request_job.h" #include "net/url_request/url_request_job.h"
// This url request simulates a network error which occurs immediately after // This url request simulates a network error which occurs immediately after
...@@ -33,7 +32,7 @@ class URLRequestAbortOnEndJob : public net::URLRequestJob { ...@@ -33,7 +32,7 @@ class URLRequestAbortOnEndJob : public net::URLRequestJob {
static net::URLRequestJob* Factory(net::URLRequest* request, static net::URLRequestJob* Factory(net::URLRequest* request,
const std::string& scheme); const std::string& scheme);
CONTENT_EXPORT static void AddUrlHandler(); static void AddUrlHandler();
private: private:
explicit URLRequestAbortOnEndJob(net::URLRequest* request); explicit URLRequestAbortOnEndJob(net::URLRequest* request);
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "base/basictypes.h" #include "base/basictypes.h"
#include "base/file_path.h" #include "base/file_path.h"
#include "content/browser/browser_child_process_host.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 "content/browser/worker_host/worker_document_set.h"
#include "googleurl/src/gurl.h" #include "googleurl/src/gurl.h"
...@@ -132,7 +133,7 @@ class WorkerProcessHost : public BrowserChildProcessHost { ...@@ -132,7 +133,7 @@ class WorkerProcessHost : public BrowserChildProcessHost {
unsigned long long document_id); unsigned long long document_id);
// Terminates the given worker, i.e. based on a UI action. // 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; typedef std::list<WorkerInstance> Instances;
const Instances& instances() const { return instances_; } const Instances& instances() const { return instances_; }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#define CONTENT_COMMON_CONTENT_EXPORT_H_ #define CONTENT_COMMON_CONTENT_EXPORT_H_
#pragma once #pragma once
#if 0 // TODO(dpranke): Uncomment: defined(COMPONENT_BUILD). #if defined(COMPONENT_BUILD) && !defined(COMPILE_CONTENT_STATICALLY)
#if defined(WIN32) #if defined(WIN32)
#if defined(CONTENT_IMPLEMENTATION) #if defined(CONTENT_IMPLEMENTATION)
......
...@@ -22,8 +22,14 @@ ...@@ -22,8 +22,14 @@
# upstream unnecessarily (e.g., content_renderer depends on allocator # upstream unnecessarily (e.g., content_renderer depends on allocator
# and chrome_exe depends on content_common but we don't want # and chrome_exe depends on content_common but we don't want
# chrome_exe to have to depend on allocator). # 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': [ 'targets': [
{'target_name': 'content', {'target_name': 'content',
'type': 'none', 'type': 'none',
...@@ -192,8 +198,6 @@ ...@@ -192,8 +198,6 @@
], ],
}, },
{ # component != static_library { # component != static_library
'target_defaults': {
},
'targets': [ 'targets': [
{'target_name': 'content', {'target_name': 'content',
'type': 'shared_library', 'type': 'shared_library',
......
...@@ -6,13 +6,14 @@ ...@@ -6,13 +6,14 @@
#define CONTENT_PUBLIC_COMMON_SHOW_DESKTOP_NOTIFICATION_PARAMS_H_ #define CONTENT_PUBLIC_COMMON_SHOW_DESKTOP_NOTIFICATION_PARAMS_H_
#pragma once #pragma once
#include "content/common/content_export.h"
#include "googleurl/src/gurl.h" #include "googleurl/src/gurl.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
namespace content { namespace content {
// Parameters used when showing an HTML5 notification. // Parameters used when showing an HTML5 notification.
struct ShowDesktopNotificationHostMsgParams { struct CONTENT_EXPORT ShowDesktopNotificationHostMsgParams {
ShowDesktopNotificationHostMsgParams(); ShowDesktopNotificationHostMsgParams();
~ShowDesktopNotificationHostMsgParams(); ~ShowDesktopNotificationHostMsgParams();
......
...@@ -89,7 +89,7 @@ class CONTENT_EXPORT AudioInputDevice ...@@ -89,7 +89,7 @@ class CONTENT_EXPORT AudioInputDevice
public base::DelegateSimpleThread::Delegate, public base::DelegateSimpleThread::Delegate,
public base::RefCountedThreadSafe<AudioInputDevice> { public base::RefCountedThreadSafe<AudioInputDevice> {
public: public:
class CaptureCallback { class CONTENT_EXPORT CaptureCallback {
public: public:
virtual void Capture(const std::vector<float*>& audio_data, virtual void Capture(const std::vector<float*>& audio_data,
size_t number_of_frames, size_t number_of_frames,
...@@ -98,7 +98,7 @@ class CONTENT_EXPORT AudioInputDevice ...@@ -98,7 +98,7 @@ class CONTENT_EXPORT AudioInputDevice
virtual ~CaptureCallback() {} virtual ~CaptureCallback() {}
}; };
class CaptureEventHandler { class CONTENT_EXPORT CaptureEventHandler {
public: public:
// Notification to the client that the device with the specific index has // Notification to the client that the device with the specific index has
// been started. This callback is triggered as a result of StartDevice(). // been started. This callback is triggered as a result of StartDevice().
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <vector> #include <vector>
#include "base/basictypes.h" #include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/message_loop_proxy.h" #include "base/message_loop_proxy.h"
...@@ -92,7 +93,7 @@ ...@@ -92,7 +93,7 @@
// - Recording is currently not supported on Mac OS X. // - Recording is currently not supported on Mac OS X.
// //
class CONTENT_EXPORT WebRtcAudioDeviceImpl class CONTENT_EXPORT WebRtcAudioDeviceImpl
: public webrtc::AudioDeviceModule, : NON_EXPORTED_BASE(public webrtc::AudioDeviceModule),
public AudioDevice::RenderCallback, public AudioDevice::RenderCallback,
public AudioInputDevice::CaptureCallback, public AudioInputDevice::CaptureCallback,
public AudioInputDevice::CaptureEventHandler { public AudioInputDevice::CaptureEventHandler {
......
...@@ -59,7 +59,7 @@ struct CustomContextMenuContext; ...@@ -59,7 +59,7 @@ struct CustomContextMenuContext;
class TransportDIB; class TransportDIB;
// This object is NOT thread-safe. // This object is NOT thread-safe.
class BrokerDispatcherWrapper { class CONTENT_EXPORT BrokerDispatcherWrapper {
public: public:
BrokerDispatcherWrapper(); BrokerDispatcherWrapper();
~BrokerDispatcherWrapper(); ~BrokerDispatcherWrapper();
......
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
#define WEBKIT_APPCACHE_APPCACHE_EXPORT_H_ #define WEBKIT_APPCACHE_APPCACHE_EXPORT_H_
#pragma once #pragma once
// TODO(dpranke): Uncomment to enable appcache component build. #if defined(COMPONENT_BUILD)
#if 0 // defined(COMPONENT_BUILD)
#if defined(WIN32) #if defined(WIN32)
#if defined(APPCACHE_IMPLEMENTATION) #if defined(APPCACHE_IMPLEMENTATION)
......
...@@ -7,9 +7,6 @@ ...@@ -7,9 +7,6 @@
{ {
'target_name': 'appcache', 'target_name': 'appcache',
'variables': { 'enable_wexit_time_destructors': 1, }, 'variables': { 'enable_wexit_time_destructors': 1, },
# TODO(dpranke): Uncomment '<(component)',
# 'type': '<(component)',
'type': 'static_library',
'defines': [ 'defines': [
'APPCACHE_IMPLEMENTATION', 'APPCACHE_IMPLEMENTATION',
], ],
...@@ -20,7 +17,6 @@ ...@@ -20,7 +17,6 @@
'<(DEPTH)/net/net.gyp:net', '<(DEPTH)/net/net.gyp:net',
'<(DEPTH)/sql/sql.gyp:sql', '<(DEPTH)/sql/sql.gyp:sql',
'<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '<(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': [ 'sources': [
# This list contains all .h and .cc in appcache except for test code. # This list contains all .h and .cc in appcache except for test code.
...@@ -74,6 +70,17 @@ ...@@ -74,6 +70,17 @@
'webkit_appcache.gypi', 'webkit_appcache.gypi',
], ],
'conditions': [ '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', { ['inside_chromium_build==0', {
'dependencies': [ 'dependencies': [
'<(DEPTH)/webkit/support/setup_third_party.gyp:third_party_headers', '<(DEPTH)/webkit/support/setup_third_party.gyp:third_party_headers',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment