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 import("//build/config/ios/ios_sdk.gni") | 5 import("//build/config/ios/ios_sdk.gni") |
6 import("//build/config/ios/rules.gni") | 6 import("//build/config/ios/rules.gni") |
7 import("//tools/grit/repack.gni") | 7 import("//tools/grit/repack.gni") |
8 | 8 |
9 config("config") { | 9 config("config") { |
10 include_dirs = [ | 10 defines = [ "CWV_IMPLEMENTATION" ] |
11 "internal", | 11 libs = [ |
12 "public", | 12 "CoreGraphics.framework", |
| 13 "Foundation.framework", |
| 14 "MobileCoreServices.framework", |
| 15 "UIKit.framework", |
13 ] | 16 ] |
14 } | 17 } |
15 | 18 |
16 ios_framework_bundle("web_view") { | 19 ios_framework_bundle("web_view") { |
17 output_name = "ChromeWebView" | 20 output_name = "ChromeWebView" |
18 info_plist = "Info.plist" | 21 info_plist = "Info.plist" |
19 | 22 |
20 sources = [ | |
21 "public/cwv.h", | |
22 "public/cwv_export.h", | |
23 ] | |
24 | |
25 public_headers = [ | 23 public_headers = [ |
26 "public/ChromeWebView.h", | 24 "public/ChromeWebView.h", |
27 "public/cwv.h", | 25 "public/cwv.h", |
28 "public/cwv_delegate.h", | 26 "public/cwv_delegate.h", |
29 "public/cwv_export.h", | 27 "public/cwv_export.h", |
30 "public/cwv_html_element.h", | 28 "public/cwv_html_element.h", |
31 "public/cwv_navigation_action.h", | 29 "public/cwv_navigation_action.h", |
32 "public/cwv_navigation_delegate.h", | 30 "public/cwv_navigation_delegate.h", |
33 "public/cwv_translate_delegate.h", | 31 "public/cwv_translate_delegate.h", |
34 "public/cwv_translate_manager.h", | 32 "public/cwv_translate_manager.h", |
35 "public/cwv_ui_delegate.h", | 33 "public/cwv_ui_delegate.h", |
36 "public/cwv_user_content_controller.h", | 34 "public/cwv_user_content_controller.h", |
37 "public/cwv_user_script.h", | 35 "public/cwv_user_script.h", |
38 "public/cwv_web_view.h", | 36 "public/cwv_web_view.h", |
39 "public/cwv_web_view_configuration.h", | 37 "public/cwv_web_view_configuration.h", |
40 ] | 38 ] |
41 | 39 |
| 40 public = [ |
| 41 "public/ChromeWebView.h", |
| 42 ] |
| 43 |
| 44 sources = [ |
| 45 "internal/cwv.mm", |
| 46 "internal/cwv_html_element.mm", |
| 47 "internal/cwv_html_element_internal.h", |
| 48 "internal/cwv_navigation_action.mm", |
| 49 "internal/cwv_navigation_action_internal.h", |
| 50 "internal/cwv_user_content_controller.mm", |
| 51 "internal/cwv_user_content_controller_internal.h", |
| 52 "internal/cwv_user_script.mm", |
| 53 "internal/cwv_web_view.mm", |
| 54 "internal/cwv_web_view_configuration.mm", |
| 55 "internal/cwv_web_view_configuration_internal.h", |
| 56 "internal/pref_names.cc", |
| 57 "internal/pref_names.h", |
| 58 "internal/translate/cwv_translate_manager_impl.h", |
| 59 "internal/translate/cwv_translate_manager_impl.mm", |
| 60 "internal/translate/web_view_translate_accept_languages_factory.cc", |
| 61 "internal/translate/web_view_translate_accept_languages_factory.h", |
| 62 "internal/translate/web_view_translate_client.h", |
| 63 "internal/translate/web_view_translate_client.mm", |
| 64 "internal/web_view_browser_state.h", |
| 65 "internal/web_view_browser_state.mm", |
| 66 "internal/web_view_early_page_script_provider.h", |
| 67 "internal/web_view_early_page_script_provider.mm", |
| 68 "internal/web_view_java_script_dialog_presenter.h", |
| 69 "internal/web_view_java_script_dialog_presenter.mm", |
| 70 "internal/web_view_network_delegate.cc", |
| 71 "internal/web_view_network_delegate.h", |
| 72 "internal/web_view_url_request_context_getter.h", |
| 73 "internal/web_view_url_request_context_getter.mm", |
| 74 "internal/web_view_web_client.h", |
| 75 "internal/web_view_web_client.mm", |
| 76 "internal/web_view_web_main_delegate.h", |
| 77 "internal/web_view_web_main_delegate.mm", |
| 78 "internal/web_view_web_main_parts.h", |
| 79 "internal/web_view_web_main_parts.mm", |
| 80 "internal/web_view_web_state_policy_decider.h", |
| 81 "internal/web_view_web_state_policy_decider.mm", |
| 82 ] |
| 83 |
| 84 sources += public_headers |
| 85 |
42 deps = [ | 86 deps = [ |
43 ":packed_resources", | 87 ":packed_resources", |
44 "//base", | 88 "//base", |
45 "//components/infobars/core", | 89 "//components/infobars/core", |
| 90 "//components/infobars/core", |
46 "//components/keyed_service/core", | 91 "//components/keyed_service/core", |
47 "//components/keyed_service/ios", | 92 "//components/keyed_service/ios", |
48 "//components/pref_registry", | 93 "//components/pref_registry", |
49 "//components/prefs", | 94 "//components/prefs", |
50 "//components/translate/core/browser", | 95 "//components/translate/core/browser", |
51 "//components/translate/core/common", | 96 "//components/translate/core/common", |
52 "//components/translate/ios/browser", | 97 "//components/translate/ios/browser", |
53 "//ios/net", | 98 "//ios/net", |
| 99 "//ios/net", |
54 "//ios/web", | 100 "//ios/web", |
| 101 "//ios/web:reload_type", |
| 102 "//ios/web:user_agent", |
55 "//ios/web:user_agent", | 103 "//ios/web:user_agent", |
56 "//ios/web/public/app", | 104 "//ios/web/public/app", |
57 "//ios/web_view/internal", | |
58 "//net", | 105 "//net", |
59 "//net:extras", | 106 "//net:extras", |
60 "//ui/base", | 107 "//ui/base", |
61 "//url", | 108 "//url", |
| 109 "//url", |
62 ] | 110 ] |
63 | 111 |
64 public_deps = [ | 112 configs += [ |
65 "//ios/web_view/public", | 113 "//build/config/compiler:enable_arc", |
| 114 ":config", |
66 ] | 115 ] |
67 | |
68 libs = [ "UIKit.framework" ] | |
69 | |
70 public_configs = [ ":config" ] | |
71 | |
72 configs += [ "//build/config/compiler:enable_arc" ] | |
73 } | 116 } |
74 | 117 |
75 repack("repack_resources") { | 118 repack("repack_resources") { |
76 visibility = [ ":packed_resources" ] | 119 visibility = [ ":packed_resources" ] |
77 deps = [ | 120 deps = [ |
78 "//components/resources:components_resources", | 121 "//components/resources:components_resources", |
79 "//ios/web:resources", | 122 "//ios/web:resources", |
80 ] | 123 ] |
81 sources = [ | 124 sources = [ |
82 "$root_gen_dir/components/components_resources.pak", | 125 "$root_gen_dir/components/components_resources.pak", |
83 "$root_gen_dir/ios/web/ios_web_resources.pak", | 126 "$root_gen_dir/ios/web/ios_web_resources.pak", |
84 ] | 127 ] |
85 output = "$target_gen_dir/web_view_resources.pak" | 128 output = "$target_gen_dir/web_view_resources.pak" |
86 } | 129 } |
87 | 130 |
88 bundle_data("packed_resources") { | 131 bundle_data("packed_resources") { |
89 visibility = [ "//ios/web_view:*" ] | 132 visibility = [ "//ios/web_view:*" ] |
90 public_deps = [ | 133 public_deps = [ |
91 ":repack_resources", | 134 ":repack_resources", |
92 ] | 135 ] |
93 sources = [ | 136 sources = [ |
94 "$target_gen_dir/web_view_resources.pak", | 137 "$target_gen_dir/web_view_resources.pak", |
95 ] | 138 ] |
96 outputs = [ | 139 outputs = [ |
97 "{{bundle_resources_dir}}/{{source_file_part}}", | 140 "{{bundle_resources_dir}}/{{source_file_part}}", |
98 ] | 141 ] |
99 } | 142 } |
OLD | NEW |