| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/cocoa_protocols_mac.h" | 7 #include "base/cocoa_protocols_mac.h" |
| 8 #include "base/scoped_nsobject.h" | 8 #include "base/scoped_nsobject.h" |
| 9 #include "chrome/common/pref_member.h" | 9 #include "chrome/common/pref_member.h" |
| 10 | 10 |
| 11 class Profile; | 11 class Profile; |
| 12 | 12 |
| 13 // Used to keep track of which type of font the user is currently selecting. | 13 // Used to keep track of which type of font the user is currently selecting. |
| 14 enum FontSettingType { | 14 enum FontSettingType { |
| 15 FontSettingSerif, | 15 FontSettingSerif, |
| 16 FontSettingSansSerif, | 16 FontSettingSansSerif, |
| 17 FontSettingFixed | 17 FontSettingFixed |
| 18 }; | 18 }; |
| 19 | 19 |
| 20 // Keys for the dictionaries in the |encodings_| array. | 20 // Keys for the dictionaries in the |encodings_| array. |
| 21 extern NSString* const kCharacterInfoEncoding; // NSString value. | 21 extern NSString* const kCharacterInfoEncoding; // NSString value. |
| 22 extern NSString* const kCharacterInfoName; // NSString value. | 22 extern NSString* const kCharacterInfoName; // NSString value. |
| 23 extern NSString* const kCharacterInfoID; // NSNumber value. | 23 extern NSString* const kCharacterInfoID; // NSNumber value. |
| 24 | 24 |
| 25 // A window controller that allows the user to change the default WebKit fonts | 25 // A window controller that allows the user to change the default WebKit fonts |
| 26 // and language encodings for web pages. This window controller is meant to be | 26 // and language encodings for web pages. This window controller is meant to be |
| 27 // used as a modal sheet on another window. | 27 // used as a modal sheet on another window. |
| 28 @interface FontLanguageSettingsController : NSWindowController | 28 @interface FontLanguageSettingsController : NSWindowController |
| 29 <NSWindowDelegate, | 29 <NSWindowDelegate> { |
| 30 NSTableViewDelegate, | |
| 31 NSTableViewDataSource> { | |
| 32 @private | 30 @private |
| 33 // The font that we are currently changing. | 31 // The font that we are currently changing. |
| 34 NSFont* currentFont_; // weak | 32 NSFont* currentFont_; // weak |
| 35 FontSettingType currentType_; | 33 FontSettingType currentType_; |
| 36 | 34 |
| 37 IBOutlet NSButton* serifButton_; | 35 IBOutlet NSButton* serifButton_; |
| 38 IBOutlet NSTextField* serifField_; | 36 IBOutlet NSTextField* serifField_; |
| 39 scoped_nsobject<NSFont> serifFont_; | 37 scoped_nsobject<NSFont> serifFont_; |
| 40 BOOL changedSerif_; | 38 BOOL changedSerif_; |
| 41 | 39 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // and |-save:| after it persists the settings. | 82 // and |-save:| after it persists the settings. |
| 85 - (IBAction)closeSheet:(id)sender; | 83 - (IBAction)closeSheet:(id)sender; |
| 86 | 84 |
| 87 // Persists the new values into the preferences and closes the sheet. | 85 // Persists the new values into the preferences and closes the sheet. |
| 88 - (IBAction)save:(id)sender; | 86 - (IBAction)save:(id)sender; |
| 89 | 87 |
| 90 // Returns the |encodings_| array. This is used by bindings for KVO/KVC. | 88 // Returns the |encodings_| array. This is used by bindings for KVO/KVC. |
| 91 - (NSArray*)encodings; | 89 - (NSArray*)encodings; |
| 92 | 90 |
| 93 @end | 91 @end |
| OLD | NEW |