| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #import "base/cocoa_protocols_mac.h" | 7 #import "base/cocoa_protocols_mac.h" |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "chrome/common/content_settings_types.h" | 9 #include "chrome/common/content_settings_types.h" |
| 10 #include "chrome/browser/prefs/pref_member.h" | 10 #include "chrome/browser/prefs/pref_member.h" |
| 11 | 11 |
| 12 // Index of the "enabled" and "disabled" radio group settings in all tabs except | 12 // Index of the "enabled" and "disabled" radio group settings in all tabs except |
| 13 // the ones below. | 13 // the ones below. |
| 14 const NSInteger kContentSettingsEnabledIndex = 0; | 14 const NSInteger kContentSettingsEnabledIndex = 0; |
| 15 const NSInteger kContentSettingsDisabledIndex = 1; | 15 const NSInteger kContentSettingsDisabledIndex = 1; |
| 16 | 16 |
| 17 // Indices of the various cookie settings in the cookie radio group. | 17 // Indices of the various cookie settings in the cookie radio group. |
| 18 const NSInteger kCookieEnabledIndex = 0; | 18 const NSInteger kCookieEnabledIndex = 0; |
| 19 const NSInteger kCookieAskIndex = 1; | 19 const NSInteger kCookieDisabledIndex = 1; |
| 20 const NSInteger kCookieDisabledIndex = 2; | |
| 21 | 20 |
| 22 // Indices of the various plugin settings in the plugins radio group. | 21 // Indices of the various plugin settings in the plugins radio group. |
| 23 const NSInteger kPluginsAllowIndex = 0; | 22 const NSInteger kPluginsAllowIndex = 0; |
| 24 const NSInteger kPluginsAllowSandboxedIndex = 1; | 23 const NSInteger kPluginsAllowSandboxedIndex = 1; |
| 25 const NSInteger kPluginsBlockIndex = 2; | 24 const NSInteger kPluginsBlockIndex = 2; |
| 26 | 25 |
| 27 // Indices of the various geolocation settings in the geolocation radio group. | 26 // Indices of the various geolocation settings in the geolocation radio group. |
| 28 const NSInteger kGeolocationEnabledIndex = 0; | 27 const NSInteger kGeolocationEnabledIndex = 0; |
| 29 const NSInteger kGeolocationAskIndex = 1; | 28 const NSInteger kGeolocationAskIndex = 1; |
| 30 const NSInteger kGeolocationDisabledIndex = 2; | 29 const NSInteger kGeolocationDisabledIndex = 2; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 42 @class TabViewPickerTable; | 41 @class TabViewPickerTable; |
| 43 | 42 |
| 44 // This controller manages a dialog that lets the user manage the content | 43 // This controller manages a dialog that lets the user manage the content |
| 45 // settings for several content setting types. | 44 // settings for several content setting types. |
| 46 @interface ContentSettingsDialogController | 45 @interface ContentSettingsDialogController |
| 47 : NSWindowController<NSWindowDelegate, NSTabViewDelegate> { | 46 : NSWindowController<NSWindowDelegate, NSTabViewDelegate> { |
| 48 @private | 47 @private |
| 49 IBOutlet NSTabView* tabView_; | 48 IBOutlet NSTabView* tabView_; |
| 50 IBOutlet TabViewPickerTable* tabViewPicker_; | 49 IBOutlet TabViewPickerTable* tabViewPicker_; |
| 51 Profile* profile_; // weak | 50 Profile* profile_; // weak |
| 52 BOOL disableCookiePrompt_; | |
| 53 IntegerPrefMember lastSelectedTab_; | 51 IntegerPrefMember lastSelectedTab_; |
| 54 BooleanPrefMember clearSiteDataOnExit_; | 52 BooleanPrefMember clearSiteDataOnExit_; |
| 55 scoped_ptr<ContentSettingsDialogControllerInternal::PrefObserverBridge> | 53 scoped_ptr<ContentSettingsDialogControllerInternal::PrefObserverBridge> |
| 56 observer_; // Watches for pref changes. | 54 observer_; // Watches for pref changes. |
| 57 } | 55 } |
| 58 | 56 |
| 59 // Show the content settings dialog associated with the given profile (or the | 57 // Show the content settings dialog associated with the given profile (or the |
| 60 // original profile if this is an incognito profile). If no content settings | 58 // original profile if this is an incognito profile). If no content settings |
| 61 // dialog exists for this profile, create one and show it. Any resulting | 59 // dialog exists for this profile, create one and show it. Any resulting |
| 62 // editor releases itself when closed. | 60 // editor releases itself when closed. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 85 @property(nonatomic) NSInteger cookieSettingIndex; | 83 @property(nonatomic) NSInteger cookieSettingIndex; |
| 86 @property(nonatomic) BOOL blockThirdPartyCookies; | 84 @property(nonatomic) BOOL blockThirdPartyCookies; |
| 87 @property(nonatomic) BOOL clearSiteDataOnExit; | 85 @property(nonatomic) BOOL clearSiteDataOnExit; |
| 88 @property(nonatomic) NSInteger imagesEnabledIndex; | 86 @property(nonatomic) NSInteger imagesEnabledIndex; |
| 89 @property(nonatomic) NSInteger javaScriptEnabledIndex; | 87 @property(nonatomic) NSInteger javaScriptEnabledIndex; |
| 90 @property(nonatomic) NSInteger popupsEnabledIndex; | 88 @property(nonatomic) NSInteger popupsEnabledIndex; |
| 91 @property(nonatomic) NSInteger pluginsEnabledIndex; | 89 @property(nonatomic) NSInteger pluginsEnabledIndex; |
| 92 @property(nonatomic) NSInteger geolocationSettingIndex; | 90 @property(nonatomic) NSInteger geolocationSettingIndex; |
| 93 @property(nonatomic) NSInteger notificationsSettingIndex; | 91 @property(nonatomic) NSInteger notificationsSettingIndex; |
| 94 @end | 92 @end |
| OLD | NEW |