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

Side by Side Diff: blimp/client/core/BUILD.gn

Issue 2132163002: Add BlimpClientContext and factory with real and dummy implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-blimp-client-core-public-to-blimp-client
Patch Set: git merge origin/master before CQ for good measure Created 4 years, 5 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
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 if (is_android) { 5 if (is_android) {
6 import("//build/config/android/config.gni") 6 import("//build/config/android/config.gni")
7 import("//build/config/android/rules.gni") 7 import("//build/config/android/rules.gni")
8 } 8 }
9 9
10 declare_args() {
11 # Enables blimp. This is required to get the real implementation of blimp.
12 # By default, only a dummy-implementation is provided.
13 enable_blimp = false
14 }
15
16 # This target is here to let //chrome depend on //blimp/client/public
17 # and automatically get the correct implementation of //blimp/client/core
18 # depending on whether enable_blimp is set or not.
19 group("core_shim") {
20 visibility = [ "//blimp/client/public" ]
21
22 if (enable_blimp) {
23 deps = [
24 ":core",
25 ]
26 } else {
27 deps = [
28 ":dummy_core",
29 ]
30 }
31 }
32
10 source_set("core") { 33 source_set("core") {
11 visibility = [ "//blimp/*" ] 34 visibility = [ "//blimp/client/*" ]
12 35
13 sources = [ 36 sources = [
37 "blimp_client_context_impl.cc",
38 "blimp_client_context_impl.h",
14 "blimp_contents_impl.cc", 39 "blimp_contents_impl.cc",
15 "blimp_contents_impl.h", 40 "blimp_contents_impl.h",
16 "blimp_navigation_controller_delegate.h", 41 "blimp_navigation_controller_delegate.h",
17 "blimp_navigation_controller_impl.cc", 42 "blimp_navigation_controller_impl.cc",
18 "blimp_navigation_controller_impl.h", 43 "blimp_navigation_controller_impl.h",
19 ] 44 ]
20 45
21 deps = [ 46 deps = [
22 "//base", 47 "//base",
23 "//blimp/client/public", 48 "//blimp/client/public:public_headers",
24 "//url", 49 "//url",
25 ] 50 ]
26 51
27 if (is_android) { 52 if (is_android) {
28 sources += [ 53 sources += [
54 "android/blimp_client_context_impl_android.cc",
55 "android/blimp_client_context_impl_android.h",
29 "android/blimp_contents_factory.cc", 56 "android/blimp_contents_factory.cc",
30 "android/blimp_contents_factory.h", 57 "android/blimp_contents_factory.h",
31 "android/blimp_contents_impl_android.cc", 58 "android/blimp_contents_impl_android.cc",
32 "android/blimp_contents_impl_android.h", 59 "android/blimp_contents_impl_android.h",
33 "android/blimp_contents_observer_proxy.cc", 60 "android/blimp_contents_observer_proxy.cc",
34 "android/blimp_contents_observer_proxy.h", 61 "android/blimp_contents_observer_proxy.h",
62 "android/blimp_jni_registrar.cc",
35 "android/blimp_navigation_controller_impl_android.cc", 63 "android/blimp_navigation_controller_impl_android.cc",
36 "android/blimp_navigation_controller_impl_android.h", 64 "android/blimp_navigation_controller_impl_android.h",
37 ] 65 ]
38 66
39 deps += [ "//blimp/client/core:core_jni_headers" ] 67 deps += [ ":core_jni_headers" ]
40 } 68 }
41 } 69 }
42 70
71 source_set("dummy_core") {
72 visibility = [ ":*" ]
73
74 sources = [
75 "dummy_blimp_client_context.cc",
76 "dummy_blimp_client_context.h",
77 ]
78
79 deps = [
80 "//base",
81 "//blimp/client/public:public_headers",
82 "//url",
83 ]
84
85 if (is_android) {
86 sources += [
87 "android/dummy_blimp_client_context_android.cc",
88 "android/dummy_blimp_client_context_android.h",
89 "android/dummy_blimp_jni_registrar.cc",
90 ]
91
92 deps += [ ":dummy_core_jni_headers" ]
93 }
94 }
95
43 source_set("unit_tests") { 96 source_set("unit_tests") {
44 testonly = true 97 testonly = true
45 98
46 sources = [ 99 sources = [
100 "blimp_client_context_impl_unittest.cc",
47 "blimp_contents_impl_unittest.cc", 101 "blimp_contents_impl_unittest.cc",
48 "blimp_navigation_controller_impl_unittest.cc", 102 "blimp_navigation_controller_impl_unittest.cc",
49 ] 103 ]
50 104
51 deps = [ 105 deps = [
106 ":core",
52 "//base", 107 "//base",
53 "//blimp/client/core", 108 "//blimp/client/public:public_headers",
54 "//blimp/client/public", 109 "//blimp/client/test",
55 "//testing/gtest", 110 "//testing/gtest",
56 "//url", 111 "//url",
57 ] 112 ]
58 } 113 }
59 114
60 if (is_android) { 115 if (is_android) {
116 # This target is here to let //chrome depend on
117 # //blimp/client/public:public_java and automatically get the correct
118 # implementation of //blimp/client/core depending on whether enable_blimp is
119 # set or not.
120 java_group("core_shim_java") {
121 visibility = [ "//blimp/client/public/*" ]
122
123 if (enable_blimp) {
124 deps = [
125 ":core_java",
126 ]
127 } else {
128 deps = [
129 ":dummy_core_java",
130 ]
131 }
132 }
133
61 android_library("core_java") { 134 android_library("core_java") {
62 visibility = [ "//blimp/*" ] 135 visibility = [ "//blimp/client/*" ]
63 136
64 java_files = [ 137 java_files = [
138 "android/java/src/org/chromium/blimp/core/BlimpClientContextImpl.java",
65 "android/java/src/org/chromium/blimp/core/BlimpContentsFactory.java", 139 "android/java/src/org/chromium/blimp/core/BlimpContentsFactory.java",
66 "android/java/src/org/chromium/blimp/core/BlimpContentsImpl.java", 140 "android/java/src/org/chromium/blimp/core/BlimpContentsImpl.java",
67 "android/java/src/org/chromium/blimp/core/BlimpContentsObserverProxy.java" , 141 "android/java/src/org/chromium/blimp/core/BlimpContentsObserverProxy.java" ,
68 "android/java/src/org/chromium/blimp/core/BlimpNavigationControllerImpl.ja va", 142 "android/java/src/org/chromium/blimp/core/BlimpNavigationControllerImpl.ja va",
69 ] 143 ]
70 144
71 deps = [ 145 deps = [
72 "//base:base_java", 146 "//base:base_java",
73 "//blimp/client/public:public_java", 147 "//blimp/client/public:public_headers_java",
148 ]
149 }
150
151 android_library("dummy_core_java") {
152 visibility = [ ":*" ]
153
154 java_files = [ "android/java/src/org/chromium/blimp/core/DummyBlimpClientCon text.java" ]
155
156 deps = [
157 "//base:base_java",
158 "//blimp/client/public:public_headers_java",
74 ] 159 ]
75 } 160 }
76 161
77 generate_jni("core_jni_headers") { 162 generate_jni("core_jni_headers") {
163 visibility = [ ":*" ]
164
78 sources = [ 165 sources = [
166 "android/java/src/org/chromium/blimp/core/BlimpClientContextImpl.java",
79 "android/java/src/org/chromium/blimp/core/BlimpContentsFactory.java", 167 "android/java/src/org/chromium/blimp/core/BlimpContentsFactory.java",
80 "android/java/src/org/chromium/blimp/core/BlimpContentsImpl.java", 168 "android/java/src/org/chromium/blimp/core/BlimpContentsImpl.java",
81 "android/java/src/org/chromium/blimp/core/BlimpContentsObserverProxy.java" , 169 "android/java/src/org/chromium/blimp/core/BlimpContentsObserverProxy.java" ,
82 "android/java/src/org/chromium/blimp/core/BlimpNavigationControllerImpl.ja va", 170 "android/java/src/org/chromium/blimp/core/BlimpNavigationControllerImpl.ja va",
83 ] 171 ]
84 172
85 jni_package = "blimp" 173 jni_package = "blimp/client/core"
174 }
175
176 generate_jni("dummy_core_jni_headers") {
177 visibility = [ ":*" ]
178
179 sources = [
180 "android/java/src/org/chromium/blimp/core/DummyBlimpClientContext.java",
181 ]
182
183 jni_package = "blimp/client/core"
86 } 184 }
87 } 185 }
OLDNEW
« no previous file with comments | « blimp/client/app/android/blimp_library_loader.cc ('k') | blimp/client/core/android/blimp_client_context_impl_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698