summaryrefslogtreecommitdiffstats
path: root/device
diff options
context:
space:
mode:
authorsammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-29 08:11:44 +0000
committersammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-29 08:11:44 +0000
commitafac7312f4245e61a940e0a307f34b8bde8a2ddf (patch)
tree384f3cc037872d6d4bea37ec728fc730b0ddf326 /device
parente5dd2e068095b0e60fe94c5cb31d0fd45a0f51f2 (diff)
downloadchromium_src-afac7312f4245e61a940e0a307f34b8bde8a2ddf.zip
chromium_src-afac7312f4245e61a940e0a307f34b8bde8a2ddf.tar.gz
chromium_src-afac7312f4245e61a940e0a307f34b8bde8a2ddf.tar.bz2
Implement chrome.serial.getDevices() on top of the Mojo serial service.
This does not change Chrome to use the new implementation. BUG=389016 Review URL: https://codereview.chromium.org/391413005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286122 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device')
-rw-r--r--device/serial/BUILD.gn6
-rw-r--r--device/serial/serial.gyp27
2 files changed, 25 insertions, 8 deletions
diff --git a/device/serial/BUILD.gn b/device/serial/BUILD.gn
index 9250c9f..7797c3f 100644
--- a/device/serial/BUILD.gn
+++ b/device/serial/BUILD.gn
@@ -54,8 +54,12 @@ static_library("test_util") {
]
}
+# GYP version: device/serial/serial.gyp:device_serial_mojo
mojom("serial_mojo") {
- visibility = ":serial"
+ visibility = [
+ ":serial",
+ "//extensions:extensions_renderer_resources_grit",
+ ]
sources = [
"serial.mojom",
diff --git a/device/serial/serial.gyp b/device/serial/serial.gyp
index dec3102..676d10e 100644
--- a/device/serial/serial.gyp
+++ b/device/serial/serial.gyp
@@ -8,11 +8,26 @@
},
'targets': [
{
+ # GN version: //device/serial:serial_mojo
+ 'target_name': 'device_serial_mojo',
+ # The type of this target must be none. This is so that resources can
+ # depend upon this target for generating the js bindings files. Any
+ # generated cpp files must be listed explicitly in device_serial
+ 'type': 'none',
+ 'includes': [
+ '../../mojo/public/tools/bindings/mojom_bindings_generator.gypi',
+ ],
+ 'sources': [
+ 'serial.mojom',
+ ],
+ },
+ {
# GN version: //device/serial
'target_name': 'device_serial',
'type': 'static_library',
'include_dirs': [
'../..',
+ '<(SHARED_INTERMEDIATE_DIR)',
],
'conditions': [
['OS=="linux"', {
@@ -21,12 +36,6 @@
],
}],
],
- 'variables': {
- 'mojom_base_output_dir': 'device/serial',
- },
- 'includes': [
- '../../mojo/public/tools/bindings/mojom_bindings_generator.gypi',
- ],
'dependencies': [
'../../mojo/mojo.gyp:mojo_cpp_bindings',
'../../net/net.gyp:net',
@@ -35,7 +44,8 @@
'../../mojo/mojo.gyp:mojo_cpp_bindings',
],
'sources': [
- 'serial.mojom',
+ '<(SHARED_INTERMEDIATE_DIR)/device/serial/serial.mojom.cc',
+ '<(SHARED_INTERMEDIATE_DIR)/device/serial/serial.mojom.h',
'serial_connection.cc',
'serial_connection.h',
'serial_connection_factory.cc',
@@ -65,6 +75,9 @@
'dependencies': [
'device_serial',
],
+ 'include_dirs': [
+ '../..',
+ ],
'sources': [
'test_serial_io_handler.cc',
'test_serial_io_handler.h',