Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: device/vibration/BUILD.gn

Issue 1123283007: Merge device/vibration/android/BUILD.gn to vibration/BUILD.gn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | device/vibration/android/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni") 6 import("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni")
7 7
8 if (is_android) {
9 import("//build/config/android/config.gni")
10 import("//build/config/android/rules.gni") # For generate_jni().
11 }
12
8 component("vibration") { 13 component("vibration") {
9 output_name = "device_vibration" 14 output_name = "device_vibration"
10 15
11 sources = [ 16 sources = [
17 "android/vibration_jni_registrar.cc",
timvolodine 2015/05/14 12:16:36 looks like this is only needed for android?
scheib 2015/05/14 16:43:00 As in GYP, platform files are implicitly filtered:
scheib 2015/05/14 16:48:16 Actually, since the if (is_android) block below is
18 "android/vibration_jni_registrar.h",
12 "vibration_export.h", 19 "vibration_export.h",
13 "vibration_manager_impl.h", 20 "vibration_manager_impl.h",
14 "vibration_manager_impl_android.cc", 21 "vibration_manager_impl_android.cc",
15 "vibration_manager_impl_android.h", 22 "vibration_manager_impl_android.h",
16 "vibration_manager_impl_default.cc",
17 ] 23 ]
18 24
19 defines = [ "DEVICE_VIBRATION_IMPLEMENTATION" ] 25 defines = [ "DEVICE_VIBRATION_IMPLEMENTATION" ]
20 26
21 deps = [ 27 deps = [
22 ":mojo_bindings", 28 ":mojo_bindings",
23 "//base", 29 "//base",
24 "//base/third_party/dynamic_annotations", 30 "//base/third_party/dynamic_annotations",
25 "//mojo/environment:chromium", 31 "//mojo/environment:chromium",
26 "//third_party/mojo/src/mojo/public/cpp/bindings", 32 "//third_party/mojo/src/mojo/public/cpp/bindings",
27 "//third_party/mojo/src/mojo/edk/system", 33 "//third_party/mojo/src/mojo/edk/system",
28 ] 34 ]
29 35
30 if (is_android) { 36 if (is_android) {
31 sources -= [ "vibration_manager_impl_default.cc" ] 37 deps += [ ":vibration_jni_headers" ]
32 deps += [ 38 } else {
33 "//device/vibration/android", 39 sources += [ "vibration_manager_impl_default.cc" ]
timvolodine 2015/05/14 12:16:36 nit: no need for else if you use sources -= [ "vib
scheib 2015/05/14 16:43:00 GN style guide: List sources only once: https://ch
34 "//device/vibration/android:vibration_jni_headers",
35 ]
36 allow_circular_includes_from = [ "//device/vibration/android" ]
37 } 40 }
38 } 41 }
39 42
40 mojom("mojo_bindings") { 43 mojom("mojo_bindings") {
41 sources = [ 44 sources = [
42 "vibration_manager.mojom", 45 "vibration_manager.mojom",
43 ] 46 ]
44 } 47 }
48
49 if (is_android) {
50 generate_jni("vibration_jni_headers") {
51 sources = [
52 "android/java/src/org/chromium/device/vibration/VibrationProvider.java",
53 ]
54 jni_package = "vibration"
55 }
56 }
OLDNEW
« no previous file with comments | « no previous file | device/vibration/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698