summaryrefslogtreecommitdiffstats
path: root/extensions/shell/BUILD.gn
blob: 7d436ce19e3dd31b6c5f02d17c9f687c1fdaea0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Technically, this directory should not depend on files from src/chrome, but
# that's where the VERSION file is. This  should probably all be moved to
# src/build.
import("//chrome/version.gni")
import("//tools/grit/grit_rule.gni")

assert(enable_extensions)

grit("resources") {
  source = "app_shell_resources.grd"
  outputs = [
    "grit/app_shell_resources.h",
    "app_shell_resources.pak",
  ]
}

source_set("app_shell_lib") {
  # This library is testonly because it depends on testonly libarries,
  # namely //base:prefs_test_support and //content/shell:content_shell_lib
  # TODO(jamescook): investigate and get rid of test dependencies.
  testonly = true
  deps = [
    ":resources",
    ":version_header",
    "//base",
    "//base:prefs_test_support",
    "//components/omaha_query_params",
    "//components/pref_registry",
    "//components/user_prefs",
    "//components/web_cache/renderer",
    "//content",
    "//content/shell:content_shell_lib",
    "//device/core",
    "//device/hid",
    "//extensions/common/api",
    "//extensions/common/api:api_registration",
    "//extensions/browser",
    "//extensions/common",
    "//extensions/renderer",
    "//extensions/shell/common/api",
    "//extensions/shell/common/api:api_registration",
    "//extensions/utility",
    "//extensions:extensions_resources",
    "//extensions:shell_and_test_pak",
    "//mojo/edk/system",
    "//mojo/environment:chromium",
    "//skia",
    "//third_party/WebKit/public:blink",
    "//ui/wm",
    "//v8",
  ]
  sources = [
    "app/shell_main_delegate.cc",
    "app/shell_main_delegate.h",
    "browser/api/identity/identity_api.cc",
    "browser/api/identity/identity_api.h",
    "browser/api/shell_gcd/shell_gcd_api.cc",
    "browser/api/shell_gcd/shell_gcd_api.h",
    "browser/api/shell_window/shell_window_api.cc",
    "browser/api/shell_window/shell_window_api.h",
    "browser/default_shell_browser_main_delegate.cc",
    "browser/default_shell_browser_main_delegate.h",
    "browser/desktop_controller.cc",
    "browser/desktop_controller.h",
    "browser/media_capture_util.cc",
    "browser/media_capture_util.h",
    "browser/shell_app_delegate.cc",
    "browser/shell_app_delegate.h",
    "browser/shell_app_window_client.cc",
    "browser/shell_app_window_client.h",
    "browser/shell_audio_controller_chromeos.cc",
    "browser/shell_audio_controller_chromeos.h",
    "browser/shell_browser_context.cc",
    "browser/shell_browser_context.h",
    "browser/shell_browser_context_keyed_service_factories.cc",
    "browser/shell_browser_context_keyed_service_factories.h",
    "browser/shell_browser_main_delegate.h",
    "browser/shell_browser_main_parts.cc",
    "browser/shell_browser_main_parts.h",
    "browser/shell_content_browser_client.cc",
    "browser/shell_content_browser_client.h",
    "browser/shell_desktop_controller.cc",
    "browser/shell_desktop_controller.h",
    "browser/shell_device_client.cc",
    "browser/shell_device_client.h",
    "browser/shell_display_info_provider.cc",
    "browser/shell_display_info_provider.h",
    "browser/shell_extension_host_delegate.cc",
    "browser/shell_extension_host_delegate.h",
    "browser/shell_extension_system.cc",
    "browser/shell_extension_system.h",
    "browser/shell_extension_system_factory.cc",
    "browser/shell_extension_system_factory.h",
    "browser/shell_extension_web_contents_observer.cc",
    "browser/shell_extension_web_contents_observer.h",
    "browser/shell_extensions_browser_client.cc",
    "browser/shell_extensions_browser_client.h",
    "browser/shell_native_app_window.cc",
    "browser/shell_native_app_window.h",
    "browser/shell_network_controller_chromeos.cc",
    "browser/shell_network_controller_chromeos.h",
    "browser/shell_network_delegate.cc",
    "browser/shell_network_delegate.h",
    "browser/shell_oauth2_token_service.cc",
    "browser/shell_oauth2_token_service.h",
    "browser/shell_omaha_query_params_delegate.cc",
    "browser/shell_omaha_query_params_delegate.h",
    "browser/shell_runtime_api_delegate.cc",
    "browser/shell_runtime_api_delegate.h",
    "browser/shell_special_storage_policy.cc",
    "browser/shell_special_storage_policy.h",
    "browser/shell_url_request_context_getter.cc",
    "browser/shell_url_request_context_getter.h",
    "browser/shell_web_contents_modal_dialog_manager.cc",
    "common/shell_content_client.cc",
    "common/shell_content_client.h",
    "common/shell_extensions_client.cc",
    "common/shell_extensions_client.h",
    "common/switches.cc",
    "common/switches.h",
    "renderer/shell_content_renderer_client.cc",
    "renderer/shell_content_renderer_client.h",
    "renderer/shell_extensions_renderer_client.cc",
    "renderer/shell_extensions_renderer_client.h",
    "utility/shell_content_utility_client.cc",
    "utility/shell_content_utility_client.h",
  ]
  if (is_chromeos) {
    deps += [
      "//chromeos",
      "//ui/chromeos:ui_chromeos",
      "//ui/display",
    ]
  }
}

if (!(is_chromeos && !use_ozone)) {
  executable("app_shell") {
    # testonly because :app_shell_lib is testonly. See :app_shell_lib comment.
    testonly = true
    sources = [
      "app/shell_main.cc",
    ]
    deps = [
      ":app_shell_lib",
      "//extensions:shell_and_test_pak",
    ]
  }
}

process_version("version_header") {
  source = "common/version.h.in"
  output = "$target_gen_dir/common/version.h"
}