Update V8 to version 4.7.24.
[chromium-blink-merge.git] / device / battery / battery.gyp
blob679630f1497736bc58ea3ddaa1b09e47a768d2cf
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
3 # found in the LICENSE file.
6   'variables': {
7     'chromium_code': 1,
8   },
9   'targets': [
10     {
11       # GN version: //device/battery:mojo_bindings
12       'target_name': 'device_battery_mojo_bindings',
13       'type': 'static_library',
14       'includes': [
15         '../../third_party/mojo/mojom_bindings_generator.gypi',
16       ],
17       'sources': [
18         'battery_monitor.mojom',
19         'battery_status.mojom',
20       ],
21     },
22     {
23       # This is needed only for a build within Android tree. TODO(ppi): remove
24       # when Android tree build is deprecated.
25       'target_name': 'device_battery_mojo_bindings_for_webview',
26       'type': 'none',
27       'dependencies': [
28         'device_battery_mojo_bindings',
29       ],
30       'actions': [
31         {
32           # Dummy action that triggers the bindings generation and explicitly
33           # declares the java outputs, so that they are discoverable to make.
34           'action_name': 'device_battery_mojo_bindings_dummy_action',
35           'inputs': [
36             '<(SHARED_INTERMEDIATE_DIR)/device/battery/battery_monitor.mojom.h',
37             '<(SHARED_INTERMEDIATE_DIR)/device/battery/battery_status.mojom.h',
38           ],
39           'outputs': [
40             '<(SHARED_INTERMEDIATE_DIR)/java_mojo/device_battery_mojo_bindings/src/org/chromium/mojom/device/BatteryMonitor.java',
41             '<(SHARED_INTERMEDIATE_DIR)/java_mojo/device_battery_mojo_bindings/src/org/chromium/mojom/device/BatteryMonitor_Internal.java',
42             '<(SHARED_INTERMEDIATE_DIR)/java_mojo/device_battery_mojo_bindings/src/org/chromium/mojom/device/BatteryStatusObserver.java',
43             '<(SHARED_INTERMEDIATE_DIR)/java_mojo/device_battery_mojo_bindings/src/org/chromium/mojom/device/BatteryStatusObserver_Internal.java',
44             '<(SHARED_INTERMEDIATE_DIR)/java_mojo/device_battery_mojo_bindings/src/org/chromium/mojom/device/BatteryStatus.java',
45           ],
46           'action': ['touch', '<@(_outputs)'],
47         },
48       ],
49       'hard_dependency': 1,
50     },
51   ],
52   'conditions': [
53     ['OS == "android"', {
54       'targets': [
55         {
56           'target_name': 'device_battery_java',
57           'type': 'none',
58           'dependencies': [
59             '../../base/base.gyp:base',
60             '../../third_party/mojo/mojo_public.gyp:mojo_bindings_java',
61             'device_battery_mojo_bindings',
62           ],
63           'variables': {
64             'java_in_dir': '../../device/battery/android/java',
65           },
66           'includes': [ '../../build/java.gypi' ],
67         },
68         {
69           'target_name': 'device_battery_javatests',
70           'type': 'none',
71           'variables': {
72             'java_in_dir': '../../device/battery/android/javatests',
73           },
74           'dependencies': [
75             '../../base/base.gyp:base',
76             '../../base/base.gyp:base_java_test_support',
77             'device_battery_java',
78           ],
79           'includes': [ '../../build/java.gypi' ],
80         },
81       ],
82     }, {  # OS != "android"
83       # On android, BatteryManager mojo service is implemented directly in Java.
84       'targets': [
85         {
86           # GN version: //device/battery
87           'target_name': 'device_battery',
88           'type': '<(component)',
89           'dependencies': [
90             '../../base/base.gyp:base',
91             '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
92             '../../mojo/mojo_base.gyp:mojo_environment_chromium',
93             '../../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
94             '../../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
95             'device_battery_mojo_bindings',
96           ],
97           'defines': [
98             'DEVICE_BATTERY_IMPLEMENTATION',
99           ],
100           'sources': [
101             'battery_monitor_impl.cc',
102             'battery_monitor_impl.h',
103             'battery_status_manager_chromeos.cc',
104             'battery_status_manager_default.cc',
105             'battery_status_manager_linux.cc',
106             'battery_status_manager_linux.h',
107             'battery_status_manager_mac.cc',
108             'battery_status_manager_win.cc',
109             'battery_status_manager_win.h',
110             'battery_status_manager.h',
111             'battery_status_service.cc',
112             'battery_status_service.h',
113           ],
114           'conditions': [
115             ['chromeos==1', {
116               'dependencies': [
117                 '../../build/linux/system.gyp:dbus',
118                 '../../chromeos/chromeos.gyp:chromeos',
119                 '../../chromeos/chromeos.gyp:power_manager_proto',
120               ],
121               'sources!': [
122                 'battery_status_manager_default.cc',
123                 'battery_status_manager_linux.cc',
124               ],
125             }],
126             ['OS == "linux" and use_dbus==1', {
127               'sources!': [
128                 'battery_status_manager_default.cc',
129               ],
130               'dependencies': [
131                 '../../build/linux/system.gyp:dbus',
132                 '../../dbus/dbus.gyp:dbus',
133               ],
134             }, {  # OS != "linux" or use_dbus==0
135               'sources!': [
136                 'battery_status_manager_linux.cc',
137               ],
138             }],
139             ['OS == "mac"', {
140               'sources!': [
141                 'battery_status_manager_default.cc',
142               ],
143             }],
144             ['OS == "win"', {
145               'sources!': [
146                 'battery_status_manager_default.cc',
147               ],
148             }],
149           ],
150         },
151       ],
152     }],
153   ],