| 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 = [ |
| 24 "public/ChromeWebView.h", |
| 26 "public/cwv.h", | 25 "public/cwv.h", |
| 27 "public/cwv_delegate.h", | 26 "public/cwv_delegate.h", |
| 28 "public/cwv_export.h", | 27 "public/cwv_export.h", |
| 29 "public/cwv_html_element.h", | 28 "public/cwv_html_element.h", |
| 30 "public/cwv_navigation_action.h", | 29 "public/cwv_navigation_action.h", |
| 31 "public/cwv_navigation_delegate.h", | 30 "public/cwv_navigation_delegate.h", |
| 32 "public/cwv_translate_delegate.h", | 31 "public/cwv_translate_delegate.h", |
| 33 "public/cwv_translate_manager.h", | 32 "public/cwv_translate_manager.h", |
| 34 "public/cwv_ui_delegate.h", | 33 "public/cwv_ui_delegate.h", |
| 35 "public/cwv_user_content_controller.h", | 34 "public/cwv_user_content_controller.h", |
| 36 "public/cwv_user_script.h", | 35 "public/cwv_user_script.h", |
| 37 "public/cwv_web_view.h", | 36 "public/cwv_web_view.h", |
| 38 "public/cwv_web_view_configuration.h", | 37 "public/cwv_web_view_configuration.h", |
| 39 ] | 38 ] |
| 40 | 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 |
| 41 deps = [ | 86 deps = [ |
| 42 ":packed_resources", | 87 ":packed_resources", |
| 43 "//base", | 88 "//base", |
| 44 "//components/infobars/core", | 89 "//components/infobars/core", |
| 90 "//components/infobars/core", |
| 45 "//components/keyed_service/core", | 91 "//components/keyed_service/core", |
| 46 "//components/keyed_service/ios", | 92 "//components/keyed_service/ios", |
| 47 "//components/pref_registry", | 93 "//components/pref_registry", |
| 48 "//components/prefs", | 94 "//components/prefs", |
| 49 "//components/translate/core/browser", | 95 "//components/translate/core/browser", |
| 50 "//components/translate/core/common", | 96 "//components/translate/core/common", |
| 51 "//components/translate/ios/browser", | 97 "//components/translate/ios/browser", |
| 52 "//ios/net", | 98 "//ios/net", |
| 99 "//ios/net", |
| 53 "//ios/web", | 100 "//ios/web", |
| 101 "//ios/web:reload_type", |
| 102 "//ios/web:user_agent", |
| 54 "//ios/web:user_agent", | 103 "//ios/web:user_agent", |
| 55 "//ios/web/public/app", | 104 "//ios/web/public/app", |
| 56 "//ios/web_view/internal", | |
| 57 "//net", | 105 "//net", |
| 58 "//net:extras", | 106 "//net:extras", |
| 59 "//ui/base", | 107 "//ui/base", |
| 60 "//url", | 108 "//url", |
| 109 "//url", |
| 61 ] | 110 ] |
| 62 | 111 |
| 63 public_deps = [ | 112 configs += [ |
| 64 "//ios/web_view/public", | 113 "//build/config/compiler:enable_arc", |
| 114 ":config", |
| 65 ] | 115 ] |
| 66 | |
| 67 libs = [ "UIKit.framework" ] | |
| 68 | |
| 69 public_configs = [ ":config" ] | |
| 70 | |
| 71 configs += [ "//build/config/compiler:enable_arc" ] | |
| 72 } | 116 } |
| 73 | 117 |
| 74 repack("repack_resources") { | 118 repack("repack_resources") { |
| 75 visibility = [ ":packed_resources" ] | 119 visibility = [ ":packed_resources" ] |
| 76 deps = [ | 120 deps = [ |
| 77 "//components/resources:components_resources", | 121 "//components/resources:components_resources", |
| 78 "//ios/web:resources", | 122 "//ios/web:resources", |
| 79 ] | 123 ] |
| 80 sources = [ | 124 sources = [ |
| 81 "$root_gen_dir/components/components_resources.pak", | 125 "$root_gen_dir/components/components_resources.pak", |
| 82 "$root_gen_dir/ios/web/ios_web_resources.pak", | 126 "$root_gen_dir/ios/web/ios_web_resources.pak", |
| 83 ] | 127 ] |
| 84 output = "$target_gen_dir/web_view_resources.pak" | 128 output = "$target_gen_dir/web_view_resources.pak" |
| 85 } | 129 } |
| 86 | 130 |
| 87 bundle_data("packed_resources") { | 131 bundle_data("packed_resources") { |
| 88 visibility = [ "//ios/web_view:*" ] | 132 visibility = [ "//ios/web_view:*" ] |
| 89 public_deps = [ | 133 public_deps = [ |
| 90 ":repack_resources", | 134 ":repack_resources", |
| 91 ] | 135 ] |
| 92 sources = [ | 136 sources = [ |
| 93 "$target_gen_dir/web_view_resources.pak", | 137 "$target_gen_dir/web_view_resources.pak", |
| 94 ] | 138 ] |
| 95 outputs = [ | 139 outputs = [ |
| 96 "{{bundle_resources_dir}}/{{source_file_part}}", | 140 "{{bundle_resources_dir}}/{{source_file_part}}", |
| 97 ] | 141 ] |
| 98 } | 142 } |
| OLD | NEW |