summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/content_exceptions_window_controller.h
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-30 08:37:22 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-30 08:37:22 +0000
commit9435c4c6cd6ef245fd9b5a66dd990400e638ae46 (patch)
tree1ae625b7104d7a12f0e22bb92837d36856c56362 /chrome/browser/cocoa/content_exceptions_window_controller.h
parent82df52ead5f3e27ac2c745b89c3d4e7475d54918 (diff)
downloadchromium_src-9435c4c6cd6ef245fd9b5a66dd990400e638ae46.zip
chromium_src-9435c4c6cd6ef245fd9b5a66dd990400e638ae46.tar.gz
chromium_src-9435c4c6cd6ef245fd9b5a66dd990400e638ae46.tar.bz2
[Mac] Make exceptions dialog a sheet.
XIB changes (applying to ContentExceptionsWindow.xib and GeolocationExceptionsWindow.xib): The window is now drawn in Aqua style, with window margins, Aqua buttons and text labels for them. At the bottom right of the window there is an additional button for closing the sheet, hooked up to the |doneButton_| outlet in the file's owner and with action |closeSheet:|. The lefthand side buttons are inside a |GTMWidthBasedTweaker|, as is the done button. The actual tweaking is done by a newly added |GTMUILocalizerAndLayoutTweaker|. BUG=38021 TEST=Preferences > Under the Hood > Content Settings > Exceptions should be a sheet. Review URL: http://codereview.chromium.org/1760001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46049 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/content_exceptions_window_controller.h')
-rw-r--r--chrome/browser/cocoa/content_exceptions_window_controller.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/chrome/browser/cocoa/content_exceptions_window_controller.h b/chrome/browser/cocoa/content_exceptions_window_controller.h
index 91a5b33..1d1bc2a 100644
--- a/chrome/browser/cocoa/content_exceptions_window_controller.h
+++ b/chrome/browser/cocoa/content_exceptions_window_controller.h
@@ -24,6 +24,7 @@ class UpdatingContentSettingsObserver;
IBOutlet NSButton* addButton_;
IBOutlet NSButton* removeButton_;
IBOutlet NSButton* removeAllButton_;
+ IBOutlet NSButton* doneButton_;
ContentSettingsType settingsType_;
HostContentSettingsMap* settingsMap_; // weak
@@ -45,14 +46,22 @@ class UpdatingContentSettingsObserver;
scoped_ptr<HostContentSettingsMap::PatternSettingPair> newException_;
}
-// Shows or makes frontmost the content exceptions window for |settingsType|.
+// Returns the content exceptions window controller for |settingsType|.
// Changes made by the user in the window are persisted in |settingsMap|.
-+ (id)showForType:(ContentSettingsType)settingsType
- settingsMap:(HostContentSettingsMap*)settingsMap;
++ (id)controllerForType:(ContentSettingsType)settingsType
+ settingsMap:(HostContentSettingsMap*)settingsMap;
+
+// Shows the exceptions dialog as a modal sheet attached to |window|.
+- (void)attachSheetTo:(NSWindow*)window;
+
+// Sets the minimum width of the sheet and resizes it if necessary.
+- (void)setMinWidth:(CGFloat)minWidth;
- (IBAction)addException:(id)sender;
- (IBAction)removeException:(id)sender;
- (IBAction)removeAllExceptions:(id)sender;
+// Closes the sheet and ends the modal loop.
+- (IBAction)closeSheet:(id)sender;
@end