| // Copyright 2025 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| import '/shared/settings/prefs/prefs.js'; |
| import 'chrome://resources/cr_elements/cr_shared_style.css.js'; |
| import 'chrome://resources/cr_elements/icons.html.js'; |
| import '../controls/settings_radio_group.js'; |
| import '../privacy_icons.html.js'; |
| import '../privacy_page/collapse_radio_button.js'; |
| import '../settings_shared.css.js'; |
| import './category_setting_exceptions.js'; |
| import './settings_category_default_radio_group.js'; |
| import './site_settings_shared.css.js'; |
| |
| import {PrefsMixin} from '/shared/settings/prefs/prefs_mixin.js'; |
| import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; |
| |
| import {loadTimeData} from '../i18n_setup.js'; |
| |
| import {ContentSettingsTypes} from './constants.js'; |
| import {getTemplate} from './protected_content_page.html.js'; |
| |
| const ProtectedContentPageElementBase = PrefsMixin(PolymerElement); |
| |
| export class ProtectedContentPageElement extends |
| ProtectedContentPageElementBase { |
| static get is() { |
| return 'settings-protected-content-page'; |
| } |
| |
| static get template() { |
| return getTemplate(); |
| } |
| |
| static get properties() { |
| return { |
| searchTerm: { |
| type: String, |
| notify: true, |
| value: '', |
| }, |
| |
| isGuest_: { |
| type: Boolean, |
| value() { |
| return loadTimeData.getBoolean('isGuest'); |
| }, |
| }, |
| |
| /** Expose ContentSettingsTypes enum to HTML bindings. */ |
| contentSettingsTypesEnum_: { |
| type: Object, |
| value: ContentSettingsTypes, |
| }, |
| }; |
| } |
| |
| declare searchTerm: string; |
| declare private isGuest_: boolean; |
| } |
| |
| declare global { |
| interface HTMLElementTagNameMap { |
| 'settings-protected-content-page': ProtectedContentPageElement; |
| } |
| } |
| |
| customElements.define( |
| ProtectedContentPageElement.is, ProtectedContentPageElement); |