naiveproxy/ios/chrome/browser/passwords/BUILD.gn
2018-01-29 00:30:36 +08:00

217 lines
6.6 KiB
Plaintext

# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//ios/web/js_compile.gni")
source_set("passwords") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"credential_manager.h",
"credential_manager.mm",
"credential_manager_features.cc",
"credential_manager_features.h",
"credential_manager_util.h",
"credential_manager_util.mm",
"ios_chrome_password_manager_client.h",
"ios_chrome_password_manager_client.mm",
"ios_chrome_password_manager_driver.h",
"ios_chrome_password_manager_driver.mm",
"ios_chrome_password_manager_infobar_delegate.h",
"ios_chrome_password_manager_infobar_delegate.mm",
"ios_chrome_password_store_factory.cc",
"ios_chrome_password_store_factory.h",
"ios_chrome_save_password_infobar_delegate.h",
"ios_chrome_save_password_infobar_delegate.mm",
"ios_chrome_update_password_infobar_delegate.h",
"ios_chrome_update_password_infobar_delegate.mm",
"js_credential_manager.h",
"js_credential_manager.mm",
"js_password_manager.h",
"js_password_manager.mm",
"notify_auto_signin_view_controller.h",
"notify_auto_signin_view_controller.mm",
"password_controller.h",
"password_controller.mm",
"password_form_filler.h",
"password_generation_agent.h",
"password_generation_agent.mm",
"password_generation_edit_view.h",
"password_generation_edit_view.mm",
"password_generation_offer_view.h",
"password_generation_offer_view.mm",
"password_generation_prompt_delegate.h",
"password_tab_helper.h",
"password_tab_helper.mm",
"passwords_ui_delegate.h",
"update_password_infobar_controller.h",
"update_password_infobar_controller.mm",
]
deps = [
":injected_js",
"//base",
"//base:i18n",
"//components/autofill/core/browser",
"//components/autofill/core/common",
"//components/autofill/ios/browser",
"//components/browser_sync",
"//components/image_fetcher/core",
"//components/image_fetcher/ios",
"//components/infobars/core",
"//components/keyed_service/core",
"//components/keyed_service/ios",
"//components/password_manager/core/browser",
"//components/password_manager/core/common",
"//components/password_manager/sync/browser",
"//components/prefs",
"//components/security_state/core",
"//components/signin/core/browser",
"//components/strings",
"//components/sync",
"//components/ukm",
"//google_apis",
"//ios/chrome/app/strings",
"//ios/chrome/app/theme",
"//ios/chrome/browser",
"//ios/chrome/browser/autofill",
"//ios/chrome/browser/browser_state",
"//ios/chrome/browser/infobars",
"//ios/chrome/browser/signin",
"//ios/chrome/browser/ssl",
"//ios/chrome/browser/sync/glue",
"//ios/chrome/browser/ui",
"//ios/chrome/browser/ui/commands",
"//ios/chrome/browser/ui/elements",
"//ios/chrome/browser/ui/infobars",
"//ios/chrome/browser/web",
"//ios/public/provider/chrome/browser",
"//ios/public/provider/chrome/browser/ui",
"//ios/third_party/material_components_ios:material_components_ios",
"//ios/web",
"//third_party/material_design_icons:ic_account_circle",
"//ui/base",
"//url",
]
public_deps = [
":passwords_generation_utils",
]
allow_circular_includes_from = [ ":passwords_generation_utils" ]
}
source_set("passwords_generation_utils") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"password_generation_utils.h",
"password_generation_utils.mm",
]
deps = [
"//base:i18n",
"//ios/chrome/browser/ui",
]
libs = [ "CoreGraphics.framework" ]
}
source_set("unit_tests") {
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [
"credential_manager_unittest.mm",
"credential_manager_util_unittest.cc",
"js_credential_manager_unittest.mm",
"password_controller_js_unittest.mm",
"password_controller_off_the_record_unittest.mm",
"password_controller_unittest.mm",
"password_generation_agent_unittest.mm",
]
deps = [
":passwords",
"//base",
"//base/test:test_support",
"//components/autofill/core/common",
"//components/autofill/ios/browser",
"//components/password_manager/core/browser",
"//components/password_manager/core/browser:test_support",
"//components/password_manager/core/common",
"//components/prefs",
"//components/prefs:test_support",
"//google_apis",
"//ios/chrome/browser/autofill",
"//ios/chrome/browser/browser_state:test_support",
"//ios/chrome/browser/ssl",
"//ios/chrome/browser/ui/commands",
"//ios/testing:ocmock_support",
"//ios/web",
"//ios/web/public/test",
"//ios/web/public/test/fakes",
"//net:test_support",
"//testing/gtest",
"//third_party/ocmock",
"//url",
]
}
source_set("eg_tests") {
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [
"credential_manager_egtest.mm",
]
deps = [
":passwords",
"//base",
"//base/test:test_support",
"//components/autofill/core/common",
"//components/autofill/ios/browser",
"//components/keyed_service/core",
"//components/password_manager/core/browser",
"//components/password_manager/core/browser:test_support",
"//components/password_manager/core/common",
"//components/prefs",
"//components/prefs:test_support",
"//ios/chrome/test/app:test_support",
"//ios/chrome/test/earl_grey:test_support",
"//ios/testing:ios_test_support",
"//ios/web/public/test/http_server",
]
libs = [
"UIKit.framework",
"XCTest.framework",
]
}
# TODO(crbug.com/487804): use js_compile_checked instead once the errors have
# been fixed.
js_compile_unchecked("injected_js") {
visibility = [ ":passwords" ]
sources = [
"resources/password_controller.js",
]
}
source_set("passwords_internal") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"password_generation_prompt_view.h",
"password_generation_prompt_view.mm",
"password_generation_prompt_view_controller.h",
"password_generation_prompt_view_controller.mm",
"passwords_ui_delegate_impl.h",
"passwords_ui_delegate_impl.mm",
]
deps = [
":passwords",
"//base",
"//components/strings",
"//ios/chrome/app/strings",
"//ios/chrome/app/theme",
"//ios/chrome/browser/ui",
"//ios/chrome/common",
"//ios/third_party/material_components_ios",
"//ios/third_party/material_roboto_font_loader_ios",
"//ui/base",
]
libs = [ "UIKit.framework" ]
}