OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_SETTINGS_UTILS_CONTENT_SETTING_BACKED_BOOLEAN_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_SETTINGS_UTILS_CONTENT_SETTING_BACKED_BOOLEAN_H_ |
| 7 |
| 8 #import <Foundation/Foundation.h> |
| 9 |
| 10 #include "components/content_settings/core/common/content_settings_types.h" |
| 11 #import "ios/chrome/browser/ui/settings/utils/observable_boolean.h" |
| 12 |
| 13 class HostContentSettingsMap; |
| 14 |
| 15 // An observable boolean backed by a setting from a HostContentSettingsMap. |
| 16 @interface ContentSettingBackedBoolean : NSObject<ObservableBoolean> |
| 17 |
| 18 // Returns a ContentSettingBackedBoolean backed by |settingID| from |
| 19 // |settingsMap|. |inverted| specifies that the ON state of the boolean value |
| 20 // corresponds to the OFF state of the content setting. For example, a boolean |
| 21 // value for "disable popups" that corresponds to a model object that allows |
| 22 // popups. |
| 23 - (instancetype)initWithHostContentSettingsMap: |
| 24 (HostContentSettingsMap*)settingsMap |
| 25 settingID:(ContentSettingsType)settingID |
| 26 inverted:(BOOL)inverted |
| 27 NS_DESIGNATED_INITIALIZER; |
| 28 |
| 29 - (instancetype)init NS_UNAVAILABLE; |
| 30 |
| 31 @end |
| 32 |
| 33 #endif // IOS_CHROME_BROWSER_UI_SETTINGS_UTILS_CONTENT_SETTING_BACKED_BOOLEAN_H
_ |
OLD | NEW |