[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 | |
| 24 | # TODO(GYP) remove this when webrtc is ported. |
| 25 | configs += [ "//content:webrtc_stub_config" ] |
| 26 | |
| 27 | # Since browser and browser_extensions actually depend on each other, |
| 28 | # we must omit the dependency from browser_extensions to browser. |
| 29 | # However, this means browser_extensions and browser should more or less |
| 30 | # have the same dependencies. Once browser_extensions is untangled from |
| 31 | # browser, then we can clean up these dependencies. |
| 32 | deps = [ |
| 33 | "//chrome:extra_resources", |
| 34 | "//chrome:resources", |
| 35 | "//chrome:strings", |
| 36 | "//chrome/app/resources:platform_locale_settings", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 37 | "//chrome/app/theme:theme_resources", |
[email protected] | 55699f39 | 2014-08-20 22:16:30 | [diff] [blame] | 38 | "//chrome/browser/devtools", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 39 | "//chrome/browser/history:in_memory_url_index_cache_proto", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 40 | "//chrome/common", |
| 41 | "//chrome/common/extensions/api", |
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", |
| 49 | "//components/strings", |
| 50 | "//components/url_matcher", |
[email protected] | a9ca8d5 | 2014-08-22 10:21:08 | [diff] [blame] | 51 | "//content/app/resources", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 52 | "//content/public/browser", |
| 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", |
| 63 | "//sync", |
[email protected] | 4eebe74d | 2014-08-13 02:54:46 | [diff] [blame] | 64 | "//third_party/WebKit/public:resources", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 65 | "//third_party/cacheinvalidation", |
| 66 | "//third_party/icu", |
| 67 | "//third_party/leveldatabase", |
| 68 | "//third_party/re2", |
| 69 | "//ui/accessibility:ax_gen", |
| 70 | "//ui/base", |
| 71 | "//ui/gfx", |
| 72 | "//ui/gfx/geometry", |
| 73 | "//ui/resources", |
| 74 | "//ui/strings", |
| 75 | "//url", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 76 | "//webkit/browser:storage", |
| 77 | "//webkit/common:storage", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 78 | #"../third_party/webrtc/modules/modules.gyp:desktop_capture", TODO(GYP) |
| 79 | ] |
| 80 | |
| 81 | forward_dependent_configs_from = [ |
| 82 | "//chrome/common/extensions/api", |
| 83 | "//content/public/browser", |
| 84 | ] |
| 85 | |
| 86 | if (is_chromeos) { |
| 87 | sources += rebase_path( |
| 88 | gypi_values.chrome_browser_extensions_chromeos_sources, |
| 89 | ".", "//chrome") |
| 90 | configs += [ "//build/config/linux:dbus" ] |
| 91 | deps += [ |
| 92 | "//third_party/libevent", |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 93 | "//third_party/protobuf:protobuf_lite", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 94 | #'../chromeos/ime/input_method.gyp:gencode', TODO(GYP) |
| 95 | ] |
| 96 | } else { |
| 97 | sources += [ |
| 98 | "default_apps.cc", |
| 99 | "default_apps.h'" |
| 100 | ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 101 | sources += rebase_path( |
| 102 | gypi_values.chrome_browser_extensions_non_chromeos_sources, |
| 103 | ".", "//chrome") |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 104 | } |
| 105 | |
| 106 | if (use_ash) { |
| 107 | sources += [ |
| 108 | "api/tabs/ash_panel_contents.cc", |
| 109 | "api/tabs/ash_panel_contents.h", |
| 110 | ] |
| 111 | } |
| 112 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 113 | if (is_linux) { |
| 114 | configs += [ "//build/config/linux:fontconfig" ] |
| 115 | deps += [ "//dbus" ] |
| 116 | if (use_x11) { |
| 117 | configs += [ |
| 118 | "//build/config/linux:x11", |
| 119 | ] |
| 120 | deps += [ |
| 121 | "//ui/events/platform", |
| 122 | "//ui/events/platform/x11", |
| 123 | ] |
| 124 | } |
| 125 | } else { |
| 126 | sources += [ |
| 127 | "api/audio/audio_service.cc", |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 128 | ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 129 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 130 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 131 | if (enable_configuration_policy) { |
| 132 | deps += [ "//components/policy" ] |
| 133 | sources += [ |
| 134 | "policy_handlers.cc", |
| 135 | "policy_handlers.h", |
| 136 | ] |
| 137 | sources += rebase_path( |
| 138 | gypi_values.chrome_browser_extensions_policy_sources, |
| 139 | ".", "//chrome") |
| 140 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 141 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 142 | if (enable_webrtc) { |
| 143 | sources += [ |
| 144 | "api/webrtc_logging_private/webrtc_logging_private_api.cc", |
| 145 | ] |
| 146 | } else { |
| 147 | sources += [ |
| 148 | "api/webrtc_logging_private/webrtc_logging_private_api_stub.cc", |
| 149 | ] |
| 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 (use_brlapi) { |
| 153 | deps += [ "//build/config/linux:libbrlapi" ] |
| 154 | sources += rebase_path(gypi_values.chrome_browser_extensions_brlapi_sources, |
| 155 | ".", "//chrome") |
| 156 | } else { |
| 157 | sources += [ |
| 158 | "api/braille_display_private/braille_controller_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_aura) { |
| 163 | deps += [ |
| 164 | "//ui/keyboard", |
| 165 | "//ui/keyboard:resources", |
| 166 | ] |
| 167 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 168 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [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 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 176 | if (safe_browsing_mode == 1) { |
| 177 | defines += [ "FULL_SAFE_BROWSING" ] |
| 178 | } |
| 179 | if (safe_browsing_mode == 2) { |
| 180 | defines += [ "MOBILE_SAFE_BROWSING" ] |
| 181 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 182 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 183 | if (is_win || is_mac) { |
| 184 | deps += [ "//components/wifi" ] |
| 185 | sources += rebase_path( |
| 186 | gypi_values.chrome_browser_extensions_networking_private_sources, |
| 187 | ".", "//chrome") |
| 188 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 189 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 190 | if (is_win) { |
| 191 | deps += [ |
| 192 | "//third_party/iaccessible2", |
| 193 | "//third_party/isimpledom", |
| 194 | ] |
| 195 | } else if (!is_chromeos) { |
[email protected] | 723b76b | 2014-08-21 23:48:59 | [diff] [blame] | 196 | sources += [ |
| 197 | "display_info_provider_aura.cc", |
| 198 | "display_info_provider_aura.h", |
| 199 | ] |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 200 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 201 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 202 | if (enable_app_list) { |
| 203 | sources += rebase_path( |
| 204 | gypi_values.chrome_browser_extensions_app_list_sources, |
| 205 | ".", "//chrome") |
| 206 | } |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 207 | |
[email protected] | 94e7719 | 2014-08-12 03:00:02 | [diff] [blame] | 208 | if (!use_ozone) { |
| 209 | sources -= [ |
| 210 | "global_shortcut_listener_ozone.cc", |
| 211 | ] |
[email protected] | fb2799e | 2014-07-15 23:50:29 | [diff] [blame] | 212 | } |
| 213 | } |