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