blob: 9e4f3d7e1747e48185920089b2249fc85af423bc [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",
jianli2dc910b02014-09-19 02:42:4620 "gcm_channel_status_syncer.cc",
21 "gcm_channel_status_syncer.h",
[email protected]abd4b682014-07-16 20:26:3022 "gcm_client.cc",
23 "gcm_client.h",
24 "gcm_client_factory.cc",
25 "gcm_client_factory.h",
26 "gcm_client_impl.cc",
27 "gcm_client_impl.h",
Brett Wilson83fd4242014-09-02 19:45:3328 "gcm_connection_observer.cc",
29 "gcm_connection_observer.h",
fgorski05d507c2014-09-10 17:28:1030 "gcm_delayed_task_controller.cc",
31 "gcm_delayed_task_controller.h",
[email protected]abd4b682014-07-16 20:26:3032 "gcm_driver.cc",
33 "gcm_driver.h",
34 "gcm_driver_android.cc",
35 "gcm_driver_android.h",
36 "gcm_driver_desktop.cc",
37 "gcm_driver_desktop.h",
38 "gcm_stats_recorder_impl.cc",
39 "gcm_stats_recorder_impl.h",
40 "system_encryptor.cc",
41 "system_encryptor.h",
42 ]
43
44 deps = [
45 "//base",
jianli1235e51c2014-09-08 18:56:4146 "//components/gcm_driver/proto",
[email protected]abd4b682014-07-16 20:26:3047 "//components/os_crypt",
48 "//google_apis/gcm",
49 "//net",
50 ]
51
52 if (is_android) {
53 sources -= [
jianli1235e51c2014-09-08 18:56:4154 "gcm_channel_status_request.cc",
55 "gcm_channel_status_request.h",
jianli2dc910b02014-09-19 02:42:4656 "gcm_channel_status_syncer.cc",
57 "gcm_channel_status_syncer.h",
[email protected]abd4b682014-07-16 20:26:3058 "gcm_client_factory.cc",
59 "gcm_client_factory.h",
60 "gcm_client_impl.cc",
61 "gcm_client_impl.h",
fgorski05d507c2014-09-10 17:28:1062 "gcm_delayed_task_controller.cc",
63 "gcm_delayed_task_controller.h",
[email protected]abd4b682014-07-16 20:26:3064 "gcm_driver_desktop.cc",
65 "gcm_driver_desktop.h",
66 "gcm_stats_recorder_impl.cc",
67 "gcm_stats_recorder_impl.h",
68 ]
jianli1235e51c2014-09-08 18:56:4169 deps -= [
70 "//components/gcm_driver/proto",
71 "//google_apis/gcm",
72 ]
[email protected]abd4b682014-07-16 20:26:3073 deps += [ ":jni_headers" ]
74 }
75}
76
77static_library("test_support") {
Brett Wilson0c8745a2014-09-08 22:59:4978 testonly = true
[email protected]abd4b682014-07-16 20:26:3079 sources = [
80 "fake_gcm_app_handler.cc",
81 "fake_gcm_app_handler.h",
82 "fake_gcm_client.cc",
83 "fake_gcm_client.h",
84 "fake_gcm_client_factory.cc",
85 "fake_gcm_client_factory.h",
86 "fake_gcm_driver.cc",
87 "fake_gcm_driver.h",
88 ]
89
90 deps = [
91 ":gcm_driver",
92 "//base",
93 "//google_apis/gcm",
94 "//testing/gtest",
95 ]
96
97 if (is_android) {
98 sources -= [
99 "fake_gcm_client.cc",
100 "fake_gcm_client.h",
101 "fake_gcm_client_factory.cc",
102 "fake_gcm_client_factory.h",
103 ]
104 deps -= [ "//google_apis/gcm" ]
105 }
106}
107
James Robinson2ed4d692014-09-17 05:20:58108if (is_android) {
109 import("//build/config/android/rules.gni")
110
111 # GYP version: components/gcm_driver.gypi:gcm_driver_jni_headers
112 generate_jni("jni_headers") {
113 sources = [
114 "android/java/src/org/chromium/components/gcm_driver/GCMDriver.java",
115 ]
116 jni_package = "components/gcm_driver"
117 }
118}