diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-29 21:08:32 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-29 21:08:32 +0000 |
commit | 4db51ec6941bfbad574f812730206b5519bbe7c4 (patch) | |
tree | 0d15d5ebf89efef7df2d990d17f006e011d08198 | |
parent | 7c80c11dc1ae2a886b3d6759d41bd04c9be7a60a (diff) | |
download | chromium_src-4db51ec6941bfbad574f812730206b5519bbe7c4.zip chromium_src-4db51ec6941bfbad574f812730206b5519bbe7c4.tar.gz chromium_src-4db51ec6941bfbad574f812730206b5519bbe7c4.tar.bz2 |
Start work on adding content/browser to GN build.
This is not yet hooked up.
Adds power_gadget build file.
Removes blink headers stub config now that the real target exists.
TBR=scottmg
Review URL: https://codereview.chromium.org/300383002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273594 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/BUILD.gn | 9 | ||||
-rw-r--r-- | content/browser/BUILD.gn | 379 | ||||
-rw-r--r-- | content/browser/browser.gni | 15 | ||||
-rw-r--r-- | content/common/BUILD.gn | 7 | ||||
-rw-r--r-- | content/public/browser/BUILD.gn | 9 | ||||
-rw-r--r-- | content/public/common/BUILD.gn | 4 | ||||
-rw-r--r-- | content/public/renderer/BUILD.gn | 2 | ||||
-rw-r--r-- | content/renderer/BUILD.gn | 2 | ||||
-rw-r--r-- | third_party/power_gadget/BUILD.gn | 12 |
9 files changed, 421 insertions, 18 deletions
diff --git a/content/BUILD.gn b/content/BUILD.gn index acdd32d..d065e1b 100644 --- a/content/BUILD.gn +++ b/content/BUILD.gn @@ -15,15 +15,6 @@ grit("resources") { # Stubs ------------------------------------------------------------------------ -# TODO(brettw) remove this and add a proper dependency on blink once that -# target has been converted to GN. This config sets up the include directories -# so content can compile in the meantime. -# -# This corresponds to third_party/WebKit/public/blink_headers.gyp:blink_headers -config("blink_headers_stub_config") { - include_dirs = [ "//third_party/WebKit" ] -} - # TODO(brettw) remove this and add a proper dependency on libjingle once that # target has been converted to GN. This config sets up the include directories # so content can compile in the meantime. diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn new file mode 100644 index 0000000..1cddc6a --- /dev/null +++ b/content/browser/BUILD.gn @@ -0,0 +1,379 @@ +# Copyright 2014 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. + +import("//build/config/features.gni") +import("//build/config/ui.gni") +import("//content/browser/browser.gni") + +source_set("browser") { + # Only targets in the content tree can depend directly on this target. + visibility = [ "//content/*" ] + + sources = rebase_path(content_browser_gypi_values.private_browser_sources, + ".", "//content") + + # TODO(GYP) these generated files are listed as sources in content_browser. + # This is a bit suspicious. The GN grit template will make a source set + # containing the generated code so it should be sufficient to just depend + # on the grit rule. But maybe some of these will need to be added? + # + # Need this annoying rebase_path call to match what happened with the sources. + sources -= rebase_path([ + "$root_gen_dir/webkit/grit/devtools_resources.h", + "$root_gen_dir/webkit/grit/devtools_resources_map.cc", + "$root_gen_dir/webkit/grit/devtools_resources_map.h", + "$root_gen_dir/content/browser/tracing/grit/tracing_resources.h", + "$root_gen_dir/ui/ui_resources/grit/webui_resources_map.cc", + "$root_gen_dir/content/browser/devtools/devtools_protocol_constants.cc", + "$root_gen_dir/content/browser/devtools/devtools_protocol_constants.h", + ], ".") + + configs += [ "//content:content_implementation" ] + + deps = [ + "//base", + "//crypto", + "//net", + "//skia", + "//sql", + "//third_party/re2", + "//third_party/WebKit/public:blink_headers", + "//third_party/zlib", + "//third_party/zlib:zip", + "//ui/accessibility", + "//ui/accessibility:ax_gen", + "//ui/base:ui_base", + "//ui/events", + "//ui/events:gesture_detection", + "//ui/gfx", + "//ui/gfx/geometry", + "//ui/resources", + # TODO(GYP) + #"//ui/snapshot", + #'../google_apis/google_apis.gyp:google_apis', + #'browser/service_worker/service_worker_proto.gyp:database_proto', + #'browser/speech/proto/speech_proto.gyp:speech_proto', + #'browser/devtools/devtools_resources.gyp:devtools_resources', + #'content_common_mojo_bindings', + #'../cc/cc.gyp:cc', + #'../mojo/mojo.gyp:mojo_cpp_bindings', + #'../mojo/mojo.gyp:mojo_js_bindings', + #'../mojo/mojo.gyp:mojo_service_provider_bindings', + #'../net/net.gyp:http_server', + #'../third_party/leveldatabase/leveldatabase.gyp:leveldatabase', + #'../ui/surface/surface.gyp:surface', + #'../webkit/common/webkit_common.gyp:webkit_common', + #'../webkit/storage_browser.gyp:webkit_storage_browser', + #'../webkit/storage_common.gyp:webkit_storage_common', + #'../webkit/webkit_resources.gyp:webkit_resources', + #'../webkit/webkit_resources.gyp:webkit_strings', + #'../third_party/angle/src/build_angle.gyp:commit_id', + ] + + if (toolkit_views) { + deps += [ "//ui/events" ] + } + + if (is_win) { + sources += [ + "power_profiles/power_data_provider_ia_win.cc", + "power_profiles/power_data_provider_ia_win.h", + ] + deps += [ "//third_party/power_gadget" ] + } else { + sources += [ "power_profiler/power_data_provider_dummy.cc" ] + } + + if (!is_win && !is_mac && (!is_linux || !use_udev)) { + sources += [ "browser/gamepad/gamepad_platform_data_fetcher.cc" ] + } + + if (is_ios) { + # TODO(GYP) lots of inclusions and exclusions for iOS. + } + + if (enable_printing != 0) { + #TODO(GYP) + #deps += [ "//printing" ] + } + +# TODO(GYP) +# ['OS!="ios" and chrome_multiple_dll!=1', { +# 'dependencies': [ +# '../third_party/WebKit/public/blink.gyp:blink', +# ], +# }], +# ['OS!="mac" and OS!="ios"', { +# 'dependencies': [ +# '../sandbox/sandbox.gyp:sandbox', +# ], +# }], +# ['OS!="android" and OS!="ios"', { +# 'dependencies': [ +# 'browser/tracing/tracing_resources.gyp:tracing_resources', +# ], +# }], +# ['OS!="ios"', { +# 'dependencies': [ +# '../third_party/libyuv/libyuv.gyp:libyuv', +# ], +# }], +# ['enable_webrtc==1', { +# 'dependencies': [ +# '../jingle/jingle.gyp:jingle_glue', +# ], +# 'sources': [ +# 'browser/renderer_host/media/peer_connection_tracker_host.cc', +# 'browser/renderer_host/media/peer_connection_tracker_host.h', +# 'browser/renderer_host/media/webrtc_identity_service_host.cc', +# 'browser/renderer_host/media/webrtc_identity_service_host.h', +# 'browser/renderer_host/p2p/socket_host.cc', +# 'browser/renderer_host/p2p/socket_host.h', +# 'browser/renderer_host/p2p/socket_host_tcp.cc', +# 'browser/renderer_host/p2p/socket_host_tcp.h', +# 'browser/renderer_host/p2p/socket_host_tcp_server.cc', +# 'browser/renderer_host/p2p/socket_host_tcp_server.h', +# 'browser/renderer_host/p2p/socket_host_throttler.cc', +# 'browser/renderer_host/p2p/socket_host_throttler.h', +# 'browser/renderer_host/p2p/socket_host_udp.cc', +# 'browser/renderer_host/p2p/socket_host_udp.h', +# 'browser/renderer_host/p2p/socket_dispatcher_host.cc', +# 'browser/renderer_host/p2p/socket_dispatcher_host.h', +# ], +# }], +# ['enable_webrtc==1 and OS=="linux"', { +# 'dependencies': [ +# '../third_party/libjingle/libjingle.gyp:libjingle_webrtc', +# ], +# }], +# ['enable_webrtc==1 and (OS=="linux" or OS=="mac" or OS=="win")', { +# 'sources': [ +# 'browser/media/capture/desktop_capture_device.cc', +# 'browser/media/capture/desktop_capture_device.h', +# 'browser/media/capture/desktop_capture_device_aura.cc', +# 'browser/media/capture/desktop_capture_device_aura.h', +# 'browser/media/capture/desktop_capture_device_uma_types.cc', +# 'browser/media/capture/desktop_capture_device_uma_types.h', +# ], +# 'dependencies': [ +# '../third_party/webrtc/modules/modules.gyp:desktop_capture', +# ], +# 'defines': [ +# 'ENABLE_SCREEN_CAPTURE=1', +# ], +# }], +# ['OS=="win"', { +# 'dependencies': [ +# # For accessibility +# '../third_party/iaccessible2/iaccessible2.gyp:iaccessible2', +# '../third_party/isimpledom/isimpledom.gyp:isimpledom', +# ], +# 'sources/': [ +# ['exclude', '^browser/device_sensors/data_fetcher_shared_memory_default.cc$'], +# ], +# 'defines': [ +# # This prevents the inclusion of atlhost.h which paired +# # with the windows 8 sdk it does the wrong thing. +# '__ATLHOST_H__', +# ], +# 'link_settings': { +# 'libraries': [ +# '-lcomctl32.lib', +# '-ldinput8.lib', +# '-ldwmapi.lib', +# '-ldxguid.lib', +# '-lsensorsapi.lib', +# '-lportabledeviceguids.lib', +# ], +# 'msvs_settings': { +# 'VCLinkerTool': { +# 'DelayLoadDLLs': [ +# 'dinput8.dll', +# 'user32.dll', +# 'dwmapi.dll', +# ], +# }, +# }, +# }, +# }], +# ['OS=="linux"', { +# 'dependencies': [ +# '../sandbox/sandbox.gyp:libc_urandom_override', +# ], +# }], +# ['use_udev == 1', { +# 'dependencies': [ +# '../build/linux/system.gyp:udev', +# ], +# }, { +# 'sources!': [ +# 'browser/device_monitor_udev.cc', +# 'browser/device_monitor_udev.h', +# 'browser/gamepad/gamepad_platform_data_fetcher_linux.cc', +# 'browser/udev_linux.cc', +# 'browser/udev_linux.h', +# ], +# }], +# ['OS=="linux" and use_aura==1', { +# 'dependencies': [ +# '../build/linux/system.gyp:fontconfig', +# ], +# }], +# ['use_x11==1', { +# 'dependencies': [ +# '../build/linux/system.gyp:x11', +# ], +# }], +# ['use_pango==1', { +# 'dependencies': [ +# '../build/linux/system.gyp:pangocairo', +# ], +# 'sources!': [ +# 'browser/renderer_host/pepper/pepper_truetype_font_list_ozone.cc', +# ], +# }], +# ['OS=="android"', { +# 'dependencies': [ +# '../media/media.gyp:media', +# 'content.gyp:content_jni_headers', +# ], +# 'link_settings': { +# 'libraries': [ +# '-ljnigraphics', +# ], +# }, +# 'sources/': [ +# ['exclude', '^browser/battery_status/battery_status_manager_default.cc$'], +# ['exclude', '^browser/device_sensors/data_fetcher_shared_memory_default.cc$'], +# ['exclude', '^browser/geolocation/network_location_provider\\.(cc|h)$'], +# ['exclude', '^browser/geolocation/network_location_request\\.(cc|h)$'], +# ['exclude', '^browser/tracing/tracing_ui'], +# ['exclude', '^browser/speech/'], +# ['include', '^browser/speech/speech_recognition_dispatcher_host\\.(cc|h)$'], +# ['include', '^browser/speech/speech_recognition_manager_impl\\.(cc|h)$'], +# ['include', '^browser/speech/speech_recognizer\\.h$'], +# ['include', '^browser/speech/speech_recognizer_impl_android\\.(cc|h)$'], +# ], +# 'sources!': [ +# 'browser/browser_ipc_logging.cc', +# 'browser/font_list_async.cc', +# 'browser/geolocation/device_data_provider.cc', +# 'browser/geolocation/empty_device_data_provider.cc', +# 'browser/geolocation/wifi_data_provider_common.cc', +# 'browser/renderer_host/native_web_keyboard_event.cc', +# ] +# }, { # OS!="android" +# 'sources/': [ +# ['exclude', '^browser/renderer_host/java/'], +# ['exclude', '^browser/speech/speech_recognizer_impl_android\\.(cc|h)'], +# ], +# }], +# ['OS=="mac"', { +# 'sources/': [ +# ['exclude', '^browser/device_sensors/data_fetcher_shared_memory_default.cc$'], +# ], +# 'sources!': [ +# 'browser/geolocation/empty_wifi_data_provider.cc', +# ], +# 'dependencies': [ +# '../third_party/mozilla/mozilla.gyp:mozilla', +# '../third_party/sudden_motion_sensor/sudden_motion_sensor.gyp:sudden_motion_sensor', +# ], +# 'link_settings': { +# 'libraries': [ +# '$(SDKROOT)/usr/lib/libbsm.dylib', +# ], +# }, +# }], +# ['chromeos==1', { +# 'dependencies': [ +# '../build/linux/system.gyp:dbus', +# '../chromeos/chromeos.gyp:power_manager_proto', +# ], +# 'sources!': [ +# 'browser/geolocation/wifi_data_provider_linux.cc', +# 'browser/power_save_blocker_ozone.cc', +# 'browser/power_save_blocker_x11.cc', +# ], +# }], +# ['os_bsd==1', { +# 'sources/': [ +# ['exclude', '^browser/gamepad/gamepad_platform_data_fetcher_linux\\.cc$'], +# ], +# }], +# ['use_aura==1', { +# 'dependencies': [ +# '../ui/aura/aura.gyp:aura', +# '../ui/strings/ui_strings.gyp:ui_strings', +# ], +# }, { +# 'sources/': [ +# ['exclude', '^browser/renderer_host/render_widget_host_view_aura.cc'], +# ['exclude', '^browser/renderer_host/render_widget_host_view_aura.h'], +# ['exclude', '^browser/web_contents/touch_editable_impl_aura.cc'], +# ['exclude', '^browser/web_contents/touch_editable_impl_aura.h'], +# ['exclude', '^browser/renderer_host/ui_events_helper.cc'], +# ['exclude', '^browser/renderer_host/ui_events_helper.h'], +# ['exclude', '^browser/context_factory.cc'], +# ['exclude', '^public/browser/context_factory.h'], +# ], +# }], +# ['use_aura==1 or OS=="mac"', { +# 'dependencies': [ +# '../ui/compositor/compositor.gyp:compositor', +# ], +# }, { +# 'sources/': [ +# ['exclude', '^browser/compositor/'], +# ] +# }], +# ['enable_plugins==1', { +# 'dependencies': [ +# '../ppapi/ppapi_internal.gyp:ppapi_ipc', +# '../ppapi/ppapi_internal.gyp:ppapi_shared', +# ], +# }, { # enable_plugins==0 +# 'sources!': [ +# 'browser/pepper_flash_settings_helper_impl.cc', +# 'browser/pepper_flash_settings_helper_impl.h', +# 'browser/plugin_data_remover_impl.cc', +# 'browser/plugin_data_remover_impl.h', +# 'browser/plugin_loader_posix.cc', +# 'browser/plugin_loader_posix.h', +# 'browser/plugin_process_host.cc', +# 'browser/plugin_process_host.h', +# 'browser/plugin_service_impl.cc', +# 'browser/plugin_service_impl.h', +# 'browser/ppapi_plugin_process_host.cc', +# 'public/browser/plugin_service.h', +# ], +# 'sources/': [ +# ['exclude', '^browser/renderer_host/pepper/'], +# ], +# }], +# ['input_speech==1', { +# 'dependencies': [ +# '../third_party/flac/flac.gyp:libflac', +# '../third_party/speex/speex.gyp:libspeex', +# ], +# }], +# ['OS == "win"', { +# 'sources!': [ +# 'browser/geolocation/empty_wifi_data_provider.cc', +# ], +# }], +# ['OS == "linux" and use_dbus==1', { +# 'sources!': [ +# 'browser/geolocation/empty_wifi_data_provider.cc', +# ], +# 'dependencies': [ +# '../build/linux/system.gyp:dbus', +# '../dbus/dbus.gyp:dbus', +# ], +# }, { # OS != "linux" or use_dbus==0 +# 'sources!': [ +# 'browser/geolocation/wifi_data_provider_linux.cc', +# ], +# }], +} diff --git a/content/browser/browser.gni b/content/browser/browser.gni new file mode 100644 index 0000000..b7e8d7f --- /dev/null +++ b/content/browser/browser.gni @@ -0,0 +1,15 @@ +# Copyright 2014 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. + +# This file defines the content browser gypi values. This file is read once and +# cached, which is a performance optimization that allows us to share the +# results of parsing the .gypi file between the public and private BUILD.gn +# files. It also saves us from duplicating this exec_script call. +content_browser_gypi_values = exec_script( + "//build/gypi_to_gn.py", + [ rebase_path("../content_browser.gypi"), + "--replace=<(SHARED_INTERMEDIATE_DIR)=$root_gen_dir" ], + "scope", + [ "../content_browser.gypi" ]) + diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn index a62b8a8..e26c071 100644 --- a/content/common/BUILD.gn +++ b/content/common/BUILD.gn @@ -15,12 +15,11 @@ source_set("common") { ".", "//content") forward_dependent_configs_from = [ - # TODO(GYP) convert these dependencies. - #"//third_party/WebKit/public:blink_headers", + "//gpu/command_buffer/common", + "//third_party/WebKit/public:blink_headers", ] configs += [ - "//content:blink_headers_stub_config", "//content:content_implementation", "//content:libjingle_stub_config", ] @@ -38,8 +37,8 @@ source_set("common") { "//ui/gfx", "//ui/gfx/geometry", "//url", + "//third_party/WebKit/public:blink_headers", # TODO(GYP) convert these dependencies. - #"//third_party/WebKit/public:blink_headers", #'../third_party/libjingle/libjingle.gyp:libjingle', #'../ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs', ] diff --git a/content/public/browser/BUILD.gn b/content/public/browser/BUILD.gn new file mode 100644 index 0000000..a258390 --- /dev/null +++ b/content/public/browser/BUILD.gn @@ -0,0 +1,9 @@ +# Copyright 2014 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. + +source_set("browser") { + deps = [ + "//content/browser", + ] +} diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn index 8bef0b6..32fd84e 100644 --- a/content/public/common/BUILD.gn +++ b/content/public/common/BUILD.gn @@ -10,13 +10,11 @@ source_set("common") { configs += [ "//content:content_implementation", - # TODO(GYP) remove when blink_headers target is converted. - "//content:blink_headers_stub_config", ] deps = [ "//content/common", "//skia", - #"//third_party/WebKit/public:blink_headers", + "//third_party/WebKit/public:blink_headers", ] } diff --git a/content/public/renderer/BUILD.gn b/content/public/renderer/BUILD.gn index f4a51dd..c5441796 100644 --- a/content/public/renderer/BUILD.gn +++ b/content/public/renderer/BUILD.gn @@ -10,7 +10,6 @@ source_set("renderer") { ".", "//content") configs += [ - "//content:blink_headers_stub_config", "//content:content_implementation", "//content:libjingle_stub_config", "//content:v8_stub_config", @@ -20,6 +19,7 @@ source_set("renderer") { deps = [ "//content/renderer", "//skia", + "//third_party/WebKit/public:blink_headers", ] if (enable_webrtc) { diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn index c4e074f..38a168c 100644 --- a/content/renderer/BUILD.gn +++ b/content/renderer/BUILD.gn @@ -14,7 +14,6 @@ source_set("renderer") { ".", "//content") configs += [ - "//content:blink_headers_stub_config", "//content:content_implementation", "//content:libjingle_stub_config", "//content:v8_stub_config", @@ -36,6 +35,7 @@ source_set("renderer") { "//skia", "//third_party/icu", "//third_party/npapi", + "//third_party/WebKit/public:blink_headers", "//ui/accessibility", "//ui/events:dom4_keycode_converter", "//ui/native_theme", diff --git a/third_party/power_gadget/BUILD.gn b/third_party/power_gadget/BUILD.gn new file mode 100644 index 0000000..0a3f81f --- /dev/null +++ b/third_party/power_gadget/BUILD.gn @@ -0,0 +1,12 @@ +# Copyright 2014 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. + +assert(is_win, "This only compiles on Windows") + +source_set("power_gadget") { + sources = [ + "PowerGadgetLib.cpp", + "PowerGadgetLib.h", + ] +} |