blob: a446c9f926ae452de81a600a3f2ac27301cd18ee [file] [log] [blame]
[email protected]abd4b682014-07-16 20:26:301# 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.
4
James Robinson2ed4d692014-09-17 05:20:585# GYP version: components/gcm_driver.gypi:gcm_driver
[email protected]abd4b682014-07-16 20:26:306static_library("gcm_driver") {
7 sources = [
8 "android/component_jni_registrar.cc",
9 "android/component_jni_registrar.h",
10 "default_gcm_app_handler.cc",
11 "default_gcm_app_handler.h",
12 "gcm_activity.cc",
13 "gcm_activity.h",
14 "gcm_app_handler.cc",
15 "gcm_app_handler.h",
jianli1235e51c2014-09-08 18:56:4116 "gcm_backoff_policy.cc",
17 "gcm_backoff_policy.h",
18 "gcm_channel_status_request.cc",
19 "gcm_channel_status_request.h",
[email protected]abd4b682014-07-16 20:26:3020 "gcm_client.cc",
21 "gcm_client.h",
22 "gcm_client_factory.cc",
23 "gcm_client_factory.h",
24 "gcm_client_impl.cc",
25 "gcm_client_impl.h",
Brett Wilson83fd4242014-09-02 19:45:3326 "gcm_connection_observer.cc",
27 "gcm_connection_observer.h",
fgorski05d507c2014-09-10 17:28:1028 "gcm_delayed_task_controller.cc",
29 "gcm_delayed_task_controller.h",
[email protected]abd4b682014-07-16 20:26:3030 "gcm_driver.cc",
31 "gcm_driver.h",
32 "gcm_driver_android.cc",
33 "gcm_driver_android.h",
34 "gcm_driver_desktop.cc",
35 "gcm_driver_desktop.h",
36 "gcm_stats_recorder_impl.cc",
37 "gcm_stats_recorder_impl.h",
38 "system_encryptor.cc",
39 "system_encryptor.h",
40 ]
41
42 deps = [
43 "//base",
jianli1235e51c2014-09-08 18:56:4144 "//components/gcm_driver/proto",
[email protected]abd4b682014-07-16 20:26:3045 "//components/os_crypt",
46 "//google_apis/gcm",
47 "//net",
48 ]
49
50 if (is_android) {
51 sources -= [
jianli1235e51c2014-09-08 18:56:4152 "gcm_channel_status_request.cc",
53 "gcm_channel_status_request.h",
[email protected]abd4b682014-07-16 20:26:3054 "gcm_client_factory.cc",
55 "gcm_client_factory.h",
56 "gcm_client_impl.cc",
57 "gcm_client_impl.h",
fgorski05d507c2014-09-10 17:28:1058 "gcm_delayed_task_controller.cc",
59 "gcm_delayed_task_controller.h",
[email protected]abd4b682014-07-16 20:26:3060 "gcm_driver_desktop.cc",
61 "gcm_driver_desktop.h",
62 "gcm_stats_recorder_impl.cc",
63 "gcm_stats_recorder_impl.h",
64 ]
jianli1235e51c2014-09-08 18:56:4165 deps -= [
66 "//components/gcm_driver/proto",
67 "//google_apis/gcm",
68 ]
[email protected]abd4b682014-07-16 20:26:3069 deps += [ ":jni_headers" ]
70 }
71}
72
73static_library("test_support") {
Brett Wilson0c8745a2014-09-08 22:59:4974 testonly = true
[email protected]abd4b682014-07-16 20:26:3075 sources = [
76 "fake_gcm_app_handler.cc",
77 "fake_gcm_app_handler.h",
78 "fake_gcm_client.cc",
79 "fake_gcm_client.h",
80 "fake_gcm_client_factory.cc",
81 "fake_gcm_client_factory.h",
82 "fake_gcm_driver.cc",
83 "fake_gcm_driver.h",
84 ]
85
86 deps = [
87 ":gcm_driver",
88 "//base",
89 "//google_apis/gcm",
90 "//testing/gtest",
91 ]
92
93 if (is_android) {
94 sources -= [
95 "fake_gcm_client.cc",
96 "fake_gcm_client.h",
97 "fake_gcm_client_factory.cc",
98 "fake_gcm_client_factory.h",
99 ]
100 deps -= [ "//google_apis/gcm" ]
101 }
102}
103
James Robinson2ed4d692014-09-17 05:20:58104if (is_android) {
105 import("//build/config/android/rules.gni")
106
107 # GYP version: components/gcm_driver.gypi:gcm_driver_jni_headers
108 generate_jni("jni_headers") {
109 sources = [
110 "android/java/src/org/chromium/components/gcm_driver/GCMDriver.java",
111 ]
112 jni_package = "components/gcm_driver"
113 }
114}