summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn1
-rw-r--r--build/json_schema.gni140
-rw-r--r--build/json_schema_bundle_compile.gypi2
-rw-r--r--build/json_schema_compile.gypi2
-rw-r--r--chrome/common/BUILD.gn20
-rw-r--r--chrome/common/extensions/api/BUILD.gn73
-rw-r--r--chrome/common/extensions/api/api.gyp142
-rw-r--r--components/BUILD.gn2
-rw-r--r--components/metrics.gypi2
-rw-r--r--components/metrics/proto/BUILD.gn20
-rw-r--r--device/serial/BUILD.gn37
-rw-r--r--device/serial/serial.gyp1
-rw-r--r--mojo/public/tools/bindings/mojom.gni3
-rw-r--r--sync/BUILD.gn13
-rw-r--r--sync/protocol/BUILD.gn56
-rw-r--r--sync/sync.gyp1
-rw-r--r--sync/sync_proto.gypi2
-rw-r--r--third_party/adobe/flash/BUILD.gn65
-rw-r--r--third_party/adobe/flash/flash_player.gyp2
-rw-r--r--third_party/protobuf/proto_library.gni52
20 files changed, 548 insertions, 88 deletions
diff --git a/BUILD.gn b/BUILD.gn
index e420bf2..4308624 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -22,6 +22,7 @@ group("root") {
"//apps/common/api:apps_api",
"//cc",
"//chrome/common",
+ "//components:all_components",
"//content",
"//crypto",
"//extensions/common/api:extensions_api",
diff --git a/build/json_schema.gni b/build/json_schema.gni
new file mode 100644
index 0000000..4f5c712
--- /dev/null
+++ b/build/json_schema.gni
@@ -0,0 +1,140 @@
+# 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.
+
+# TODO(brettw) this should maybe be moved to tools/json_schema_compiler/ where
+# the script is. Currently, we keep it in the build directory with the gyp
+# version to make it easier to find.
+#
+# Or, considering the fact that it references the chrome/extensions directory,
+# it should possibly be moved there.
+
+_api_gen_dir = "//tools/json_schema_compiler"
+_api_gen = "$_api_gen_dir/compiler.py"
+_impl_dir = "chrome/browser/extensions/api"
+
+_python_files = [
+ "$_api_gen_dir/cc_generator.py",
+ "$_api_gen_dir/code.py",
+ "$_api_gen_dir/compiler.py",
+ "$_api_gen_dir/cpp_bundle_generator.py",
+ "$_api_gen_dir/cpp_type_generator.py",
+ "$_api_gen_dir/cpp_util.py",
+ "$_api_gen_dir/h_generator.py",
+ "$_api_gen_dir/idl_schema.py",
+ "$_api_gen_dir/json_schema.py",
+ "$_api_gen_dir/model.py",
+ "$_api_gen_dir/util_cc_helper.py",
+]
+
+# Runs the schema compiler over a list of sources.
+#
+# Parameters:
+# sources
+# The .json and .idl files to compile.
+#
+# root_namespace
+# The C++ namespace that all generated files go under.
+#
+# deps, visibility (optional)
+template("json_schema_compile") {
+ assert(defined(invoker.sources), "Need sources for $target_name")
+ assert(defined(invoker.root_namespace),
+ "Need root_namespace defined for $target_name")
+
+ action_name = "${target_name}_action"
+ source_set_name = target_name
+
+ action_foreach(action_name) {
+ visibility = ":$source_set_name"
+ script = _api_gen
+
+ source_prereqs = _python_files
+ sources = invoker.sources
+
+ # TODO(GYP) We should probably be using {{source_gen_dir}} instead of
+ # $target_gen_dir but support for this string isn't pushed out in GN
+ # binaries yet. Replace this when it is.
+ outputs = [
+ "$target_gen_dir/{{source_name_part}}.cc",
+ "$target_gen_dir/{{source_name_part}}.h",
+ ]
+
+ args = [
+ "--root", rebase_path("//", root_build_dir),
+ "--destdir", rebase_path(root_gen_dir, root_build_dir),
+ "--namespace", invoker.root_namespace,
+ "--generator=cpp",
+ "--impl-dir", _impl_dir,
+ "{{source}}",
+ ]
+ }
+
+ source_set(source_set_name) {
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
+
+ sources = get_target_outputs(":$action_name")
+
+ deps = [ ":$action_name" ]
+ if (defined(invoker.deps)) {
+ deps += invoker.deps
+ }
+ }
+}
+
+# Runs the schema bundler.
+#
+# Parameters:
+# sources
+# The .json and .idl files to bundle.
+#
+# root_namespace
+# The C++ namespace that all generated files go under.
+#
+# deps, visibility (optional)
+template("json_schema_bundle") {
+ assert(defined(invoker.sources), "Need sources for $target_name")
+ assert(defined(invoker.root_namespace),
+ "Need root_namespace defined for $target_name")
+
+ action_name = "${target_name}_action"
+ source_set_name = target_name
+
+ action(action_name) {
+ visibility = ":$source_set_name"
+ script = _api_gen
+
+ source_prereqs = _python_files
+ source_prereqs += invoker.sources
+
+ outputs = [
+ "$target_gen_dir/generated_api.h",
+ "$target_gen_dir/generated_api.cc",
+ "$target_gen_dir/generated_schemas.h",
+ "$target_gen_dir/generated_schemas.cc",
+ ]
+
+ args = [
+ "--root", rebase_path("//", root_build_dir),
+ "--destdir", rebase_path(root_gen_dir, root_build_dir),
+ "--namespace", invoker.root_namespace,
+ "--generator=cpp-bundle",
+ "--impl-dir", _impl_dir,
+ ] + rebase_path(invoker.sources, root_build_dir)
+ }
+
+ source_set(source_set_name) {
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
+
+ sources = get_target_outputs(":$action_name")
+
+ deps = [ ":$action_name" ]
+ if (defined(invoker.deps)) {
+ deps += invoker.deps
+ }
+ }
+}
diff --git a/build/json_schema_bundle_compile.gypi b/build/json_schema_bundle_compile.gypi
index 39576ad..9c505ff 100644
--- a/build/json_schema_bundle_compile.gypi
+++ b/build/json_schema_bundle_compile.gypi
@@ -17,6 +17,8 @@
},
'actions': [
{
+ # GN version: //build/json_schema.gni
+ # (json_schema_bundle_compile templates)
'action_name': 'genapi_bundle',
'inputs': [
'<(api_gen_dir)/cc_generator.py',
diff --git a/build/json_schema_compile.gypi b/build/json_schema_compile.gypi
index 1ab8b7b..3c4e7c6 100644
--- a/build/json_schema_compile.gypi
+++ b/build/json_schema_compile.gypi
@@ -17,6 +17,8 @@
},
'rules': [
{
+ # GN version: //build/json_schema.gni
+ # (json_schema_compile template)
'rule_name': 'genapi',
'msvs_external_rule': 1,
'extension': 'json',
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
index 13fb84d..e4560b0 100644
--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -63,6 +63,26 @@ static_library("common") {
"//ui/resources:resources",
"//url",
]
+
+ if (!is_ios) {
+ deps += [
+ #'<(DEPTH)/apps/common/api/api.gyp:apps_api', TODO(GYP)
+ "//chrome/common/extensions/api",
+ #'<(DEPTH)/components/components.gyp:autofill_core_common', TODO(GYP)
+ #'<(DEPTH)/components/components.gyp:autofill_content_common', TODO(GYP)
+ #'<(DEPTH)/components/components.gyp:password_manager_core_common', TODO(GYP)
+ #'<(DEPTH)/components/components.gyp:signin_core_common', TODO(GYP)
+ #'<(DEPTH)/components/components.gyp:translate_content_common', TODO(GYP)
+ #'<(DEPTH)/components/nacl.gyp:nacl_common', TODO(GYP)
+ "//components/visitedlink/common",
+ #'<(DEPTH)/extensions/common/api/api.gyp:extensions_api', TODO(GYP)
+ #'<(DEPTH)/extensions/extensions.gyp:extensions_common', TODO(GYP)
+ "//ipc",
+ "//third_party/adobe/flash:flapper_version_h",
+ "//third_party/re2",
+ "//third_party/widevine/cdm:version_h",
+ ]
+ }
}
if (is_linux) {
diff --git a/chrome/common/extensions/api/BUILD.gn b/chrome/common/extensions/api/BUILD.gn
new file mode 100644
index 0000000..8c023f4
--- /dev/null
+++ b/chrome/common/extensions/api/BUILD.gn
@@ -0,0 +1,73 @@
+# 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/json_schema.gni")
+
+gypi_values = exec_script(
+ "//build/gypi_to_gn.py",
+ [ rebase_path("api.gyp") ],
+ "scope",
+ [ "api.gyp" ])
+
+# GYP version: chrome/common/extensions/api/api.gyp:chrome_api
+group("api") {
+ # The GYP version has one target that does both the bundling and compiling
+ # over the same set of sources. In GN these actions are separate.
+ deps = [
+ ":api_bundle",
+ ":api_compile",
+ ]
+}
+
+# Common sources that are both bundled and compiled.
+if (is_android) {
+ # Should be eliminated. See crbug.com/305852.
+ schema_sources = gypi_values.android_schema_files
+} else {
+ schema_sources = gypi_values.main_schema_files
+ if (is_chromeos) {
+ schema_sources += gypi_values.chromeos_schema_files
+ if (is_chrome_branded) {
+ schema_sources += gypi_values.chromeos_branded_schema_files
+ }
+ }
+ if (enable_webrtc) {
+ schema_sources += gypi_values.webrtc_schema_files
+ }
+}
+
+schema_deps = [
+ # Different APIs include some headers crom chrome/common that in turn
+ # include generated headers from these targets.
+ # TODO(brettw) this should be made unnecessary if possible.
+ "//components/metrics/proto",
+ "//device/serial",
+
+ "//content/public/browser",
+ "//skia",
+ "//sync",
+]
+if (is_chromeos) {
+ # deps += [ "<(DEPTH)/chrome/chrome.gyp:drive_proto" ] TODO)GYP)
+}
+
+json_schema_bundle("api_bundle") {
+ visibility = ":api"
+ sources = schema_sources
+ if (!is_android) {
+ sources += gypi_values.main_non_compiled_schema_files
+ }
+
+ root_namespace = "extensions::api"
+ deps = schema_deps + [ ":api_compile" ]
+
+}
+
+json_schema_compile("api_compile") {
+ visibility = ":*"
+ sources = schema_sources
+ root_namespace = "extensions::api"
+ deps = schema_deps
+}
diff --git a/chrome/common/extensions/api/api.gyp b/chrome/common/extensions/api/api.gyp
index 7722df1..a72785a 100644
--- a/chrome/common/extensions/api/api.gyp
+++ b/chrome/common/extensions/api/api.gyp
@@ -9,135 +9,127 @@
# .gypi reader can not process conditions and does not know about targets,
# etc., it just reads Python dictionaries.
#
- # In addition, the GN build treats .idl files and .json files separately,
- # since they run through different scripts. If you add a new category, also
- # add it to the BUILD.gn file in this directory.
+ # If you add a new category, also add it to the BUILD.gn file in this
+ # directory.
'variables': {
# These duplicate other lists and are the only ones used on Android. They
# should be eliminated. See crbug.com/305852.
- 'android_schema_files_idl': [
- 'file_system.idl',
- 'sync_file_system.idl',
- 'tab_capture.idl',
- ],
- 'android_schema_files_json': [
+ 'android_schema_files': [
'activity_log_private.json',
'events.json',
+ 'file_system.idl',
'manifest_types.json',
'permissions.json',
+ 'sync_file_system.idl',
+ 'tab_capture.idl',
'tabs.json',
'types.json',
- 'webview.json',
'web_navigation.json',
+ 'webview.json',
'windows.json',
],
# These are used everywhere except Android.
- 'main_schema_files_idl': [
+ 'main_schema_files': [
+ 'accessibility_private.json',
+ 'activity_log_private.json',
'alarms.idl',
'app_current_window_internal.idl',
'app_window.idl',
'audio.idl',
- 'automation_internal.idl',
'automation.idl',
+ 'automation_internal.idl',
'autotest_private.idl',
'bluetooth.idl',
'bluetooth_low_energy.idl',
+ 'bluetooth_private.json',
'bluetooth_socket.idl',
- 'browser.idl',
+ 'bookmark_manager_private.json',
+ 'bookmarks.json',
'braille_display_private.idl',
+ 'browser.idl',
'cast_channel.idl',
+ 'cloud_print_private.json',
+ 'command_line_private.json',
+ 'content_settings.json',
+ 'context_menus_internal.json',
+ 'context_menus.json',
+ 'cookies.json',
+ 'debugger.json',
+ 'desktop_capture.json',
'developer_private.idl',
'dial.idl',
'downloads.idl',
'downloads_internal.idl',
+ 'echo_private.json',
+ 'enterprise_platform_keys_private.json',
+ 'events.json',
'feedback_private.idl',
'file_browser_private.idl',
'file_browser_private_internal.idl',
'file_system.idl',
'file_system_provider.idl',
'file_system_provider_internal.idl',
+ 'font_settings.json',
'gcd_private.idl',
+ 'gcm.json',
+ 'guest_view_internal.json',
'hangouts_private.idl',
'hid.idl',
+ 'history.json',
'hotword_private.idl',
+ 'i18n.json',
'identity.idl',
'identity_private.idl',
+ 'idle.json',
'image_writer_private.idl',
+ 'input_ime.json',
'location.idl',
+ 'management.json',
+ 'manifest_types.json',
'mdns.idl',
'media_galleries.idl',
'media_galleries_private.idl',
+ 'metrics_private.json',
+ 'networking_private.json',
'notifications.idl',
+ 'omnibox.json',
+ 'page_capture.json',
+ 'permissions.json',
'power.idl',
+ 'preferences_private.json',
'push_messaging.idl',
+ 'reading_list_private.json',
'screenlock_private.idl',
'serial.idl',
+ 'sessions.json',
'signed_in_devices.idl',
'streams_private.idl',
- 'sync_file_system.idl',
'synced_notifications_private.idl',
+ 'sync_file_system.idl',
'system_cpu.idl',
'system_display.idl',
'system_indicator.idl',
'system_memory.idl',
'system_network.idl',
+ 'system_private.json',
'system_storage.idl',
'tab_capture.idl',
- # Despite the name, this API does not rely on any
- # WebRTC-specific bits and as such does not belong in
- # the enable_webrtc=0 section below.
- 'webrtc_audio_private.idl',
- 'webrtc_logging_private.idl',
- ],
- 'main_schema_files_json': [
- 'accessibility_private.json',
- 'activity_log_private.json',
- 'bluetooth_private.json',
- 'bookmark_manager_private.json',
- 'bookmarks.json',
- 'cloud_print_private.json',
- 'command_line_private.json',
- 'content_settings.json',
- 'context_menus.json',
- 'context_menus_internal.json',
- 'cookies.json',
- 'debugger.json',
- 'desktop_capture.json',
- 'echo_private.json',
- 'enterprise_platform_keys_private.json',
- 'events.json',
- 'font_settings.json',
- 'gcm.json',
- 'guest_view_internal.json',
- 'history.json',
- 'i18n.json',
- 'idle.json',
- 'input_ime.json',
- 'management.json',
- 'manifest_types.json',
- 'metrics_private.json',
- 'networking_private.json',
- 'omnibox.json',
- 'page_capture.json',
- 'permissions.json',
- 'preferences_private.json',
- 'reading_list_private.json',
- 'sessions.json',
- 'system_private.json',
'tabs.json',
'terminal_private.json',
'types.json',
'virtual_keyboard_private.json',
'web_navigation.json',
'web_request.json',
+ # Despite the name, this API does not rely on any
+ # WebRTC-specific bits and as such does not belong in
+ # the enable_webrtc=0 section below.
+ 'webrtc_audio_private.idl',
+ 'webrtc_logging_private.idl',
'webstore_private.json',
'webview.json',
'windows.json',
],
- # The non-compiled shcema files don't need to be separated out by type
- # since they're only given to the bundle script which doesn't care about
- # type.
'main_non_compiled_schema_files': [
'browsing_data.json',
'chromeos_info_private.json',
@@ -152,25 +144,23 @@
],
# ChromeOS-specific schemas.
- 'chromeos_schema_files_idl': [
+ 'chromeos_schema_files': [
+ 'accessibility_features.json',
'diagnostics.idl',
'enterprise_platform_keys.idl',
'enterprise_platform_keys_internal.idl',
- 'log_private.idl',
- 'webcam_private.idl',
- ],
- 'chromeos_schema_files_json': [
- 'accessibility_features.json',
'file_browser_handler_internal.json',
'first_run_private.json',
+ 'log_private.idl',
'wallpaper.json',
'wallpaper_private.json',
+ 'webcam_private.idl',
],
- 'chromeos_branded_schema_files_idl': [
+ 'chromeos_branded_schema_files': [
'ledger/ledger.idl',
],
- 'webrtc_schema_files_idl': [
+ 'webrtc_schema_files': [
'cast_streaming_rtp_stream.idl',
'cast_streaming_session.idl',
'cast_streaming_udp_transport.idl',
@@ -178,6 +168,7 @@
},
'targets': [
{
+ # GN version: //chrome/common/extensions/api:api
'target_name': 'chrome_api',
'type': 'static_library',
'sources': [
@@ -199,32 +190,29 @@
'<@(main_non_compiled_schema_files)',
],
'schema_files': [
- '<@(main_schema_files_idl)',
- '<@(main_schema_files_json)',
+ '<@(main_schema_files)',
],
}, { # OS=="android"
'non_compiled_schema_files': [
],
'schema_files': [
# These should be eliminated. See crbug.com/305852.
- '<@(android_schema_files_idl)',
- '<@(android_schema_files_json)',
+ '<@(android_schema_files)',
],
}],
['chromeos==1', {
'schema_files': [
- '<@(chromeos_schema_files_idl)',
- '<@(chromeos_schema_files_json)',
+ '<@(chromeos_schema_files)',
],
}],
['enable_webrtc==1', {
'schema_files': [
- '<@(webrtc_schema_files_idl)',
+ '<@(webrtc_schema_files)',
],
}],
['branding=="Chrome" and chromeos==1', {
'schema_files': [
- '<@(chromeos_branded_schema_files_idl)',
+ '<@(chromeos_branded_schema_files)',
],
}],
],
@@ -232,6 +220,12 @@
'root_namespace': 'extensions::api',
},
'dependencies': [
+ # Different APIs include some headers crom chrome/common that in turn
+ # include generated headers from these targets.
+ # TODO(brettw) this should be made unnecessary if possible.
+ '<(DEPTH)/components/components.gyp:component_metrics_proto',
+ '<(DEPTH)/device/serial/serial.gyp:device_serial',
+
'<(DEPTH)/content/content.gyp:content_browser',
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/sync/sync.gyp:sync',
diff --git a/components/BUILD.gn b/components/BUILD.gn
index 0054341..358fbf1 100644
--- a/components/BUILD.gn
+++ b/components/BUILD.gn
@@ -4,7 +4,7 @@
# Collection of all components. You wouldn't link to this, but this is rather
# to reference the files so they can be compiled by the build system.
-group("all") {
+group("all_components") {
visibility = "//:*" # Only for the root targets to bring in.
deps = [
diff --git a/components/metrics.gypi b/components/metrics.gypi
index decc23f8..a8f9d0c 100644
--- a/components/metrics.gypi
+++ b/components/metrics.gypi
@@ -79,6 +79,8 @@
},
{
# Protobuf compiler / generator for UMA (User Metrics Analysis).
+ #
+ # GN version: //component/metrics/proto:proto
'target_name': 'component_metrics_proto',
'type': 'static_library',
'sources': [
diff --git a/components/metrics/proto/BUILD.gn b/components/metrics/proto/BUILD.gn
new file mode 100644
index 0000000..2b3c830
--- /dev/null
+++ b/components/metrics/proto/BUILD.gn
@@ -0,0 +1,20 @@
+# 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("//third_party/protobuf/proto_library.gni")
+
+# GYP version: components/
+proto_library("proto") {
+ sources = [
+ "chrome_user_metrics_extension.proto",
+ "histogram_event.proto",
+ "omnibox_event.proto",
+ "omnibox_input_type.proto",
+ "perf_data.proto",
+ "profiler_event.proto",
+ "sampled_profile.proto",
+ "system_profile.proto",
+ "user_action_event.proto",
+ ]
+}
diff --git a/device/serial/BUILD.gn b/device/serial/BUILD.gn
new file mode 100644
index 0000000..0b38e93
--- /dev/null
+++ b/device/serial/BUILD.gn
@@ -0,0 +1,37 @@
+# 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("//mojo/public/tools/bindings/mojom.gni")
+
+# GYP version: device/serial/serial.gyp:device_serial
+static_library("serial") {
+ output_name = "device_serial"
+
+ sources = [
+ "serial_device_enumerator.cc",
+ "serial_device_enumerator.h",
+ "serial_device_enumerator_linux.cc",
+ "serial_device_enumerator_linux.h",
+ "serial_device_enumerator_mac.cc",
+ "serial_device_enumerator_mac.h",
+ "serial_device_enumerator_win.cc",
+ "serial_device_enumerator_win.h",
+ ]
+
+ if (is_linux) {
+ configs += [ "//build/config/linux:udev" ]
+ }
+
+ deps = [
+ ":serial_mojo",
+ ]
+}
+
+mojom("serial_mojo") {
+ visibility = ":serial"
+
+ sources = [
+ "serial.mojom",
+ ]
+}
diff --git a/device/serial/serial.gyp b/device/serial/serial.gyp
index f623de9..0df7005 100644
--- a/device/serial/serial.gyp
+++ b/device/serial/serial.gyp
@@ -8,6 +8,7 @@
},
'targets': [
{
+ # GN version: //device/serial
'target_name': 'device_serial',
'type': 'static_library',
'include_dirs': [
diff --git a/mojo/public/tools/bindings/mojom.gni b/mojo/public/tools/bindings/mojom.gni
index 701c5c9..3376abf 100644
--- a/mojo/public/tools/bindings/mojom.gni
+++ b/mojo/public/tools/bindings/mojom.gni
@@ -77,6 +77,9 @@ template("mojom") {
}
source_set(target_name) {
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
sources = process_file_template(invoker.sources, generator_cpp_outputs)
data = process_file_template(invoker.sources, generator_js_outputs)
deps = [
diff --git a/sync/BUILD.gn b/sync/BUILD.gn
new file mode 100644
index 0000000..fa62db7
--- /dev/null
+++ b/sync/BUILD.gn
@@ -0,0 +1,13 @@
+# 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.
+
+# TODO(GYP) This exists as a stub to compile the sync protobuf so dependent
+# targets will compile. This target will have to be written completely for
+# such things to link, however.
+group("sync") {
+ deps = [
+ "//sync/protocol",
+ ]
+}
+
diff --git a/sync/protocol/BUILD.gn b/sync/protocol/BUILD.gn
new file mode 100644
index 0000000..de4376f
--- /dev/null
+++ b/sync/protocol/BUILD.gn
@@ -0,0 +1,56 @@
+# 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("//third_party/protobuf/proto_library.gni")
+
+proto_library("protocol") {
+ sources = [
+ "app_notification_specifics.proto",
+ "app_setting_specifics.proto",
+ "app_specifics.proto",
+ "app_list_specifics.proto",
+ "article_specifics.proto",
+ "attachments.proto",
+ "autofill_specifics.proto",
+ "bookmark_specifics.proto",
+ "client_commands.proto",
+ "client_debug_info.proto",
+ "device_info_specifics.proto",
+ "dictionary_specifics.proto",
+ "encryption.proto",
+ "experiments_specifics.proto",
+ "extension_setting_specifics.proto",
+ "extension_specifics.proto",
+ "favicon_image_specifics.proto",
+ "favicon_tracking_specifics.proto",
+ "get_updates_caller_info.proto",
+ "history_delete_directive_specifics.proto",
+ "nigori_specifics.proto",
+ "managed_user_setting_specifics.proto",
+ "managed_user_shared_setting_specifics.proto",
+ "managed_user_specifics.proto",
+ "password_specifics.proto",
+ "preference_specifics.proto",
+ "priority_preference_specifics.proto",
+ "search_engine_specifics.proto",
+ "session_specifics.proto",
+ "sync.proto",
+ "sync_enums.proto",
+ "synced_notification_app_info_specifics.proto",
+ "synced_notification_data.proto",
+ "synced_notification_render.proto",
+ "synced_notification_specifics.proto",
+ "test.proto",
+ "theme_specifics.proto",
+ "typed_url_specifics.proto",
+ "unique_position.proto",
+ ]
+
+ cc_generator_options = "dllexport_decl=SYNC_EXPORT:"
+ cc_include = "sync/base/sync_export.h"
+
+ defines = [ "SYNC_IMPLEMENTATION" ]
+
+ extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
+}
diff --git a/sync/sync.gyp b/sync/sync.gyp
index f71a872..6a14e84 100644
--- a/sync/sync.gyp
+++ b/sync/sync.gyp
@@ -104,6 +104,7 @@
# The sync protocol buffer library.
{
+ # GN version: //sync/protocol
'target_name': 'sync_proto',
'type': 'static_library',
'variables': { 'enable_wexit_time_destructors': 1, },
diff --git a/sync/sync_proto.gypi b/sync/sync_proto.gypi
index 3385317..fd002bf 100644
--- a/sync/sync_proto.gypi
+++ b/sync/sync_proto.gypi
@@ -10,6 +10,8 @@
'SYNC_IMPLEMENTATION',
],
'sources': [
+ # NOTE: If you add a file to this list, also add it to
+ # sync/protocol/BUILD.gn
'protocol/app_notification_specifics.proto',
'protocol/app_setting_specifics.proto',
'protocol/app_specifics.proto',
diff --git a/third_party/adobe/flash/BUILD.gn b/third_party/adobe/flash/BUILD.gn
new file mode 100644
index 0000000..eb7ef2c
--- /dev/null
+++ b/third_party/adobe/flash/BUILD.gn
@@ -0,0 +1,65 @@
+# 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.
+
+if (is_chrome_branded) {
+ if (is_linux && cpu_arch == "x86") {
+ flapper_version_h_file = "symbols/ppapi/linux/flapper_version.h"
+ flapper_binary_files = [
+ "binaries/ppapi/linux/libpepflashplayer.so",
+ "binaries/ppapi/linux/manifest.json",
+ ]
+ } else if (is_linux && cpu_arch == "x64") {
+ flapper_version_h_file = "symbols/ppapi/linux_x64/flapper_version.h"
+ flapper_binary_files = [
+ "binaries/ppapi/linux_x64/libpepflashplayer.so",
+ "binaries/ppapi/linux_x64/manifest.json",
+ ]
+ } else if (is_mac && cpu_arch == "x86") {
+ flapper_version_h_file = "symbols/ppapi/mac/flapper_version.h"
+ flapper_binary_files = [
+ "binaries/ppapi/mac/PepperFlashPlayer.plugin",
+ "binaries/ppapi/mac/manifest.json",
+ ]
+ } else if (is_mac && cpu_arch == "x64") {
+ flapper_version_h_file = "symbols/ppapi/mac_64/flapper_version.h"
+ flapper_binary_files = [
+ "binaries/ppapi/mac_64/PepperFlashPlayer.plugin",
+ "binaries/ppapi/mac_64/manifest.json",
+ ]
+ } else if (is_win && cpu_arch == "x86") {
+ flapper_version_h_file = "symbols/ppapi/win/flapper_version.h"
+ flapper_binary_files = [
+ "binaries/ppapi/win/pepflashplayer.dll",
+ "binaries/ppapi/win/manifest.json",
+ ]
+ } else if (is_win && cpu_arch == "x64") {
+ flapper_version_h_file = "symbols/ppapi/win_x64/flapper_version.h"
+ flapper_binary_files = [
+ "binaries/ppapi/win_x64/pepflashplayer.dll",
+ "binaries/ppapi/win_x64/manifest.json",
+ ]
+ } else {
+ flapper_version_h_file = "flapper_version.h"
+ flapper_binary_files = []
+ }
+} else {
+ flapper_version_h_file = "flapper_version.h"
+ flapper_binary_files = []
+}
+
+copy("flapper_version_h") {
+ sources = [ flapper_version_h_file ]
+ outputs = [ "$root_gen_dir/{{source_file_part}}" ]
+}
+
+if (flapper_binary_files == []) {
+ group("flapper_binaries") {
+ # NOP
+ }
+} else {
+ copy("flapper_binaries") {
+ sources = flapper_binary_files
+ outputs = [ "$root_out_dir/PepperFlash/{{source_file_part}}" ]
+ }
+}
diff --git a/third_party/adobe/flash/flash_player.gyp b/third_party/adobe/flash/flash_player.gyp
index dd5c223..c54baa3 100644
--- a/third_party/adobe/flash/flash_player.gyp
+++ b/third_party/adobe/flash/flash_player.gyp
@@ -59,6 +59,7 @@
# anything to be done in this file (instead of a higher-level .gyp file).
'targets': [
{
+ # GN version: //third_party/adobe/flash:flapper_version_h
'target_name': 'flapper_version_h',
'type': 'none',
'copies': [{
@@ -67,6 +68,7 @@
}],
},
{
+ # GN version: //third_party/adobe/flash:flapper_binaries
'target_name': 'flapper_binaries',
'type': 'none',
'copies': [{
diff --git a/third_party/protobuf/proto_library.gni b/third_party/protobuf/proto_library.gni
index b35d2f3c..62efd78 100644
--- a/third_party/protobuf/proto_library.gni
+++ b/third_party/protobuf/proto_library.gni
@@ -4,22 +4,41 @@
# Compile a protocol buffer.
#
-# The 'proto_in_dir' variable is the path to the directory containing the
-# .proto files. If left out, it defaults to '.'.
+# Protobuf parameters:
#
-# The 'proto_out_dir' variable specifies the path suffix that output files are
-# generated under. Targets that gyp-depend on my_proto_lib will be able to
-# include the resulting proto headers with an include like:
-# #include "dir/for/my_proto_lib/foo.pb.h"
-# If undefined, this defaults to matching the input directory.
+# proto_in_dir (optional)
+# The path to the directory containing the .proto files. If left out, it
+# defaults to '.'.
#
-# If you need to add an EXPORT macro to a protobuf's C++ header, set the
-# 'cc_generator_options' variable with the value: 'dllexport_decl=FOO_EXPORT:'
-# e.g. 'dllexport_decl=BASE_EXPORT:'
+# proto_out_dir (optional)
+# Specifies the path suffix that output files are generated under.
+# Targets that gyp-depend on my_proto_lib will be able to include the
+# resulting proto headers with an include like:
+# #include "dir/for/my_proto_lib/foo.pb.h"
+# If undefined, this defaults to matching the input directory.
#
-# It is likely you also need to #include a file for the above EXPORT macro to
-# work. You can do so with the 'cc_include' variable.
-# e.g. 'base/base_export.h'
+# cc_generator_options (optional)
+# List of extra flags passed to the protocol compiler. If you need to
+# add an EXPORT macro to a protobuf's C++ header, set the
+# 'cc_generator_options' variable with the value:
+# 'dllexport_decl=FOO_EXPORT:' (note trailing colon).
+#
+# It is likely you also need to #include a file for the above EXPORT
+# macro to work. See cc_include.
+#
+# cc_include (optional)
+# String listing an extra include that should be passed.
+# Example: cc_include = "foo/bar.h"
+#
+# Parameters for compiling the generated code:
+#
+# defines (optional)
+# Defines to supply to the source set that compiles the generated source
+# code.
+#
+# extra_configs (optional)
+# A list of config labels that will be appended to the configs applying
+# to the source set.
#
# Example:
# proto_library("mylib") {
@@ -115,6 +134,13 @@ template("proto_library") {
sources = get_target_outputs(":$action_name")
+ if (defined(invoker.defines)) {
+ defines = invoker.defines
+ }
+ if (defined(invoker.extra_configs)) {
+ configs += invoker.extra_configs
+ }
+
direct_dependent_configs = [ "//third_party/protobuf:using_proto" ]
deps = [