summaryrefslogtreecommitdiff
path: root/chromium/ppapi/shared_impl/BUILD.gn
blob: 24fbd4412d6d977a794fa69c51cf9eda6d200e59 (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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# Copyright 2015 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.

import("//build/config/jumbo.gni")
import("//build/config/nacl/config.gni")

jumbo_component("shared_impl") {
  output_name = "ppapi_shared"

  if (is_nacl) {
    # The nacl toolchain has template related bugs that are triggered
    # in jumbo builds. https://crbug.com/912152
    never_build_jumbo = true
  }

  sources = [
    "array_var.cc",
    "array_var.h",
    "array_writer.cc",
    "array_writer.h",
    "callback_tracker.cc",
    "callback_tracker.h",
    "dictionary_var.cc",
    "dictionary_var.h",
    "file_growth.cc",
    "file_growth.h",
    "file_io_state_manager.cc",
    "file_io_state_manager.h",
    "file_path.cc",
    "file_path.h",
    "file_ref_create_info.cc",
    "file_ref_create_info.h",
    "file_ref_util.cc",
    "file_ref_util.h",
    "file_system_util.cc",
    "file_system_util.h",
    "file_type_conversion.cc",
    "file_type_conversion.h",
    "host_resource.cc",
    "host_resource.h",
    "id_assignment.cc",
    "id_assignment.h",
    "media_stream_audio_track_shared.cc",
    "media_stream_audio_track_shared.h",
    "media_stream_buffer.h",
    "media_stream_buffer_manager.cc",
    "media_stream_buffer_manager.h",
    "media_stream_video_track_shared.cc",
    "media_stream_video_track_shared.h",
    "pdf_accessibility_shared.cc",
    "pdf_accessibility_shared.h",
    "platform_file.cc",
    "platform_file.h",
    "ppapi_constants.h",
    "ppapi_globals.cc",
    "ppapi_globals.h",
    "ppapi_nacl_plugin_args.cc",
    "ppapi_nacl_plugin_args.h",
    "ppapi_permissions.cc",
    "ppapi_permissions.h",
    "ppapi_preferences.cc",
    "ppapi_preferences.h",
    "ppapi_switches.cc",
    "ppapi_switches.h",
    "ppb_audio_config_shared.cc",
    "ppb_audio_config_shared.h",
    "ppb_audio_shared.cc",
    "ppb_audio_shared.h",
    "ppb_crypto_shared.cc",
    "ppb_device_ref_shared.cc",
    "ppb_device_ref_shared.h",
    "ppb_flash_font_file_shared.h",
    "ppb_gamepad_shared.cc",
    "ppb_gamepad_shared.h",
    "ppb_graphics_3d_shared.cc",
    "ppb_graphics_3d_shared.h",
    "ppb_image_data_shared.cc",
    "ppb_image_data_shared.h",
    "ppb_input_event_shared.cc",
    "ppb_input_event_shared.h",
    "ppb_instance_shared.cc",
    "ppb_instance_shared.h",
    "ppb_memory_shared.cc",
    "ppb_message_loop_shared.cc",
    "ppb_message_loop_shared.h",
    "ppb_opengles2_shared.cc",
    "ppb_opengles2_shared.h",
    "ppb_tcp_socket_shared.cc",
    "ppb_tcp_socket_shared.h",
    "ppb_trace_event_impl.cc",
    "ppb_trace_event_impl.h",
    "ppb_var_shared.cc",
    "ppb_var_shared.h",
    "ppb_view_shared.cc",
    "ppb_view_shared.h",
    "ppp_instance_combined.cc",
    "ppp_instance_combined.h",
    "proxy_lock.cc",
    "proxy_lock.h",
    "resource.cc",
    "resource.h",
    "resource_tracker.cc",
    "resource_tracker.h",
    "resource_var.cc",
    "resource_var.h",
    "scoped_pp_resource.cc",
    "scoped_pp_resource.h",
    "scoped_pp_var.cc",
    "scoped_pp_var.h",
    "socket_option_data.cc",
    "socket_option_data.h",
    "thread_aware_callback.cc",
    "thread_aware_callback.h",
    "time_conversion.cc",
    "time_conversion.h",
    "tracked_callback.cc",
    "tracked_callback.h",
    "url_request_info_data.cc",
    "url_request_info_data.h",
    "url_response_info_data.cc",
    "url_response_info_data.h",
    "var.cc",
    "var.h",
    "var_tracker.cc",
    "var_tracker.h",
    "vpn_provider_util.cc",
    "vpn_provider_util.h",

    # TODO(viettrungluu): Split these out; it won"t be used in NaCl.
    "private/net_address_private_impl.cc",
    "private/net_address_private_impl.h",
    "private/net_address_private_impl_constants.cc",
    "private/ppb_x509_certificate_private_shared.cc",
    "private/ppb_x509_certificate_private_shared.h",
  ]

  if (!is_nacl) {
    sources += [
      "ppb_url_util_shared.cc",
      "ppb_url_util_shared.h",
      "ppb_video_decoder_shared.cc",
      "ppb_video_decoder_shared.h",
      "private/ppb_char_set_shared.cc",
      "private/ppb_char_set_shared.h",
      "private/ppb_x509_util_shared.cc",
      "private/ppb_x509_util_shared.h",
    ]
  }

  # This condition is catching the build of nacl64.exe, which is built
  # in the 64-bit toolchain when the overall build is 32-bit.
  # See also //ppapi/thunk
  if (is_win && target_cpu == "x86" && current_cpu == "x64") {
    sources -= [
      "ppb_audio_shared.cc",
      "ppb_graphics_3d_shared.cc",
      "ppb_opengles2_shared.cc",
      "private/net_address_private_impl.cc",
    ]
  }

  configs += [ "//build/config:precompiled_headers" ]
  defines = [
    "PPAPI_SHARED_IMPLEMENTATION",

    # This target goes in the same library as thunk (in GYP they are the same).
    "PPAPI_THUNK_IMPLEMENTATION",
  ]

  public_deps = [
    "//base",
    "//ppapi/c",
    "//ppapi/thunk",
  ]

  deps = [
    "//build:chromeos_buildflags",
    "//device/gamepad/public/cpp:shared_with_blink",
    "//gpu/command_buffer/client",
    "//gpu/command_buffer/client:gles2_cmd_helper",
    "//gpu/command_buffer/client:gles2_implementation",
    "//gpu/command_buffer/common",
    "//ipc",
    "//media:shared_memory_support",
  ]

  if (!is_nacl) {
    deps += [
      "//net",
      "//skia",
      "//ui/events:events_base",
      "//ui/surface",
    ]
  }

  if (!is_nacl_nonsfi) {
    deps += [
      "//base:i18n",
      "//base/third_party/dynamic_annotations",
      "//third_party/icu:icuuc",
      "//url",
    ]
  }

  if (is_mac) {
    frameworks = [ "QuartzCore.framework" ]
  }
}

static_library("test_support") {
  testonly = true

  sources = [
    "test_globals.cc",
    "test_globals.h",
    "test_utils.cc",
    "test_utils.h",
  ]

  public_deps = [ "//ppapi/shared_impl" ]
  deps = [
    "//base/test:test_support",
    "//ipc",
    "//ipc:test_support",
    "//ppapi/proxy",
    "//testing/gmock",
    "//testing/gtest",
  ]
}