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