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/pref_member.h" | 10 #include "chrome/browser/pref_member.h" |
11 | 11 |
| 12 // Index of the "enabled" and "disabled" radio group settings in all tabs except |
| 13 // for the cookies tab. |
| 14 const NSInteger kContentSettingsEnabledIndex = 0; |
| 15 const NSInteger kContentSettingsDisabledIndex = 1; |
| 16 |
| 17 // Indices of the various cookie settings in the cookie radio group. |
| 18 const NSInteger kCookieEnabledIndex = 0; |
| 19 const NSInteger kCookieAskIndex = 1; |
| 20 const NSInteger kCookieDisabledIndex = 2; |
| 21 |
| 22 // Indices of the various geolocation settings in the geolocation radio group. |
| 23 const NSInteger kGeolocationEnabledIndex = 0; |
| 24 const NSInteger kGeolocationAskIndex = 1; |
| 25 const NSInteger kGeolocationDisabledIndex = 2; |
| 26 |
12 namespace ContentSettingsDialogControllerInternal { | 27 namespace ContentSettingsDialogControllerInternal { |
13 class PrefObserverBridge; | 28 class PrefObserverBridge; |
14 } | 29 } |
15 | 30 |
16 class Profile; | 31 class Profile; |
17 | 32 |
18 // This controller manages a dialog that lets the user manage the content | 33 // This controller manages a dialog that lets the user manage the content |
19 // settings for several content setting types. | 34 // settings for several content setting types. |
20 @interface ContentSettingsDialogController | 35 @interface ContentSettingsDialogController |
21 : NSWindowController<NSWindowDelegate, NSTabViewDelegate> { | 36 : NSWindowController<NSWindowDelegate, NSTabViewDelegate> { |
(...skipping 21 matching lines...) Expand all Loading... |
43 - (IBAction)openPluginsPage:(id)sender; | 58 - (IBAction)openPluginsPage:(id)sender; |
44 | 59 |
45 - (IBAction)showCookieExceptions:(id)sender; | 60 - (IBAction)showCookieExceptions:(id)sender; |
46 - (IBAction)showImagesExceptions:(id)sender; | 61 - (IBAction)showImagesExceptions:(id)sender; |
47 - (IBAction)showJavaScriptExceptions:(id)sender; | 62 - (IBAction)showJavaScriptExceptions:(id)sender; |
48 - (IBAction)showPluginsExceptions:(id)sender; | 63 - (IBAction)showPluginsExceptions:(id)sender; |
49 - (IBAction)showPopupsExceptions:(id)sender; | 64 - (IBAction)showPopupsExceptions:(id)sender; |
50 - (IBAction)showGeolocationExceptions:(id)sender; | 65 - (IBAction)showGeolocationExceptions:(id)sender; |
51 | 66 |
52 @end | 67 @end |
| 68 |
| 69 @interface ContentSettingsDialogController (TestingAPI) |
| 70 // Properties that the radio groups and checkboxes are bound to. |
| 71 @property(assign, nonatomic) NSInteger cookieSettingIndex; |
| 72 @property(assign, nonatomic) BOOL blockThirdPartyCookies; |
| 73 @property(assign, nonatomic) BOOL clearSiteDataOnExit; |
| 74 @property(assign, nonatomic) NSInteger imagesEnabledIndex; |
| 75 @property(assign, nonatomic) NSInteger javaScriptEnabledIndex; |
| 76 @property(assign, nonatomic) NSInteger popupsEnabledIndex; |
| 77 @property(assign, nonatomic) NSInteger pluginsEnabledIndex; |
| 78 @property(assign, nonatomic) NSInteger geolocationSettingIndex; |
| 79 @end |
OLD | NEW |