OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 import("//mojo/public/tools/bindings/mojom.gni") | 6 import("//mojo/public/tools/bindings/mojom.gni") |
7 | 7 |
8 component("vibration") { | 8 # On android, VibrationManager mojo interface is implemented directly in Java. |
9 output_name = "device_vibration" | 9 if (!is_android) { |
| 10 component("vibration") { |
| 11 output_name = "device_vibration" |
10 | 12 |
11 sources = [ | 13 sources = [ |
12 "vibration_export.h", | 14 "vibration_export.h", |
13 "vibration_manager_impl.h", | 15 "vibration_manager_impl.h", |
14 "vibration_manager_impl_default.cc", | 16 "vibration_manager_impl_default.cc", |
15 ] | 17 ] |
16 | 18 |
17 defines = [ "DEVICE_VIBRATION_IMPLEMENTATION" ] | 19 defines = [ "DEVICE_VIBRATION_IMPLEMENTATION" ] |
18 | 20 |
19 deps = [ | 21 deps = [ |
20 ":mojo_bindings", | 22 ":mojo_bindings", |
21 "//base", | 23 "//base", |
22 "//base/third_party/dynamic_annotations", | 24 "//base/third_party/dynamic_annotations", |
23 "//mojo/public/cpp/bindings", | 25 "//mojo/public/cpp/bindings", |
24 ] | 26 ] |
25 | |
26 if (is_android) { | |
27 sources -= [ "vibration_manager_impl_default.cc" ] | |
28 } | 27 } |
29 } | 28 } |
30 | 29 |
31 mojom("mojo_bindings") { | 30 mojom("mojo_bindings") { |
32 sources = [ | 31 sources = [ |
33 "vibration_manager.mojom", | 32 "vibration_manager.mojom", |
34 ] | 33 ] |
35 } | 34 } |
OLD | NEW |