Enable a minimal content/ build on iOS
This removes some files from the already-upstreamed iOS content/ gyp support in order to get a minimal target building while the remaining content/ changes are upstreamed. Minor ifdefing is necessary in a few files in order to build them on iOS; these are included since they are core files without which it's very difficult to bring up a build at all. Adds one new class to the ui/ build since it's needed by the content/ code that is now built. BUG=None Review URL: https://chromiumcodereview.appspot.com/10933091 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157421 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
'dependencies': [
|
'dependencies': [
|
||||||
'some.gyp:*',
|
'some.gyp:*',
|
||||||
'../base/base.gyp:*',
|
'../base/base.gyp:*',
|
||||||
|
'../content/content.gyp:*',
|
||||||
'../crypto/crypto.gyp:*',
|
'../crypto/crypto.gyp:*',
|
||||||
'../media/media.gyp:*',
|
'../media/media.gyp:*',
|
||||||
'../net/net.gyp:*',
|
'../net/net.gyp:*',
|
||||||
@@ -32,7 +33,6 @@
|
|||||||
'dependencies': [
|
'dependencies': [
|
||||||
'../cc/cc_tests.gyp:*',
|
'../cc/cc_tests.gyp:*',
|
||||||
'../chrome/chrome.gyp:*',
|
'../chrome/chrome.gyp:*',
|
||||||
'../content/content.gyp:*',
|
|
||||||
'../gpu/gpu.gyp:*',
|
'../gpu/gpu.gyp:*',
|
||||||
'../gpu/tools/tools.gyp:*',
|
'../gpu/tools/tools.gyp:*',
|
||||||
'../ipc/ipc.gyp:*',
|
'../ipc/ipc.gyp:*',
|
||||||
|
@@ -51,6 +51,9 @@
|
|||||||
['OS=="ios"', {
|
['OS=="ios"', {
|
||||||
'sources!': [
|
'sources!': [
|
||||||
'app/content_main.cc',
|
'app/content_main.cc',
|
||||||
|
# TODO(ios): Remove this once content_main_runner builds
|
||||||
|
# for iOS.
|
||||||
|
'app/content_main_runner.cc',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
],
|
],
|
||||||
|
@@ -845,16 +845,13 @@
|
|||||||
'sources/': [
|
'sources/': [
|
||||||
# iOS only needs a small portion of content; exclude all the
|
# iOS only needs a small portion of content; exclude all the
|
||||||
# implementation, and re-include what is used.
|
# implementation, and re-include what is used.
|
||||||
['exclude', '\\.cc$'],
|
['exclude', '\\.(cc|mm)$'],
|
||||||
['exclude', '\\.mm$'],
|
|
||||||
['include', '_ios\\.(cc|mm)$'],
|
['include', '_ios\\.(cc|mm)$'],
|
||||||
|
['include', '^public/browser/content_browser_client\\.cc$'],
|
||||||
['include', '^public/browser/notification_registrar\\.cc$'],
|
['include', '^public/browser/notification_registrar\\.cc$'],
|
||||||
['include', '^public/browser/speech_recognition_'],
|
['include', '^public/browser/speech_recognition_'],
|
||||||
['include', '^browser/browser_context\\.cc$'],
|
['include', '^browser/browser_context\\.cc$'],
|
||||||
['include', '^browser/notification_service_impl\\.cc$'],
|
['include', '^browser/notification_service_impl\\.cc$'],
|
||||||
# Pull in all but one file from speech.
|
|
||||||
['include', '^browser/speech/'],
|
|
||||||
['exclude', '^browser/speech/input_tag_speech_dispatcher_host\\.cc$$'],
|
|
||||||
],
|
],
|
||||||
}, { # OS!="ios"
|
}, { # OS!="ios"
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
|
@@ -11,7 +11,6 @@
|
|||||||
'../skia/skia.gyp:skia',
|
'../skia/skia.gyp:skia',
|
||||||
'../third_party/icu/icu.gyp:icuuc',
|
'../third_party/icu/icu.gyp:icuuc',
|
||||||
'../ui/ui.gyp:ui',
|
'../ui/ui.gyp:ui',
|
||||||
'../webkit/support/webkit_support.gyp:forms',
|
|
||||||
'../webkit/support/webkit_support.gyp:user_agent',
|
'../webkit/support/webkit_support.gyp:user_agent',
|
||||||
],
|
],
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
@@ -381,6 +380,7 @@
|
|||||||
# implementation, and re-include what is used.
|
# implementation, and re-include what is used.
|
||||||
['exclude', '\\.(cc|mm)$'],
|
['exclude', '\\.(cc|mm)$'],
|
||||||
['include', '_ios\\.(cc|mm)$'],
|
['include', '_ios\\.(cc|mm)$'],
|
||||||
|
['include', '^public/common/content_client\\.cc$'],
|
||||||
['include', '^public/common/content_constants\\.cc$'],
|
['include', '^public/common/content_constants\\.cc$'],
|
||||||
['include', '^public/common/content_switches\\.cc$'],
|
['include', '^public/common/content_switches\\.cc$'],
|
||||||
['include', '^public/common/frame_navigate_params\\.cc$'],
|
['include', '^public/common/frame_navigate_params\\.cc$'],
|
||||||
@@ -407,6 +407,7 @@
|
|||||||
'../webkit/support/webkit_support.gyp:blob',
|
'../webkit/support/webkit_support.gyp:blob',
|
||||||
'../webkit/support/webkit_support.gyp:database',
|
'../webkit/support/webkit_support.gyp:database',
|
||||||
'../webkit/support/webkit_support.gyp:fileapi',
|
'../webkit/support/webkit_support.gyp:fileapi',
|
||||||
|
'../webkit/support/webkit_support.gyp:forms',
|
||||||
'../webkit/support/webkit_support.gyp:webkit_base',
|
'../webkit/support/webkit_support.gyp:webkit_base',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
|
@@ -14,10 +14,6 @@
|
|||||||
'content_browser',
|
'content_browser',
|
||||||
'content_common',
|
'content_common',
|
||||||
'../net/net.gyp:net_test_support',
|
'../net/net.gyp:net_test_support',
|
||||||
'../ppapi/ppapi_internal.gyp:ppapi_host',
|
|
||||||
'../ppapi/ppapi_internal.gyp:ppapi_proxy',
|
|
||||||
'../ppapi/ppapi_internal.gyp:ppapi_shared',
|
|
||||||
'../ppapi/ppapi_internal.gyp:ppapi_unittest_shared',
|
|
||||||
'../skia/skia.gyp:skia',
|
'../skia/skia.gyp:skia',
|
||||||
'../testing/gmock.gyp:gmock',
|
'../testing/gmock.gyp:gmock',
|
||||||
'../testing/gtest.gyp:gtest',
|
'../testing/gtest.gyp:gtest',
|
||||||
@@ -151,10 +147,13 @@
|
|||||||
['include', '^public/test/content_test_suite_base\\.cc$'],
|
['include', '^public/test/content_test_suite_base\\.cc$'],
|
||||||
['include', '^public/test/mock_notification_observer\\.cc$'],
|
['include', '^public/test/mock_notification_observer\\.cc$'],
|
||||||
['include', '^public/test/mock_resource_context\\.cc$'],
|
['include', '^public/test/mock_resource_context\\.cc$'],
|
||||||
['include', '^public/test/test_browser_thread\\.cc$'],
|
|
||||||
['include', '^public/test/test_content_client_initializer\\.cc$'],
|
['include', '^public/test/test_content_client_initializer\\.cc$'],
|
||||||
['include', '^public/test/test_notification_tracker\\.cc$'],
|
['include', '^public/test/test_notification_tracker\\.cc$'],
|
||||||
['include', '^public/test/test_utils\\.cc$'],
|
['include', '^public/test/test_utils\\.cc$'],
|
||||||
|
['include', '^public/test/unittest_test_suite\\.cc$'],
|
||||||
|
['include', '^test/content_test_suite\\.cc$'],
|
||||||
|
['include', '^test/test_content_browser_client\\.cc$'],
|
||||||
|
['include', '^test/test_content_client\\.cc$'],
|
||||||
],
|
],
|
||||||
}, { # OS != "ios"
|
}, { # OS != "ios"
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
@@ -240,7 +239,6 @@
|
|||||||
'../testing/gmock.gyp:gmock',
|
'../testing/gmock.gyp:gmock',
|
||||||
'../testing/gtest.gyp:gtest',
|
'../testing/gtest.gyp:gtest',
|
||||||
'../ui/ui.gyp:ui',
|
'../ui/ui.gyp:ui',
|
||||||
'../webkit/support/webkit_support.gyp:forms',
|
|
||||||
'../webkit/support/webkit_support.gyp:user_agent',
|
'../webkit/support/webkit_support.gyp:user_agent',
|
||||||
],
|
],
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
@@ -465,9 +463,7 @@
|
|||||||
# implementation, and re-include what is used.
|
# implementation, and re-include what is used.
|
||||||
['exclude', '\\.(cc|mm)$'],
|
['exclude', '\\.(cc|mm)$'],
|
||||||
['include', '_ios\\.(cc|mm)$'],
|
['include', '_ios\\.(cc|mm)$'],
|
||||||
['include', '^browser/browser_thread_unittest\\.cc$'],
|
|
||||||
['include', '^browser/notification_service_impl_unittest\\.cc$'],
|
['include', '^browser/notification_service_impl_unittest\\.cc$'],
|
||||||
['include', '^browser/speech/.*_unittest\\.cc$'],
|
|
||||||
['include', '^test/run_all_unittests\\.cc$'],
|
['include', '^test/run_all_unittests\\.cc$'],
|
||||||
],
|
],
|
||||||
}, { # OS != "ios"
|
}, { # OS != "ios"
|
||||||
@@ -491,6 +487,7 @@
|
|||||||
'../webkit/support/webkit_support.gyp:database',
|
'../webkit/support/webkit_support.gyp:database',
|
||||||
'../webkit/support/webkit_support.gyp:dom_storage',
|
'../webkit/support/webkit_support.gyp:dom_storage',
|
||||||
'../webkit/support/webkit_support.gyp:fileapi',
|
'../webkit/support/webkit_support.gyp:fileapi',
|
||||||
|
'../webkit/support/webkit_support.gyp:forms',
|
||||||
'../webkit/support/webkit_support.gyp:glue',
|
'../webkit/support/webkit_support.gyp:glue',
|
||||||
'../webkit/support/webkit_support.gyp:quota',
|
'../webkit/support/webkit_support.gyp:quota',
|
||||||
'../webkit/support/webkit_support.gyp:webkit_base',
|
'../webkit/support/webkit_support.gyp:webkit_base',
|
||||||
|
@@ -5,9 +5,12 @@
|
|||||||
#include "content/public/app/content_main_delegate.h"
|
#include "content/public/app/content_main_delegate.h"
|
||||||
|
|
||||||
#include "content/public/browser/content_browser_client.h"
|
#include "content/public/browser/content_browser_client.h"
|
||||||
|
|
||||||
|
#if !defined(OS_IOS)
|
||||||
#include "content/public/plugin/content_plugin_client.h"
|
#include "content/public/plugin/content_plugin_client.h"
|
||||||
#include "content/public/renderer/content_renderer_client.h"
|
#include "content/public/renderer/content_renderer_client.h"
|
||||||
#include "content/public/utility/content_utility_client.h"
|
#include "content/public/utility/content_utility_client.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace content {
|
namespace content {
|
||||||
|
|
||||||
@@ -50,15 +53,27 @@ ContentBrowserClient* ContentMainDelegate::CreateContentBrowserClient() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ContentPluginClient* ContentMainDelegate::CreateContentPluginClient() {
|
ContentPluginClient* ContentMainDelegate::CreateContentPluginClient() {
|
||||||
|
#if defined(OS_IOS)
|
||||||
|
return NULL;
|
||||||
|
#else
|
||||||
return new ContentPluginClient();
|
return new ContentPluginClient();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
ContentRendererClient* ContentMainDelegate::CreateContentRendererClient() {
|
ContentRendererClient* ContentMainDelegate::CreateContentRendererClient() {
|
||||||
|
#if defined(OS_IOS)
|
||||||
|
return NULL;
|
||||||
|
#else
|
||||||
return new ContentRendererClient();
|
return new ContentRendererClient();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
ContentUtilityClient* ContentMainDelegate::CreateContentUtilityClient() {
|
ContentUtilityClient* ContentMainDelegate::CreateContentUtilityClient() {
|
||||||
|
#if defined(OS_IOS)
|
||||||
|
return NULL;
|
||||||
|
#else
|
||||||
return new ContentUtilityClient();
|
return new ContentUtilityClient();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace content
|
} // namespace content
|
||||||
|
@@ -7,9 +7,12 @@
|
|||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "base/string_piece.h"
|
#include "base/string_piece.h"
|
||||||
#include "ui/gfx/image/image.h"
|
#include "ui/gfx/image/image.h"
|
||||||
#include "webkit/plugins/ppapi/host_globals.h"
|
|
||||||
#include "webkit/user_agent/user_agent.h"
|
#include "webkit/user_agent/user_agent.h"
|
||||||
|
|
||||||
|
#if !defined(OS_IOS)
|
||||||
|
#include "webkit/plugins/ppapi/host_globals.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace content {
|
namespace content {
|
||||||
|
|
||||||
static ContentClient* g_client;
|
static ContentClient* g_client;
|
||||||
@@ -35,7 +38,11 @@ const std::string& GetUserAgent(const GURL& url) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
webkit::ppapi::HostGlobals* GetHostGlobals() {
|
webkit::ppapi::HostGlobals* GetHostGlobals() {
|
||||||
|
#if defined(OS_IOS)
|
||||||
|
return NULL;
|
||||||
|
#else
|
||||||
return webkit::ppapi::HostGlobals::Get();
|
return webkit::ppapi::HostGlobals::Get();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
ContentClient::ContentClient()
|
ContentClient::ContentClient()
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
namespace content {
|
namespace content {
|
||||||
|
|
||||||
|
#if !defined(OS_IOS)
|
||||||
// A stubbed out WebKit platform support impl.
|
// A stubbed out WebKit platform support impl.
|
||||||
class UnitTestTestSuite::UnitTestWebKitPlatformSupport
|
class UnitTestTestSuite::UnitTestWebKitPlatformSupport
|
||||||
: public WebKit::WebKitPlatformSupport {
|
: public WebKit::WebKitPlatformSupport {
|
||||||
@@ -37,16 +38,21 @@ class UnitTestTestSuite::UnitTestWebKitPlatformSupport
|
|||||||
private:
|
private:
|
||||||
webkit::WebCompositorSupportImpl compositor_support_;
|
webkit::WebCompositorSupportImpl compositor_support_;
|
||||||
};
|
};
|
||||||
|
#endif // !OS_IOS
|
||||||
|
|
||||||
UnitTestTestSuite::UnitTestTestSuite(base::TestSuite* test_suite)
|
UnitTestTestSuite::UnitTestTestSuite(base::TestSuite* test_suite)
|
||||||
: test_suite_(test_suite) {
|
: test_suite_(test_suite) {
|
||||||
DCHECK(test_suite);
|
DCHECK(test_suite);
|
||||||
|
#if !defined(OS_IOS)
|
||||||
webkit_platform_support_.reset(new UnitTestWebKitPlatformSupport);
|
webkit_platform_support_.reset(new UnitTestWebKitPlatformSupport);
|
||||||
WebKit::initialize(webkit_platform_support_.get());
|
WebKit::initialize(webkit_platform_support_.get());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
UnitTestTestSuite::~UnitTestTestSuite() {
|
UnitTestTestSuite::~UnitTestTestSuite() {
|
||||||
|
#if !defined(OS_IOS)
|
||||||
WebKit::shutdown();
|
WebKit::shutdown();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int UnitTestTestSuite::Run() {
|
int UnitTestTestSuite::Run() {
|
||||||
|
@@ -30,8 +30,10 @@ class UnitTestTestSuite {
|
|||||||
private:
|
private:
|
||||||
scoped_ptr<base::TestSuite> test_suite_;
|
scoped_ptr<base::TestSuite> test_suite_;
|
||||||
|
|
||||||
|
#if !defined(OS_IOS)
|
||||||
class UnitTestWebKitPlatformSupport;
|
class UnitTestWebKitPlatformSupport;
|
||||||
scoped_ptr<UnitTestWebKitPlatformSupport> webkit_platform_support_;
|
scoped_ptr<UnitTestWebKitPlatformSupport> webkit_platform_support_;
|
||||||
|
#endif
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(UnitTestTestSuite);
|
DISALLOW_COPY_AND_ASSIGN(UnitTestTestSuite);
|
||||||
};
|
};
|
||||||
|
@@ -10,8 +10,6 @@
|
|||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "content/test/test_web_contents_view.h"
|
#include "content/test/test_web_contents_view.h"
|
||||||
#include "googleurl/src/gurl.h"
|
#include "googleurl/src/gurl.h"
|
||||||
#include "third_party/skia/include/core/SkBitmap.h"
|
|
||||||
#include "ui/base/clipboard/clipboard.h"
|
|
||||||
|
|
||||||
namespace content {
|
namespace content {
|
||||||
|
|
||||||
@@ -24,9 +22,13 @@ TestContentBrowserClient::~TestContentBrowserClient() {
|
|||||||
WebContentsView* TestContentBrowserClient::OverrideCreateWebContentsView(
|
WebContentsView* TestContentBrowserClient::OverrideCreateWebContentsView(
|
||||||
WebContents* web_contents,
|
WebContents* web_contents,
|
||||||
RenderViewHostDelegateView** render_view_host_delegate_view) {
|
RenderViewHostDelegateView** render_view_host_delegate_view) {
|
||||||
|
#if defined(OS_IOS)
|
||||||
|
return NULL;
|
||||||
|
#else
|
||||||
TestWebContentsView* rv = new TestWebContentsView;
|
TestWebContentsView* rv = new TestWebContentsView;
|
||||||
*render_view_host_delegate_view = rv;
|
*render_view_host_delegate_view = rv;
|
||||||
return rv;
|
return rv;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath TestContentBrowserClient::GetDefaultDownloadDirectory() {
|
FilePath TestContentBrowserClient::GetDefaultDownloadDirectory() {
|
||||||
|
@@ -45,6 +45,9 @@
|
|||||||
'base/layout.h',
|
'base/layout.h',
|
||||||
'base/models/tree_node_iterator.h',
|
'base/models/tree_node_iterator.h',
|
||||||
'base/models/tree_node_model.h',
|
'base/models/tree_node_model.h',
|
||||||
|
'base/resource/data_pack.cc',
|
||||||
|
'base/resource/data_pack.h',
|
||||||
|
'base/resource/resource_handle.h',
|
||||||
'base/ui_base_paths.cc',
|
'base/ui_base_paths.cc',
|
||||||
'base/ui_base_paths.h',
|
'base/ui_base_paths.h',
|
||||||
'base/ui_base_switches.cc',
|
'base/ui_base_switches.cc',
|
||||||
@@ -317,8 +320,6 @@
|
|||||||
'base/range/range.h',
|
'base/range/range.h',
|
||||||
'base/range/range_mac.mm',
|
'base/range/range_mac.mm',
|
||||||
'base/range/range_win.cc',
|
'base/range/range_win.cc',
|
||||||
'base/resource/data_pack.cc',
|
|
||||||
'base/resource/data_pack.h',
|
|
||||||
'base/resource/resource_bundle.cc',
|
'base/resource/resource_bundle.cc',
|
||||||
'base/resource/resource_bundle.h',
|
'base/resource/resource_bundle.h',
|
||||||
'base/resource/resource_bundle_android.cc',
|
'base/resource/resource_bundle_android.cc',
|
||||||
@@ -329,7 +330,6 @@
|
|||||||
'base/resource/resource_bundle_win.h',
|
'base/resource/resource_bundle_win.h',
|
||||||
'base/resource/resource_data_dll_win.cc',
|
'base/resource/resource_data_dll_win.cc',
|
||||||
'base/resource/resource_data_dll_win.h',
|
'base/resource/resource_data_dll_win.h',
|
||||||
'base/resource/resource_handle.h',
|
|
||||||
'base/text/bytes_formatting.cc',
|
'base/text/bytes_formatting.cc',
|
||||||
'base/text/bytes_formatting.h',
|
'base/text/bytes_formatting.h',
|
||||||
'base/text/text_elider.cc',
|
'base/text/text_elider.cc',
|
||||||
|
Reference in New Issue
Block a user