# Copyright 2020 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. source_set("permissions_common") { sources = [ "features.cc", "features.h", "permission_request_enums.h", ] deps = [ "//base" ] } source_set("permissions") { sources = [ "chooser_context_base.cc", "chooser_context_base.h", "contexts/font_access_permission_context.cc", "contexts/font_access_permission_context.h", "contexts/geolocation_permission_context.cc", "contexts/geolocation_permission_context.h", "contexts/webxr_permission_context.cc", "contexts/webxr_permission_context.h", "notification_permission_ui_selector.cc", "notification_permission_ui_selector.h", "permission_context_base.cc", "permission_context_base.h", "permission_decision_auto_blocker.cc", "permission_decision_auto_blocker.h", "permission_manager.cc", "permission_manager.h", "permission_prompt.h", "permission_request.cc", "permission_request.h", "permission_request_id.cc", "permission_request_id.h", "permission_request_impl.cc", "permission_request_impl.h", "permission_request_manager.cc", "permission_request_manager.h", "permission_result.cc", "permission_result.h", "permission_uma_util.cc", "permission_uma_util.h", "permission_util.cc", "permission_util.h", "permissions_client.cc", "permissions_client.h", "pref_names.cc", "pref_names.h", "quota_permission_context_impl.cc", "quota_permission_context_impl.h", "switches.cc", "switches.h", ] deps = [ "//base", "//components/autofill_assistant/browser/public:public", "//components/content_settings/browser", "//components/content_settings/core/browser", "//components/keyed_service/content", "//components/permissions/prediction_service", "//components/strings:components_strings_grit", "//components/ukm/content", "//components/url_formatter", "//components/variations", "//components/vector_icons", "//content/public/browser", "//services/metrics/public/cpp:ukm_builders", "//third_party/blink/public/common", "//ui/base", "//url", ] if (is_android) { sources += [ "android/android_permission_util.cc", "android/android_permission_util.h", "android/permission_dialog_delegate.cc", "android/permission_dialog_delegate.h", "android/permission_prompt_android.cc", "android/permission_prompt_android.h", "contexts/geolocation_permission_context_android.cc", "contexts/geolocation_permission_context_android.h", ] deps += [ "//components/infobars/core", "//components/location/android:location_settings_dialog_enums_java", "//components/location/android:settings", "//components/permissions/android:jni_headers", "//components/prefs", "//components/resources:android_resources", "//ui/android", ] } else { sources += [ "permission_prompt_impl.cc" ] } public_deps = [ ":permissions_common" ] } source_set("test_support") { testonly = true sources = [ "test/chooser_context_base_mock_permission_observer.cc", "test/chooser_context_base_mock_permission_observer.h", "test/mock_permission_prompt.cc", "test/mock_permission_prompt.h", "test/mock_permission_prompt_factory.cc", "test/mock_permission_prompt_factory.h", "test/mock_permission_request.cc", "test/mock_permission_request.h", "test/permission_request_observer.cc", "test/permission_request_observer.h", "test/test_permissions_client.cc", "test/test_permissions_client.h", ] deps = [ ":permissions", "//base", "//components/content_settings/core/browser", "//components/sync_preferences:test_support", "//components/ukm/content", "//components/vector_icons", "//content/public/browser", "//testing/gmock", "//testing/gtest", "//ui/gfx", "//url", ] if (is_android) { deps += [ "//components/resources:android_resources" ] } } source_set("unit_tests") { testonly = true sources = [ "chooser_context_base_unittest.cc", "contexts/geolocation_permission_context_unittest.cc", "permission_context_base_unittest.cc", "permission_decision_auto_blocker_unittest.cc", "permission_manager_unittest.cc", "permission_request_manager_unittest.cc", "permission_uma_util_unittest.cc", ] deps = [ ":permissions", ":test_support", "//base", "//base/test:test_support", "//components/content_settings/browser", "//components/content_settings/browser:test_support", "//components/content_settings/core/browser", "//components/keyed_service/content", "//components/prefs:test_support", "//components/ukm:test_support", "//components/ukm/content", "//components/variations", "//content/test:test_support", "//testing/gtest", ] if (is_android) { deps += [ "//components/location/android:location_settings_dialog_enums_java", "//components/location/android:test_support", ] } }