fixup! [M120 Migration] Notify media device state to webbrowser
[platform/framework/web/chromium-efl.git] / components / background_task_scheduler / BUILD.gn
1 # Copyright 2017 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 if (is_android) {
6   import("//build/config/android/config.gni")
7   import("//build/config/android/rules.gni")
8 }
9
10 if (is_android) {
11   java_group("background_task_scheduler_java") {
12     deps = [
13       "//components/background_task_scheduler:factory_java",
14       "//components/background_task_scheduler:public_java",
15       "//components/background_task_scheduler/internal:native_task_java",
16     ]
17   }
18 }
19
20 group("background_task_scheduler") {
21   public_deps = [
22     ":factory",
23     ":public",
24   ]
25 }
26
27 static_library("public") {
28   sources = [
29     "background_task.h",
30     "background_task_scheduler.h",
31     "task_ids.h",
32     "task_info.cc",
33     "task_info.h",
34     "task_parameters.cc",
35     "task_parameters.h",
36   ]
37
38   public_deps = [
39     "//base",
40     "//components/keyed_service/core",
41   ]
42 }
43
44 static_library("factory") {
45   sources = [
46     "background_task_scheduler_factory.cc",
47     "background_task_scheduler_factory.h",
48   ]
49
50   deps = [ ":public" ]
51
52   if (is_android) {
53     deps += [ "internal:native_task" ]
54   }
55 }
56
57 if (is_android) {
58   # This is shared between WebView and Chrome. We do not want to add GCM
59   # related permissions for WebView while still wanting to avoid collision
60   # between WebView and Chrome.
61   android_library("background_task_scheduler_task_ids_java") {
62     srcjar_deps = [ ":jni_enums" ]
63     deps = [ "//third_party/androidx:androidx_annotation_annotation_java" ]
64   }
65
66   java_cpp_enum("jni_enums") {
67     visibility = [ "*" ]
68
69     sources = [ "task_ids.h" ]
70   }
71
72   android_library("public_java") {
73     sources = [
74       "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTask.java",
75       "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskFactory.java",
76       "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskScheduler.java",
77       "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerExternalUma.java",
78       "android/java/src/org/chromium/components/background_task_scheduler/NativeBackgroundTask.java",
79       "android/java/src/org/chromium/components/background_task_scheduler/NativeBackgroundTaskDelegate.java",
80       "android/java/src/org/chromium/components/background_task_scheduler/TaskInfo.java",
81       "android/java/src/org/chromium/components/background_task_scheduler/TaskParameters.java",
82     ]
83
84     deps = [
85       ":background_task_scheduler_task_ids_java",
86       "//base:base_java",
87       "//content/public/android:content_main_dex_java",
88       "//third_party/androidx:androidx_annotation_annotation_java",
89     ]
90   }
91
92   android_library("factory_java") {
93     sources = [ "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerFactory.java" ]
94
95     deps = [
96       ":public_java",
97       "internal:internal_java",
98       "//base:base_java",
99       "//third_party/androidx:androidx_annotation_annotation_java",
100     ]
101   }
102
103   robolectric_library("components_background_task_scheduler_junit_tests") {
104     include_android_sdk = false
105     sources = [
106       "internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BackgroundTaskSchedulerImplWithMockTest.java",
107       "internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BackgroundTaskSchedulerJobServiceTest.java",
108       "internal/android/java/src/org/chromium/components/background_task_scheduler/internal/MockBackgroundTaskSchedulerDelegate.java",
109       "internal/android/junit/src/org/chromium/components/background_task_scheduler/internal/BackgroundTaskJobServiceTest.java",
110       "internal/android/junit/src/org/chromium/components/background_task_scheduler/internal/BackgroundTaskSchedulerImplTest.java",
111       "internal/android/junit/src/org/chromium/components/background_task_scheduler/internal/BackgroundTaskSchedulerUmaTest.java",
112       "internal/android/junit/src/org/chromium/components/background_task_scheduler/internal/TaskInfoTest.java",
113       "internal/android/junit/src/org/chromium/components/background_task_scheduler/internal/TestBackgroundTask.java",
114       "internal/android/junit/src/org/chromium/components/background_task_scheduler/internal/TestBackgroundTaskFactory.java",
115     ]
116
117     deps = [
118       ":background_task_scheduler_task_ids_java",
119       "internal:internal_java",
120       "//base:base_java",
121       "//base:base_java_test_support",
122       "//base:base_junit_test_support",
123       "//components/background_task_scheduler:public_java",
124       "//content/public/test/android:content_java_test_support",
125       "//third_party/android_deps:chromium_play_services_availability_shadows_java",
126       "//third_party/androidx:androidx_annotation_annotation_java",
127       "//third_party/junit",
128       "//third_party/mockito:mockito_java",
129     ]
130   }
131 }