| OLD | NEW |
| (Empty) |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 import("//build/config/crypto.gni") | |
| 6 import("//build/config/features.gni") | |
| 7 import("//build/config/ui.gni") | |
| 8 | |
| 9 gypi_values = exec_script( | |
| 10 "//build/gypi_to_gn.py", | |
| 11 [ rebase_path("../../chrome_browser_extensions.gypi") ], | |
| 12 "scope", | |
| 13 [ "../../chrome_browser_extensions.gypi" ]) | |
| 14 | |
| 15 # GYP version: chrome/chrome_browser_extensions.gypi:browser_extensions | |
| 16 static_library("extensions") { | |
| 17 sources = rebase_path(gypi_values.chrome_browser_extensions_sources, | |
| 18 ".", "//chrome") | |
| 19 | |
| 20 defines = [] | |
| 21 | |
| 22 # TODO(GYP) remove this when webrtc is ported. | |
| 23 configs += [ "//content:webrtc_stub_config" ] | |
| 24 | |
| 25 # Since browser and browser_extensions actually depend on each other, | |
| 26 # we must omit the dependency from browser_extensions to browser. | |
| 27 # However, this means browser_extensions and browser should more or less | |
| 28 # have the same dependencies. Once browser_extensions is untangled from | |
| 29 # browser, then we can clean up these dependencies. | |
| 30 deps = [ | |
| 31 "//chrome:extra_resources", | |
| 32 "//chrome:resources", | |
| 33 "//chrome:strings", | |
| 34 "//chrome/app/resources:platform_locale_settings", | |
| 35 "//chrome/browser/extensions/api/cast_channel:cast_channel_proto", | |
| 36 "//chrome/app/theme:theme_resources", | |
| 37 "//chrome/browser/history:in_memory_url_index_cache_proto", | |
| 38 "//chrome/browser/sync_file_system:sync_file_system_proto", | |
| 39 "//chrome/common", | |
| 40 "//chrome/common/extensions/api", | |
| 41 "//chrome/common/net", | |
| 42 "//chrome/common/safe_browsing:proto", | |
| 43 "//components/onc", | |
| 44 "//components/strings", | |
| 45 "//components/url_matcher", | |
| 46 "//content/public/browser", | |
| 47 "//content/public/common", | |
| 48 "//crypto", | |
| 49 "//extensions/common/api", | |
| 50 "//extensions/strings", | |
| 51 "//net", | |
| 52 "//skia", | |
| 53 "//sync", | |
| 54 "//third_party/cacheinvalidation", | |
| 55 "//third_party/icu", | |
| 56 "//third_party/leveldatabase", | |
| 57 "//third_party/re2", | |
| 58 "//ui/accessibility:ax_gen", | |
| 59 "//ui/base", | |
| 60 "//ui/gfx", | |
| 61 "//ui/gfx/geometry", | |
| 62 "//ui/resources", | |
| 63 "//ui/strings", | |
| 64 "//url", | |
| 65 "//webkit:resources", | |
| 66 "//webkit/browser:storage", | |
| 67 "//webkit/common:storage", | |
| 68 #"debugger", TODO(GYP) | |
| 69 #"installer_util", TODO(GYP) | |
| 70 #"../components/components.gyp:omaha_query_params", TODO(GYP) | |
| 71 #"../device/hid/hid.gyp:device_hid", TODO(GYP) | |
| 72 #"../extensions/extensions.gyp:extensions_browser", TODO(GYP) | |
| 73 #"../third_party/webrtc/modules/modules.gyp:desktop_capture", TODO(GYP) | |
| 74 ] | |
| 75 | |
| 76 forward_dependent_configs_from = [ | |
| 77 "//chrome/common/extensions/api", | |
| 78 "//content/public/browser", | |
| 79 ] | |
| 80 | |
| 81 if (is_chromeos) { | |
| 82 sources += rebase_path( | |
| 83 gypi_values.chrome_browser_extensions_chromeos_sources, | |
| 84 ".", "//chrome") | |
| 85 configs += [ "//build/config/linux:dbus" ] | |
| 86 deps += [ | |
| 87 "//third_party/libevent", | |
| 88 #'../chromeos/ime/input_method.gyp:gencode', TODO(GYP) | |
| 89 ] | |
| 90 } else { | |
| 91 sources += [ | |
| 92 "default_apps.cc", | |
| 93 "default_apps.h'" | |
| 94 ] | |
| 95 } | |
| 96 | |
| 97 if (use_ash) { | |
| 98 sources += [ | |
| 99 "api/tabs/ash_panel_contents.cc", | |
| 100 "api/tabs/ash_panel_contents.h", | |
| 101 ] | |
| 102 } | |
| 103 | |
| 104 # TODO(thestig) This conditional should be removed when extensions are | |
| 105 # no longer enabled on mobile. | |
| 106 if (enable_extensions) { | |
| 107 sources += rebase_path( | |
| 108 gypi_values.chrome_browser_extensions_enabled_sources, | |
| 109 ".", "//chrome") | |
| 110 deps += [ | |
| 111 #'../device/bluetooth/bluetooth.gyp:device_bluetooth', TODO(GYP) | |
| 112 ] | |
| 113 | |
| 114 if (is_chromeos) { | |
| 115 deps += [ "//third_party/protobuf:protobuf_lite" ] | |
| 116 } else { | |
| 117 sources += rebase_path( | |
| 118 gypi_values.chrome_browser_extensions_non_chromeos_sources, | |
| 119 ".", "//chrome") | |
| 120 } | |
| 121 if (!is_linux) { | |
| 122 sources += [ | |
| 123 "api/audio/audio_service.cc", | |
| 124 ] | |
| 125 } | |
| 126 if (enable_configuration_policy) { | |
| 127 sources += rebase_path( | |
| 128 gypi_values.chrome_browser_extensions_policy_sources, | |
| 129 ".", "//chrome") | |
| 130 } | |
| 131 | |
| 132 if (enable_webrtc) { | |
| 133 sources += [ | |
| 134 "api/webrtc_logging_private/webrtc_logging_private_api.cc", | |
| 135 ] | |
| 136 } else { | |
| 137 sources += [ | |
| 138 "api/webrtc_logging_private/webrtc_logging_private_api_stub.cc", | |
| 139 ] | |
| 140 } | |
| 141 | |
| 142 if (use_brlapi) { | |
| 143 deps += [ "//build/config/linux:libbrlapi" ] | |
| 144 sources += rebase_path(gypi_values.chrome_browser_extensions_brlapi_source
s, | |
| 145 ".", "//chrome") | |
| 146 } else { | |
| 147 sources += [ | |
| 148 "api/braille_display_private/braille_controller_stub.cc", | |
| 149 ] | |
| 150 } | |
| 151 | |
| 152 if (use_aura) { | |
| 153 deps += [ | |
| 154 "//ui/keyboard", | |
| 155 "//ui/keyboard:resources", | |
| 156 ] | |
| 157 } | |
| 158 | |
| 159 if (is_linux) { | |
| 160 configs += [ "//build/config/linux:fontconfig" ] | |
| 161 deps += [ "//dbus" ] | |
| 162 if (use_x11) { | |
| 163 configs += [ | |
| 164 "//build/config/linux:x11", | |
| 165 ] | |
| 166 deps += [ | |
| 167 "//ui/events/platform", | |
| 168 "//ui/events/platform/x11", | |
| 169 ] | |
| 170 } | |
| 171 } | |
| 172 | |
| 173 if (safe_browsing_mode == 1) { | |
| 174 defines += [ "FULL_SAFE_BROWSING" ] | |
| 175 } | |
| 176 if (safe_browsing_mode == 2) { | |
| 177 defines += [ "MOBILE_SAFE_BROWSING" ] | |
| 178 } | |
| 179 | |
| 180 if (enable_configuration_policy) { | |
| 181 deps += [ "//components/policy" ] | |
| 182 sources += [ | |
| 183 "policy_handlers.cc", | |
| 184 "policy_handlers.h", | |
| 185 ] | |
| 186 } | |
| 187 | |
| 188 if (is_win || is_mac) { | |
| 189 deps += [ "//components/wifi" ] | |
| 190 sources += rebase_path( | |
| 191 gypi_values.chrome_browser_extensions_networking_private_sources, | |
| 192 ".", "//chrome") | |
| 193 } | |
| 194 | |
| 195 if (is_win) { | |
| 196 deps += [ | |
| 197 "//third_party/iaccessible2", | |
| 198 "//third_party/isimpledom", | |
| 199 #'launcher_support', TODO(GYP) | |
| 200 ] | |
| 201 } else if (!is_chromeos) { | |
| 202 sources += [ "api/system_display/display_info_provider_aura.cc" ] | |
| 203 } | |
| 204 | |
| 205 if (use_openssl) { | |
| 206 sources += [ "api/cast_channel/cast_auth_util_openssl.cc" ] | |
| 207 } else { | |
| 208 # cast_auth_util_nss.cc uses NSS functions. | |
| 209 sources += [ "api/cast_channel/cast_auth_util_nss.cc" ] | |
| 210 } | |
| 211 | |
| 212 if (is_android) { | |
| 213 sources += rebase_path( | |
| 214 gypi_values.chrome_browser_extensions_android_sources, | |
| 215 ".", "//chrome") | |
| 216 } | |
| 217 | |
| 218 if (enable_app_list) { | |
| 219 sources += rebase_path( | |
| 220 gypi_values.chrome_browser_extensions_app_list_sources, | |
| 221 ".", "//chrome") | |
| 222 } | |
| 223 } | |
| 224 } | |
| OLD | NEW |