summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorsergeyu <sergeyu@chromium.org>2015-09-14 16:03:33 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-14 23:04:22 +0000
commit99d83f9b9121d659cdbf259ec9f71f8d1f090100 (patch)
tree401fcc5cecb29b24ddb37952d18141b31da8d1c3 /remoting
parent3fa5b0aec0c7361fa666e4145da0ea9167f55ecd (diff)
downloadchromium_src-99d83f9b9121d659cdbf259ec9f71f8d1f090100.zip
chromium_src-99d83f9b9121d659cdbf259ec9f71f8d1f090100.tar.gz
chromium_src-99d83f9b9121d659cdbf259ec9f71f8d1f090100.tar.bz2
Compile remoting client plugin with GN
BUG=512899 Review URL: https://codereview.chromium.org/1312463005 Cr-Commit-Position: refs/heads/master@{#348752}
Diffstat (limited to 'remoting')
-rw-r--r--remoting/base/BUILD.gn11
-rw-r--r--remoting/client/BUILD.gn17
-rw-r--r--remoting/client/plugin/BUILD.gn19
-rw-r--r--remoting/codec/BUILD.gn24
-rw-r--r--remoting/protocol/BUILD.gn7
-rw-r--r--remoting/remoting_srcs.gypi1
-rw-r--r--remoting/signaling/BUILD.gn8
-rw-r--r--remoting/webapp/build_template.gni18
8 files changed, 88 insertions, 17 deletions
diff --git a/remoting/base/BUILD.gn b/remoting/base/BUILD.gn
index 22b8e4a..917cfab 100644
--- a/remoting/base/BUILD.gn
+++ b/remoting/base/BUILD.gn
@@ -19,14 +19,13 @@ source_set("base") {
]
deps = [
"//base/third_party/dynamic_annotations",
- "//media",
- "//media:shared_memory_support",
- "//remoting/resources",
"//third_party/libvpx",
"//third_party/libyuv",
- "//third_party/webrtc/modules/desktop_capture",
- "//ui/base",
+ "//third_party/webrtc/modules/desktop_capture:primitives",
]
+ if (is_nacl) {
+ sources -= [ "url_request_context_getter.cc" ]
+ }
}
source_set("breakpad") {
@@ -77,7 +76,7 @@ source_set("unit_tests") {
"//testing/gmock",
"//testing/gtest",
"//third_party/libyuv",
- "//third_party/webrtc/modules/desktop_capture",
+ "//third_party/webrtc/modules/desktop_capture:primitives",
]
if (is_win || is_mac || is_chromeos) {
diff --git a/remoting/client/BUILD.gn b/remoting/client/BUILD.gn
index e26fdbd..a3cc1b1 100644
--- a/remoting/client/BUILD.gn
+++ b/remoting/client/BUILD.gn
@@ -5,9 +5,13 @@
import("//remoting/remoting_srcs.gni")
source_set("client") {
+ # Disabled the source filters because there are _mac files that need to
+ # be compiled on all platforms.
+ set_sources_assignment_filter([])
sources = rebase_path(remoting_srcs_gypi_values.remoting_client_sources,
".",
"//remoting")
+ set_sources_assignment_filter(sources_assignment_filter)
configs += [
"//build/config/compiler:wexit_time_destructors",
@@ -19,13 +23,23 @@ source_set("client") {
"//remoting/codec",
"//remoting/protocol",
"//third_party/libyuv",
- "//third_party/webrtc/modules/desktop_capture",
+ "//third_party/webrtc/modules/desktop_capture:primitives",
]
+
+ if (is_nacl) {
+ sources -= [
+ "client_status_logger.cc",
+ "server_log_entry_client.cc",
+ ]
+ }
}
source_set("unit_tests") {
testonly = true
+ # Disabled the source filters because there are _mac files that need to
+ # be compiled on all platforms.
+ set_sources_assignment_filter([])
sources = [
"audio_player_unittest.cc",
"client_status_logger_unittest.cc",
@@ -37,6 +51,7 @@ source_set("unit_tests") {
"software_video_renderer_unittest.cc",
"touch_input_scaler_unittest.cc",
]
+ set_sources_assignment_filter(sources_assignment_filter)
configs += [ "//remoting:version" ]
diff --git a/remoting/client/plugin/BUILD.gn b/remoting/client/plugin/BUILD.gn
index 4c9af9d..0c69ef0 100644
--- a/remoting/client/plugin/BUILD.gn
+++ b/remoting/client/plugin/BUILD.gn
@@ -1,11 +1,13 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
+# 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.
+assert(is_nacl,
+ "These targets must only be built using the untrusted NaCl toolchains.")
+
import("//remoting/remoting_srcs.gni")
-# TODO(sergeyu): Port this target to NaCl.
-source_set("plugin") {
+executable("remoting_client_plugin_newlib") {
sources =
rebase_path(remoting_srcs_gypi_values.remoting_client_plugin_sources,
".",
@@ -13,17 +15,18 @@ source_set("plugin") {
configs += [ "//build/config/compiler:wexit_time_destructors" ]
- defines = [ "HAVE_STDINT_H" ] # Required by on2_integer.h.
-
deps = [
"//net",
- "//ppapi/cpp:objects",
- "//ppapi/cpp/private:internal_module",
+ "//ppapi/cpp",
+ "//ppapi/native_client:ppapi_lib",
"//remoting/base",
"//remoting/client",
"//remoting/codec",
"//remoting/protocol",
- "//third_party/webrtc/modules/desktop_capture",
+ "//third_party/libyuv",
+ "//third_party/webrtc/modules/desktop_capture:primitives",
"//ui/events:dom_keycode_converter",
]
+
+ include_dirs = [ "//ppapi/lib/gl/include" ]
}
diff --git a/remoting/codec/BUILD.gn b/remoting/codec/BUILD.gn
index 26bf12b..d08d83c 100644
--- a/remoting/codec/BUILD.gn
+++ b/remoting/codec/BUILD.gn
@@ -16,12 +16,32 @@ source_set("codec") {
"//media",
"//media:shared_memory_support",
"//remoting/proto",
- "//remoting/resources",
"//third_party/libvpx",
"//third_party/libyuv",
"//third_party/opus",
- "//third_party/webrtc/modules/desktop_capture",
+ "//third_party/webrtc/modules/desktop_capture:primitives",
]
+
+ if (is_nacl) {
+ deps -= [
+ "//media",
+ "//media:shared_memory_support",
+ ]
+ sources -= [
+ "audio_encoder.h",
+ "audio_encoder_opus.cc",
+ "audio_encoder_opus.h",
+ "audio_encoder_verbatim.cc",
+ "audio_encoder_verbatim.h",
+ "video_encoder.h",
+ "video_encoder_helper.cc",
+ "video_encoder_helper.h",
+ "video_encoder_verbatim.cc",
+ "video_encoder_verbatim.h",
+ "video_encoder_vpx.cc",
+ "video_encoder_vpx.h",
+ ]
+ }
}
source_set("unit_tests") {
diff --git a/remoting/protocol/BUILD.gn b/remoting/protocol/BUILD.gn
index bb1942b..722bd77 100644
--- a/remoting/protocol/BUILD.gn
+++ b/remoting/protocol/BUILD.gn
@@ -28,6 +28,13 @@ source_set("protocol") {
"//remoting/codec",
"//remoting/signaling",
]
+
+ if (is_nacl) {
+ sources -= [
+ "chromium_port_allocator.cc",
+ "chromium_socket_factory.cc",
+ ]
+ }
}
source_set("test_support") {
diff --git a/remoting/remoting_srcs.gypi b/remoting/remoting_srcs.gypi
index 251be54..60c77b5 100644
--- a/remoting/remoting_srcs.gypi
+++ b/remoting/remoting_srcs.gypi
@@ -273,6 +273,7 @@
'client/plugin/pepper_cursor_setter.h',
'client/plugin/pepper_input_handler.cc',
'client/plugin/pepper_input_handler.h',
+ 'client/plugin/pepper_module.cc',
'client/plugin/pepper_mouse_locker.cc',
'client/plugin/pepper_mouse_locker.h',
'client/plugin/pepper_network_manager.cc',
diff --git a/remoting/signaling/BUILD.gn b/remoting/signaling/BUILD.gn
index 0b33cdb..db2cf98 100644
--- a/remoting/signaling/BUILD.gn
+++ b/remoting/signaling/BUILD.gn
@@ -26,6 +26,14 @@ source_set("signaling") {
"//net",
"//remoting/base",
]
+
+ if (is_nacl) {
+ sources -= [
+ "log_to_server.cc",
+ "server_log_entry.cc",
+ "xmpp_signal_strategy.cc",
+ ]
+ }
}
source_set("test_support") {
diff --git a/remoting/webapp/build_template.gni b/remoting/webapp/build_template.gni
index 003ef13..7053cd6 100644
--- a/remoting/webapp/build_template.gni
+++ b/remoting/webapp/build_template.gni
@@ -5,6 +5,7 @@
# Keep in sync with 'remoting_webapp' target in remoting/remoting_client.gypi.
import("//build/config/chrome_build.gni")
+import("//build/config/features.gni")
import("//build/util/version.gni")
import("//remoting/remoting_locales.gni")
import("//remoting/remoting_options.gni")
@@ -183,6 +184,17 @@ template("desktop_remoting_webapp") {
"$target_gen_dir/credits.html",
]
+ if (enable_pnacl) {
+ pexe_dir = get_label_info(
+ "//remoting/client/plugin:remoting_client_plugin_newlib(//build/toolchain/nacl:newlib_pnacl)",
+ "root_out_dir")
+
+ extra_files += [ "$pexe_dir/remoting_client_plugin_newlib.pexe" ]
+ if (is_debug) {
+ extra_files += [ "$pexe_dir/remoting_client_plugin_newlib.pexe.debug" ]
+ }
+ }
+
inputs = [ rebase_path("crd/manifest.json.jinja2", root_build_dir) ] +
remoting_version_files +
rebase_path(remoting_webapp_crd_files, root_build_dir) +
@@ -202,6 +214,12 @@ template("desktop_remoting_webapp") {
"//remoting/webapp:credits",
]
+ if (enable_pnacl) {
+ deps += [
+ "//remoting/client/plugin:remoting_client_plugin_newlib(//build/toolchain/nacl:newlib_pnacl)",
+ ]
+ }
+
# Create a file that contains a list of all the resource files needed
# to build the webapp. This is needed to avoid problems on platforms that
# limit the size of a command line.