Commit a326719a authored by Eve Martin-Jones's avatar Eve Martin-Jones Committed by Commit Bot

Add OS based defaults for enabled_features to mojom.gni.

Remove existing single OS enabled_features from BUILD files.

Update existing flags to match GN-style names where needed.

Change-Id: I052c1b25d2ee79194fe82132df59fd95cce88598
Reviewed-on: https://chromium-review.googlesource.com/920561Reviewed-by: default avatarKen Rockot <rockot@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Eve Martin-Jones <evem@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537191}
parent 76966811
...@@ -695,11 +695,6 @@ mojom("mojo_bindings") { ...@@ -695,11 +695,6 @@ mojom("mojo_bindings") {
component_deps = [ "//content/public/common" ] component_deps = [ "//content/public/common" ]
enabled_features = []
if (is_android) {
enabled_features += [ "OS_ANDROID" ]
}
# TODO(crbug.com/714018): Convert the implementation to use OnceCallback. # TODO(crbug.com/714018): Convert the implementation to use OnceCallback.
use_once_callback = false use_once_callback = false
} }
......
...@@ -54,7 +54,7 @@ interface ChromeRenderFrame { ...@@ -54,7 +54,7 @@ interface ChromeRenderFrame {
// Notifies the renderer whether hiding/showing the browser controls is // Notifies the renderer whether hiding/showing the browser controls is
// enabled, what the current state should be, and whether or not to // enabled, what the current state should be, and whether or not to
// animate to the proper state. // animate to the proper state.
[EnableIf=OS_ANDROID] [EnableIf=is_android]
UpdateBrowserControlsState(BrowserControlsState constraints, UpdateBrowserControlsState(BrowserControlsState constraints,
BrowserControlsState current, BrowserControlsState current,
bool animate); bool animate);
......
...@@ -19,9 +19,4 @@ mojom("mojom") { ...@@ -19,9 +19,4 @@ mojom("mojom") {
"//mojo/common:common_custom_types", "//mojo/common:common_custom_types",
"//ui/gfx/geometry/mojo", "//ui/gfx/geometry/mojo",
] ]
enabled_features = []
if (is_win) {
enabled_features += [ "is_win" ]
}
} }
...@@ -617,11 +617,6 @@ mojom("mojo_bindings") { ...@@ -617,11 +617,6 @@ mojom("mojo_bindings") {
"//url/mojom:url_mojom_origin", "//url/mojom:url_mojom_origin",
] ]
enabled_features = []
if (is_android) {
enabled_features += [ "is_android" ]
}
overridden_deps = [ "//third_party/WebKit/common:mojo_bindings" ] overridden_deps = [ "//third_party/WebKit/common:mojo_bindings" ]
component_deps = [ "//third_party/WebKit/common:blink_common" ] component_deps = [ "//third_party/WebKit/common:blink_common" ]
......
...@@ -337,6 +337,28 @@ template("mojom") { ...@@ -337,6 +337,28 @@ template("mojom") {
if (defined(invoker.sources)) { if (defined(invoker.sources)) {
parser_target_name = "${target_name}__parser" parser_target_name = "${target_name}__parser"
enabled_features = []
if (defined(invoker.enabled_features)) {
enabled_features += invoker.enabled_features
}
if (is_posix) {
enabled_features += [ "is_posix" ]
}
if (is_android) {
enabled_features += [ "is_android" ]
} else if (is_chromeos) {
enabled_features += [ "is_chromeos" ]
} else if (is_fuchsia) {
enabled_features += [ "is_fuschia" ]
} else if (is_ios) {
enabled_features += [ "is_ios" ]
} else if (is_linux) {
enabled_features += [ "is_linux" ]
} else if (is_mac) {
enabled_features += [ "is_mac" ]
} else if (is_win) {
enabled_features += [ "is_win" ]
}
action_foreach(parser_target_name) { action_foreach(parser_target_name) {
script = mojom_generator_script script = mojom_generator_script
inputs = mojom_generator_sources inputs = mojom_generator_sources
...@@ -352,8 +374,7 @@ template("mojom") { ...@@ -352,8 +374,7 @@ template("mojom") {
"-d", "-d",
rebase_path("//", root_build_dir), rebase_path("//", root_build_dir),
] ]
if (defined(invoker.enabled_features)) { foreach(enabled_feature, enabled_features) {
foreach(enabled_feature, invoker.enabled_features) {
args += [ args += [
"--enable_feature", "--enable_feature",
enabled_feature, enabled_feature,
...@@ -361,7 +382,6 @@ template("mojom") { ...@@ -361,7 +382,6 @@ template("mojom") {
} }
} }
} }
}
parsed_target_name = "${target_name}__parsed" parsed_target_name = "${target_name}__parsed"
group(parsed_target_name) { group(parsed_target_name) {
......
...@@ -28,7 +28,7 @@ mojom_component("mojom") { ...@@ -28,7 +28,7 @@ mojom_component("mojom") {
enabled_features = [] enabled_features = []
if (is_linux || is_android) { if (is_linux || is_android) {
enabled_features += [ "OS_LINUX_OR_OS_ANDROID" ] enabled_features += [ "private_swap_info" ]
} }
# TODO(crbug.com/714018): Convert the implementation to use OnceCallback. # TODO(crbug.com/714018): Convert the implementation to use OnceCallback.
......
...@@ -148,7 +148,7 @@ struct OSMemDump { ...@@ -148,7 +148,7 @@ struct OSMemDump {
// This is private swapped memory in kilobytes reported on Linux and Android // This is private swapped memory in kilobytes reported on Linux and Android
// only. // only.
[EnableIf=OS_LINUX_OR_OS_ANDROID] [EnableIf=private_swap_info]
uint32 private_footprint_swap_kb = 0; uint32 private_footprint_swap_kb = 0;
}; };
......
...@@ -148,11 +148,6 @@ mojom("mojo_platform_bindings") { ...@@ -148,11 +148,6 @@ mojom("mojo_platform_bindings") {
"//url/mojom:url_mojom_origin", "//url/mojom:url_mojom_origin",
] ]
enabled_features = []
if (is_mac) {
enabled_features += [ "is_mac" ]
}
export_class_attribute = "BLINK_COMMON_EXPORT" export_class_attribute = "BLINK_COMMON_EXPORT"
export_define = "BLINK_COMMON_IMPLEMENTATION=1" export_define = "BLINK_COMMON_IMPLEMENTATION=1"
export_header = "third_party/WebKit/common/common_export.h" export_header = "third_party/WebKit/common/common_export.h"
......
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