| 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 "chrome/common/content_settings_types.h" | 9 #include "chrome/common/content_settings_types.h" |
| 9 #include "chrome/browser/pref_member.h" | 10 #include "chrome/browser/pref_member.h" |
| 10 | 11 |
| 12 class PrefObserverBridge; |
| 11 class Profile; | 13 class Profile; |
| 12 | 14 |
| 13 // This controller manages a dialog that lets the user manage the content | 15 // This controller manages a dialog that lets the user manage the content |
| 14 // settings for several content setting types. | 16 // settings for several content setting types. |
| 15 @interface ContentSettingsDialogController | 17 @interface ContentSettingsDialogController |
| 16 : NSWindowController<NSWindowDelegate> { | 18 : NSWindowController<NSWindowDelegate, NSTabViewDelegate> { |
| 17 @private | 19 @private |
| 20 IBOutlet NSTabView* tabView_; |
| 18 Profile* profile_; // weak | 21 Profile* profile_; // weak |
| 19 IntegerPrefMember lastSelectedTab_; | 22 IntegerPrefMember lastSelectedTab_; |
| 20 BooleanPrefMember clearSiteDataOnExit_; | 23 BooleanPrefMember clearSiteDataOnExit_; |
| 24 scoped_ptr<PrefObserverBridge> observer_; // Watches for pref changes. |
| 21 } | 25 } |
| 22 | 26 |
| 23 // Show the content settings dialog associated with the given profile (or the | 27 // Show the content settings dialog associated with the given profile (or the |
| 24 // original profile if this is an incognito profile). If no content settings | 28 // original profile if this is an incognito profile). If no content settings |
| 25 // dialog exists for this profile, create one and show it. Any resulting | 29 // dialog exists for this profile, create one and show it. Any resulting |
| 26 // editor releases itself when closed. | 30 // editor releases itself when closed. |
| 27 +(id)showContentSettingsForType:(ContentSettingsType)settingsType | 31 +(id)showContentSettingsForType:(ContentSettingsType)settingsType |
| 28 profile:(Profile*)profile; | 32 profile:(Profile*)profile; |
| 29 | 33 |
| 30 - (IBAction)showCookies:(id)sender; | 34 - (IBAction)showCookies:(id)sender; |
| 31 - (IBAction)openFlashPlayerSettings:(id)sender; | 35 - (IBAction)openFlashPlayerSettings:(id)sender; |
| 32 | 36 |
| 33 - (IBAction)showCookieExceptions:(id)sender; | 37 - (IBAction)showCookieExceptions:(id)sender; |
| 34 - (IBAction)showImagesExceptions:(id)sender; | 38 - (IBAction)showImagesExceptions:(id)sender; |
| 35 - (IBAction)showJavaScriptExceptions:(id)sender; | 39 - (IBAction)showJavaScriptExceptions:(id)sender; |
| 36 - (IBAction)showPluginsExceptions:(id)sender; | 40 - (IBAction)showPluginsExceptions:(id)sender; |
| 37 - (IBAction)showPopupsExceptions:(id)sender; | 41 - (IBAction)showPopupsExceptions:(id)sender; |
| 38 | 42 |
| 39 @end | 43 @end |
| OLD | NEW |