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 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
8 #include "base/scoped_nsobject.h" | 8 #include "base/scoped_nsobject.h" |
9 #include "chrome/browser/prefs/pref_member.h" | 9 #include "chrome/browser/prefs/pref_member.h" |
10 #include "chrome/browser/prefs/pref_set_observer.h" | 10 #include "chrome/browser/prefs/pref_set_observer.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 IBOutlet NSButton* enableLoggingCheckbox_; | 138 IBOutlet NSButton* enableLoggingCheckbox_; |
139 scoped_ptr<PrefSetObserver> proxyPrefs_; | 139 scoped_ptr<PrefSetObserver> proxyPrefs_; |
140 BOOL showAlternateErrorPagesEnabled_; | 140 BOOL showAlternateErrorPagesEnabled_; |
141 BOOL useSuggestEnabled_; | 141 BOOL useSuggestEnabled_; |
142 BOOL dnsPrefetchEnabled_; | 142 BOOL dnsPrefetchEnabled_; |
143 BOOL safeBrowsingEnabled_; | 143 BOOL safeBrowsingEnabled_; |
144 BOOL metricsReportingEnabled_; | 144 BOOL metricsReportingEnabled_; |
145 BOOL proxiesConfigureButtonEnabled_; | 145 BOOL proxiesConfigureButtonEnabled_; |
146 } | 146 } |
147 | 147 |
| 148 // Usable from cocoa bindings to hook up the custom home pages table. |
| 149 @property(nonatomic, readonly) CustomHomePagesModel* customPagesSource; |
| 150 |
| 151 // Properties for the enabled state of various UI elements. Keep these ordered |
| 152 // by occurrence on the dialog. |
| 153 @property(nonatomic) BOOL restoreButtonsEnabled; |
| 154 @property(nonatomic) BOOL restoreURLsEnabled; |
| 155 @property(nonatomic) BOOL showHomeButtonEnabled; |
| 156 @property(nonatomic) BOOL defaultSearchEngineEnabled; |
| 157 @property(nonatomic) BOOL passwordManagerChoiceEnabled; |
| 158 @property(nonatomic) BOOL passwordManagerButtonEnabled; |
| 159 @property(nonatomic) BOOL autoFillSettingsButtonEnabled; |
| 160 @property(nonatomic) BOOL showAlternateErrorPagesEnabled; |
| 161 @property(nonatomic) BOOL useSuggestEnabled; |
| 162 @property(nonatomic) BOOL dnsPrefetchEnabled; |
| 163 @property(nonatomic) BOOL safeBrowsingEnabled; |
| 164 @property(nonatomic) BOOL metricsReportingEnabled; |
| 165 @property(nonatomic) BOOL proxiesConfigureButtonEnabled; |
| 166 |
148 // Designated initializer. |profile| should not be NULL. | 167 // Designated initializer. |profile| should not be NULL. |
149 - (id)initWithProfile:(Profile*)profile initialPage:(OptionsPage)initialPage; | 168 - (id)initWithProfile:(Profile*)profile initialPage:(OptionsPage)initialPage; |
150 | 169 |
151 // Show the preferences window. | 170 // Show the preferences window. |
152 - (void)showPreferences:(id)sender; | 171 - (void)showPreferences:(id)sender; |
153 | 172 |
154 // Switch to the given preference page. | 173 // Switch to the given preference page. |
155 - (void)switchToPage:(OptionsPage)page animate:(BOOL)animate; | 174 - (void)switchToPage:(OptionsPage)page animate:(BOOL)animate; |
156 | 175 |
157 // Enables or disables the restoreOnStartup elements | 176 // Enables or disables the restoreOnStartup elements |
(...skipping 28 matching lines...) Expand all Loading... |
186 - (IBAction)browseDownloadLocation:(id)sender; | 205 - (IBAction)browseDownloadLocation:(id)sender; |
187 - (IBAction)resetAutoOpenFiles:(id)sender; | 206 - (IBAction)resetAutoOpenFiles:(id)sender; |
188 - (IBAction)changeFontAndLanguageSettings:(id)sender; | 207 - (IBAction)changeFontAndLanguageSettings:(id)sender; |
189 - (IBAction)openProxyPreferences:(id)sender; | 208 - (IBAction)openProxyPreferences:(id)sender; |
190 - (IBAction)showCertificates:(id)sender; | 209 - (IBAction)showCertificates:(id)sender; |
191 - (IBAction)resetToDefaults:(id)sender; | 210 - (IBAction)resetToDefaults:(id)sender; |
192 | 211 |
193 // When a toolbar button is clicked | 212 // When a toolbar button is clicked |
194 - (IBAction)toolbarButtonSelected:(id)sender; | 213 - (IBAction)toolbarButtonSelected:(id)sender; |
195 | 214 |
196 // Usable from cocoa bindings to hook up the custom home pages table. | |
197 @property (nonatomic, readonly) CustomHomePagesModel* customPagesSource; | |
198 | |
199 // Properties for the enabled state of various UI elements. Keep these ordered | |
200 // by occurrence on the dialog. | |
201 @property (nonatomic) BOOL restoreButtonsEnabled; | |
202 @property (nonatomic) BOOL restoreURLsEnabled; | |
203 @property (nonatomic) BOOL showHomeButtonEnabled; | |
204 @property (nonatomic) BOOL defaultSearchEngineEnabled; | |
205 @property (nonatomic) BOOL passwordManagerChoiceEnabled; | |
206 @property (nonatomic) BOOL passwordManagerButtonEnabled; | |
207 @property (nonatomic) BOOL autoFillSettingsButtonEnabled; | |
208 @property (nonatomic) BOOL showAlternateErrorPagesEnabled; | |
209 @property (nonatomic) BOOL useSuggestEnabled; | |
210 @property (nonatomic) BOOL dnsPrefetchEnabled; | |
211 @property (nonatomic) BOOL safeBrowsingEnabled; | |
212 @property (nonatomic) BOOL metricsReportingEnabled; | |
213 @property (nonatomic) BOOL proxiesConfigureButtonEnabled; | |
214 @end | 215 @end |
215 | 216 |
216 @interface PreferencesWindowController(Testing) | 217 @interface PreferencesWindowController(Testing) |
217 | 218 |
218 - (IntegerPrefMember*)lastSelectedPage; | 219 - (IntegerPrefMember*)lastSelectedPage; |
219 - (NSToolbar*)toolbar; | 220 - (NSToolbar*)toolbar; |
220 - (NSView*)basicsView; | 221 - (NSView*)basicsView; |
221 - (NSView*)personalStuffView; | 222 - (NSView*)personalStuffView; |
222 - (NSView*)underTheHoodView; | 223 - (NSView*)underTheHoodView; |
223 | 224 |
224 // Converts the given OptionsPage value (which may be OPTIONS_PAGE_DEFAULT) | 225 // Converts the given OptionsPage value (which may be OPTIONS_PAGE_DEFAULT) |
225 // into a concrete OptionsPage value. | 226 // into a concrete OptionsPage value. |
226 - (OptionsPage)normalizePage:(OptionsPage)page; | 227 - (OptionsPage)normalizePage:(OptionsPage)page; |
227 | 228 |
228 // Returns the toolbar item corresponding to the given page. Should be | 229 // Returns the toolbar item corresponding to the given page. Should be |
229 // called only after awakeFromNib is. | 230 // called only after awakeFromNib is. |
230 - (NSToolbarItem*)getToolbarItemForPage:(OptionsPage)page; | 231 - (NSToolbarItem*)getToolbarItemForPage:(OptionsPage)page; |
231 | 232 |
232 // Returns the (normalized) page corresponding to the given toolbar item. | 233 // Returns the (normalized) page corresponding to the given toolbar item. |
233 // Should be called only after awakeFromNib is. | 234 // Should be called only after awakeFromNib is. |
234 - (OptionsPage)getPageForToolbarItem:(NSToolbarItem*)toolbarItem; | 235 - (OptionsPage)getPageForToolbarItem:(NSToolbarItem*)toolbarItem; |
235 | 236 |
236 // Returns the view corresponding to the given page. Should be called | 237 // Returns the view corresponding to the given page. Should be called |
237 // only after awakeFromNib is. | 238 // only after awakeFromNib is. |
238 - (NSView*)getPrefsViewForPage:(OptionsPage)page; | 239 - (NSView*)getPrefsViewForPage:(OptionsPage)page; |
239 | 240 |
240 @end | 241 @end |
OLD | NEW |