Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(825)

Side by Side Diff: chrome/browser/cocoa/content_settings_dialog_controller.h

Issue 3304015: Use PrefChangeRegistrar everywhere (Closed)
Patch Set: final version for commit Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_change_registrar.h"
10 #include "chrome/browser/prefs/pref_member.h" 11 #include "chrome/browser/prefs/pref_member.h"
11 12
12 // Index of the "enabled" and "disabled" radio group settings in all tabs except 13 // Index of the "enabled" and "disabled" radio group settings in all tabs except
13 // the ones below. 14 // the ones below.
14 const NSInteger kContentSettingsEnabledIndex = 0; 15 const NSInteger kContentSettingsEnabledIndex = 0;
15 const NSInteger kContentSettingsDisabledIndex = 1; 16 const NSInteger kContentSettingsDisabledIndex = 1;
16 17
17 // Indices of the various cookie settings in the cookie radio group. 18 // Indices of the various cookie settings in the cookie radio group.
18 const NSInteger kCookieEnabledIndex = 0; 19 const NSInteger kCookieEnabledIndex = 0;
19 const NSInteger kCookieDisabledIndex = 1; 20 const NSInteger kCookieDisabledIndex = 1;
(...skipping 23 matching lines...) Expand all
43 // This controller manages a dialog that lets the user manage the content 44 // This controller manages a dialog that lets the user manage the content
44 // settings for several content setting types. 45 // settings for several content setting types.
45 @interface ContentSettingsDialogController 46 @interface ContentSettingsDialogController
46 : NSWindowController<NSWindowDelegate, NSTabViewDelegate> { 47 : NSWindowController<NSWindowDelegate, NSTabViewDelegate> {
47 @private 48 @private
48 IBOutlet NSTabView* tabView_; 49 IBOutlet NSTabView* tabView_;
49 IBOutlet TabViewPickerTable* tabViewPicker_; 50 IBOutlet TabViewPickerTable* tabViewPicker_;
50 Profile* profile_; // weak 51 Profile* profile_; // weak
51 IntegerPrefMember lastSelectedTab_; 52 IntegerPrefMember lastSelectedTab_;
52 BooleanPrefMember clearSiteDataOnExit_; 53 BooleanPrefMember clearSiteDataOnExit_;
54 PrefChangeRegistrar registrar_;
53 scoped_ptr<ContentSettingsDialogControllerInternal::PrefObserverBridge> 55 scoped_ptr<ContentSettingsDialogControllerInternal::PrefObserverBridge>
54 observer_; // Watches for pref changes. 56 observer_; // Watches for pref changes.
55 } 57 }
56 58
57 // Show the content settings dialog associated with the given profile (or the 59 // Show the content settings dialog associated with the given profile (or the
58 // original profile if this is an incognito profile). If no content settings 60 // original profile if this is an incognito profile). If no content settings
59 // dialog exists for this profile, create one and show it. Any resulting 61 // dialog exists for this profile, create one and show it. Any resulting
60 // editor releases itself when closed. 62 // editor releases itself when closed.
61 +(id)showContentSettingsForType:(ContentSettingsType)settingsType 63 +(id)showContentSettingsForType:(ContentSettingsType)settingsType
62 profile:(Profile*)profile; 64 profile:(Profile*)profile;
(...skipping 20 matching lines...) Expand all
83 @property(nonatomic) NSInteger cookieSettingIndex; 85 @property(nonatomic) NSInteger cookieSettingIndex;
84 @property(nonatomic) BOOL blockThirdPartyCookies; 86 @property(nonatomic) BOOL blockThirdPartyCookies;
85 @property(nonatomic) BOOL clearSiteDataOnExit; 87 @property(nonatomic) BOOL clearSiteDataOnExit;
86 @property(nonatomic) NSInteger imagesEnabledIndex; 88 @property(nonatomic) NSInteger imagesEnabledIndex;
87 @property(nonatomic) NSInteger javaScriptEnabledIndex; 89 @property(nonatomic) NSInteger javaScriptEnabledIndex;
88 @property(nonatomic) NSInteger popupsEnabledIndex; 90 @property(nonatomic) NSInteger popupsEnabledIndex;
89 @property(nonatomic) NSInteger pluginsEnabledIndex; 91 @property(nonatomic) NSInteger pluginsEnabledIndex;
90 @property(nonatomic) NSInteger geolocationSettingIndex; 92 @property(nonatomic) NSInteger geolocationSettingIndex;
91 @property(nonatomic) NSInteger notificationsSettingIndex; 93 @property(nonatomic) NSInteger notificationsSettingIndex;
92 @end 94 @end
OLDNEW
« no previous file with comments | « chrome/browser/background_mode_manager.cc ('k') | chrome/browser/cocoa/content_settings_dialog_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698