OLD | NEW |
---|---|
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 # Public target that should be used to depend on web_view. Only give access | 5 import("//build/config/ios/ios_sdk.gni") |
6 # to the web_view public headers while still linking with the implementation. | 6 import("//build/config/ios/rules.gni") |
7 group("web_view") { | 7 import("//tools/grit/repack.gni") |
8 | |
9 config("config") { | |
10 include_dirs = [ | |
11 "//ios/web_view/internal", | |
12 "//ios/web_view/public", | |
13 ] | |
14 } | |
15 | |
16 ios_framework_bundle("web_view") { | |
17 output_name = "ChromeWebView" | |
18 info_plist = "Info.plist" | |
19 | |
20 sources = [ | |
21 "public/cwv.h", | |
22 ] | |
23 | |
24 public_headers = [ | |
25 "public/criwv_translate_manager.h", | |
26 "public/cwv.h", | |
27 "public/cwv_delegate.h", | |
28 "public/cwv_html_element.h", | |
29 "public/cwv_navigation_delegate.h", | |
30 "public/cwv_translate_delegate.h", | |
31 "public/cwv_ui_delegate.h", | |
32 "public/cwv_web_view.h", | |
33 "public/cwv_web_view_configuration.h", | |
34 "public/cwv_website_data_store.h", | |
35 ] | |
36 | |
37 deps = [ | |
38 ":packed_resources", | |
39 "//base", | |
40 "//components/infobars/core", | |
41 "//components/keyed_service/core", | |
42 "//components/keyed_service/ios", | |
43 "//components/pref_registry", | |
44 "//components/prefs", | |
45 "//components/translate/core/browser", | |
46 "//components/translate/core/common", | |
47 "//components/translate/ios/browser", | |
48 "//ios/net", | |
49 "//ios/web", | |
50 "//ios/web:user_agent", | |
51 "//ios/web/public/app", | |
52 "//ios/web_view/internal", | |
53 "//net", | |
54 "//net:extras", | |
55 "//ui/base", | |
56 "//url", | |
57 ] | |
58 | |
8 public_deps = [ | 59 public_deps = [ |
9 "//ios/web_view/public", | 60 "//ios/web_view/public", |
10 ] | 61 ] |
11 deps = [ | 62 |
12 "//ios/web_view/internal", | 63 libs = [ "UIKit.framework" ] |
64 | |
65 public_configs = [ ":config" ] | |
66 | |
67 configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] | |
sdefresne
2017/03/13 10:32:24
Why do you need to use configs to change the visib
michaeldo
2017/03/13 17:27:00
It does work and I can remove this. I copied this
| |
68 configs += [ | |
69 "//build/config/compiler:enable_arc", | |
70 "//build/config/gcc:symbol_visibility_default", | |
13 ] | 71 ] |
14 } | 72 } |
73 | |
74 repack("repack_resources") { | |
75 visibility = [ ":packed_resources" ] | |
76 deps = [ | |
77 "//components/resources:components_resources", | |
sdefresne
2017/03/13 10:32:23
Don't you also want to include //ios/web:resources
michaeldo
2017/03/13 17:27:00
yes, you are right, I added it. Thank you for like
| |
78 ] | |
79 sources = [ | |
80 "$root_gen_dir/components/components_resources.pak", | |
81 ] | |
82 output = "$target_gen_dir/web_view_resources.pak" | |
83 } | |
84 | |
85 bundle_data("packed_resources") { | |
86 visibility = [ "//ios/web_view:*" ] | |
87 public_deps = [ | |
88 ":repack_resources", | |
89 ] | |
90 sources = [ | |
91 "$target_gen_dir/web_view_resources.pak", | |
92 ] | |
93 outputs = [ | |
94 "{{bundle_resources_dir}}/{{source_file_part}}", | |
95 ] | |
96 } | |
OLD | NEW |