Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / extensions / browser / BUILD.gn
blob9c9424e28d85c68a4280171afe63d3124d05d42a
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.
5 import("//build/config/crypto.gni")
6 import("//build/config/features.gni")
7 import("//extensions/extensions.gni")
9 # GYP version: extensions/extensions.gyp:extensions_browser
10 source_set("browser") {
11   sources = []
13   deps = [
14     "//base:i18n",
15     "//components/guest_view/browser",
16     "//components/keyed_service/content",
17     "//components/keyed_service/core",
18     "//components/pref_registry",
19     "//components/sessions",
20     "//components/ui/zoom",
21     "//components/web_cache/browser",
22     "//components/web_modal",
23     "//content/public/browser",
24     "//crypto:platform",
25     "//extensions/common",
26     "//extensions/common/api",
27     "//extensions/common/api:api_registration",
28     "//extensions/strings",
29     "//google_apis",
30     "//skia",
31     "//third_party/leveldatabase",
32     "//third_party/re2",
33   ]
35   configs += [
36     "//build/config:precompiled_headers",
38     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
39     "//build/config/compiler:no_size_t_to_int_warning",
40   ]
42   if (enable_extensions) {
43     # Includes all API implementations and the ExtensionsApiClient
44     # interface. Moving an API from src/chrome to src/extensions implies
45     # it can be cleanly disabled with enable_extensions=false.
46     # TODO: Eventually the entire extensions module should not be built
47     # when enable_extensions=false.
48     sources = rebase_path(extensions_gypi_values.extensions_browser_sources,
49                           ".",
50                           "//extensions")
52     deps += [
53       "//components/browsing_data",
54       "//components/onc",
55       "//components/storage_monitor",
56       "//components/update_client",
57       "//components/variations",
58       "//crypto:platform",
59       "//device/bluetooth",
60       "//device/core",
61       "//device/hid",
62       "//device/serial",
63       "//device/usb",
64       "//extensions/common/api/cast_channel:cast_channel_proto",
65     ]
67     if (is_chromeos) {
68       deps += [ "//chromeos" ]
69     }
71     if (is_chromeos) {
72       chromeos_sources = rebase_path(
73               extensions_gypi_values.extensions_browser_sources_chromeos,
74               ".",
75               "//extensions")
76       sources += chromeos_sources
77     } else {
78       nonchromeos_sources = rebase_path(
79               extensions_gypi_values.extensions_browser_sources_nonchromeos,
80               ".",
81               "//extensions")
82       sources += nonchromeos_sources
84       if (is_linux) {
85         configs += [ "//build/config/linux:dbus" ]
86         deps += [ "//dbus" ]
87         linux_sources = rebase_path(
88                 extensions_gypi_values.extensions_browser_sources_linux_nonchromeos,
89                 ".",
90                 "//extensions")
91         sources += linux_sources
92       } else {
93         if (is_win || is_mac) {
94           deps += [ "//components/wifi" ]
96           win_or_mac_sources = rebase_path(
97                   extensions_gypi_values.extensions_browser_sources_win_or_mac,
98                   ".",
99                   "//extensions")
100           sources += win_or_mac_sources
101         }
102       }
103     }
104   }