[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] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 18 | sources += rebase_path( |
| 19 | gypi_values.chrome_browser_extensions_enabled_sources, |
| 20 | ".", "//chrome") |
| 21 | |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 22 | defines = [] |
| 23 | |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 24 | # Since browser and browser_extensions actually depend on each other, |
| 25 | # we must omit the dependency from browser_extensions to browser. |
| 26 | # However, this means browser_extensions and browser should more or less |
| 27 | # have the same dependencies. Once browser_extensions is untangled from |
| 28 | # browser, then we can clean up these dependencies. |
Brett Wilson | e5389527 | 2014-09-23 23:41:46 | [diff] [blame] | 29 | public_deps = [ |
| 30 | "//chrome/common/extensions/api", |
| 31 | "//content/public/browser", |
| 32 | ] |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 33 | deps = [ |
| 34 | "//chrome:extra_resources", |
| 35 | "//chrome:resources", |
| 36 | "//chrome:strings", |
| 37 | "//chrome/app/resources:platform_locale_settings", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 38 | "//chrome/app/theme:theme_resources", |
[email protected] | 55699f39 | 2014-08-20 22:16:30 | [diff] [blame] | 39 | "//chrome/browser/devtools", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 40 | "//chrome/browser/history:in_memory_url_index_cache_proto", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 41 | "//chrome/common", |
yoz | 774dcda2d | 2014-08-27 03:32:58 | [diff] [blame] | 42 | "//chrome/common/extensions/api:api_registration", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 43 | "//chrome/common/net", |
| 44 | "//chrome/common/safe_browsing:proto", |
[email protected] | 55699f39 | 2014-08-20 22:16:30 | [diff] [blame] | 45 | "//chrome/installer/util", |
[email protected] | 6294f0d | 2014-08-20 17:43:09 | [diff] [blame] | 46 | "//components/copresence", |
[email protected] | 55699f39 | 2014-08-20 22:16:30 | [diff] [blame] | 47 | "//components/omaha_query_params", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 48 | "//components/onc", |
isherman | 25cab40a | 2014-09-18 03:51:51 | [diff] [blame] | 49 | "//components/proximity_auth", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 50 | "//components/strings", |
| 51 | "//components/url_matcher", |
[email protected] | a9ca8d5 | 2014-08-22 10:21:08 | [diff] [blame] | 52 | "//content/app/resources", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 53 | "//content/public/common", |
| 54 | "//crypto", |
[email protected] | 55699f39 | 2014-08-20 22:16:30 | [diff] [blame] | 55 | "//device/bluetooth", |
| 56 | "//device/hid", |
| 57 | "//extensions/browser", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 58 | "//extensions/common/api", |
yoz | 774dcda2d | 2014-08-27 03:32:58 | [diff] [blame] | 59 | "//extensions/common/api:api_registration", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 60 | "//extensions/strings", |
| 61 | "//net", |
| 62 | "//skia", |
pilgrim | f55d19fc | 2014-09-04 00:05:24 | [diff] [blame] | 63 | "//storage/common", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 64 | "//sync", |
[email protected] | 4eebe74d | 2014-08-13 02:54:46 | [diff] [blame] | 65 | "//third_party/WebKit/public:resources", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 66 | "//third_party/cacheinvalidation", |
| 67 | "//third_party/icu", |
| 68 | "//third_party/leveldatabase", |
| 69 | "//third_party/re2", |
Brett Wilson | 83fd424 | 2014-09-02 19:45:33 | [diff] [blame] | 70 | "//third_party/webrtc/modules/desktop_capture", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 71 | "//ui/accessibility:ax_gen", |
| 72 | "//ui/base", |
| 73 | "//ui/gfx", |
| 74 | "//ui/gfx/geometry", |
| 75 | "//ui/resources", |
| 76 | "//ui/strings", |
| 77 | "//url", |
pilgrim | 4af8c21 | 2014-09-05 17:30:15 | [diff] [blame] | 78 | "//storage/browser", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 79 | ] |
| 80 | |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 81 | if (is_chromeos) { |
| 82 | sources += rebase_path( |
| 83 | gypi_values.chrome_browser_extensions_chromeos_sources, |
| 84 | ".", "//chrome") |
mukai | 55134a0 | 2014-10-29 00:30:22 | [diff] [blame^] | 85 | sources -= [ |
| 86 | "api/audio/audio_service_linux.cc", |
| 87 | "api/music_manager_private/device_id_linux.cc", |
| 88 | ] |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 89 | configs += [ "//build/config/linux:dbus" ] |
| 90 | deps += [ |
| 91 | "//third_party/libevent", |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 92 | "//third_party/protobuf:protobuf_lite", |
mukai | 8c99b88 | 2014-10-15 03:07:59 | [diff] [blame] | 93 | "//chromeos/ime:gencode", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 94 | ] |
| 95 | } else { |
| 96 | sources += [ |
| 97 | "default_apps.cc", |
| 98 | "default_apps.h'" |
| 99 | ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 100 | sources += rebase_path( |
| 101 | gypi_values.chrome_browser_extensions_non_chromeos_sources, |
| 102 | ".", "//chrome") |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 103 | } |
| 104 | |
| 105 | if (use_ash) { |
| 106 | sources += [ |
| 107 | "api/tabs/ash_panel_contents.cc", |
| 108 | "api/tabs/ash_panel_contents.h", |
| 109 | ] |
| 110 | } |
oshima | b70d0f8 | 2014-10-02 02:11:26 | [diff] [blame] | 111 | if (use_athena) { |
| 112 | defines += [ USE_ATHENA ] |
| 113 | sources += rebase_path( |
| 114 | gypi_values.chrome_browser_extensions_athena_sources, |
| 115 | ".", "//chrome") |
| 116 | } else { |
| 117 | sources += rebase_path( |
| 118 | gypi_values.chrome_browser_extensions_non_athena_sources, |
| 119 | ".", "//chrome") |
| 120 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 121 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 122 | if (is_linux) { |
| 123 | configs += [ "//build/config/linux:fontconfig" ] |
| 124 | deps += [ "//dbus" ] |
| 125 | if (use_x11) { |
| 126 | configs += [ |
| 127 | "//build/config/linux:x11", |
| 128 | ] |
| 129 | deps += [ |
Brett Wilson | 4263a74 | 2014-09-10 00:02:24 | [diff] [blame] | 130 | "//ui/events:events_base", |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 131 | "//ui/events/platform", |
| 132 | "//ui/events/platform/x11", |
| 133 | ] |
| 134 | } |
| 135 | } else { |
| 136 | sources += [ |
| 137 | "api/audio/audio_service.cc", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 138 | ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 139 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 140 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 141 | if (enable_configuration_policy) { |
| 142 | deps += [ "//components/policy" ] |
| 143 | sources += [ |
| 144 | "policy_handlers.cc", |
| 145 | "policy_handlers.h", |
| 146 | ] |
| 147 | sources += rebase_path( |
| 148 | gypi_values.chrome_browser_extensions_policy_sources, |
| 149 | ".", "//chrome") |
| 150 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 151 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 152 | if (enable_webrtc) { |
| 153 | sources += [ |
| 154 | "api/webrtc_logging_private/webrtc_logging_private_api.cc", |
| 155 | ] |
| 156 | } else { |
| 157 | sources += [ |
| 158 | "api/webrtc_logging_private/webrtc_logging_private_api_stub.cc", |
| 159 | ] |
| 160 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 161 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 162 | if (use_brlapi) { |
| 163 | deps += [ "//build/config/linux:libbrlapi" ] |
| 164 | sources += rebase_path(gypi_values.chrome_browser_extensions_brlapi_sources, |
| 165 | ".", "//chrome") |
| 166 | } else { |
| 167 | sources += [ |
| 168 | "api/braille_display_private/braille_controller_stub.cc", |
| 169 | ] |
| 170 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 171 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 172 | if (use_aura) { |
| 173 | deps += [ |
| 174 | "//ui/keyboard", |
| 175 | "//ui/keyboard:resources", |
| 176 | ] |
| 177 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 178 | |
mukai | 55134a0 | 2014-10-29 00:30:22 | [diff] [blame^] | 179 | # chromeos uses its own global_shortcut_listener, _x11 is not necessary. |
| 180 | if (is_chromeos || !use_x11) { |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 181 | sources -= [ |
| 182 | "global_shortcut_listener_x11.cc", |
| 183 | "global_shortcut_listener_x11.h", |
| 184 | ] |
| 185 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 186 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 187 | if (safe_browsing_mode == 1) { |
| 188 | defines += [ "FULL_SAFE_BROWSING" ] |
| 189 | } |
| 190 | if (safe_browsing_mode == 2) { |
| 191 | defines += [ "MOBILE_SAFE_BROWSING" ] |
| 192 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 193 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 194 | if (is_win || is_mac) { |
| 195 | deps += [ "//components/wifi" ] |
| 196 | sources += rebase_path( |
zentaro | c0f330b | 2014-10-09 19:44:37 | [diff] [blame] | 197 | gypi_values.chrome_browser_extensions_networking_private_sources_winmac, |
| 198 | ".", "//chrome") |
| 199 | } |
| 200 | |
mukai | 55134a0 | 2014-10-29 00:30:22 | [diff] [blame^] | 201 | if (is_desktop_linux) { |
zentaro | c0f330b | 2014-10-09 19:44:37 | [diff] [blame] | 202 | sources += rebase_path( |
| 203 | gypi_values.chrome_browser_extensions_networking_private_sources_linux, |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 204 | ".", "//chrome") |
| 205 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 206 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 207 | if (is_win) { |
| 208 | deps += [ |
| 209 | "//third_party/iaccessible2", |
| 210 | "//third_party/isimpledom", |
| 211 | ] |
| 212 | } else if (!is_chromeos) { |
[email protected] | 723b76b | 2014-08-21 23:48:59 | [diff] [blame] | 213 | sources += [ |
| 214 | "display_info_provider_aura.cc", |
| 215 | "display_info_provider_aura.h", |
| 216 | ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 217 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 218 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 219 | if (enable_app_list) { |
| 220 | sources += rebase_path( |
| 221 | gypi_values.chrome_browser_extensions_app_list_sources, |
| 222 | ".", "//chrome") |
| 223 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 224 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 225 | if (!use_ozone) { |
| 226 | sources -= [ |
| 227 | "global_shortcut_listener_ozone.cc", |
| 228 | ] |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 229 | } |
| 230 | } |