| 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/cocoa_protocols_mac.h" | 7 #include "base/cocoa_protocols_mac.h" |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" | 9 #include "chrome/browser/remove_rows_table_model.h" |
| 10 | 10 |
| 11 class GeolocationExceptionsTableModel; | 11 class RemoveRowsObserverBridge; |
| 12 class GeolocationObserverBridge; | |
| 13 | 12 |
| 14 // Controller for the geolocation exception dialog. | 13 // Controller for the geolocation exception dialog. |
| 15 @interface GeolocationExceptionsWindowController : NSWindowController | 14 @interface SimpleContentExceptionsWindowController : NSWindowController |
| 16 <NSWindowDelegate, | 15 <NSWindowDelegate, |
| 17 NSTableViewDataSource, | 16 NSTableViewDataSource, |
| 18 NSTableViewDelegate> { | 17 NSTableViewDelegate> { |
| 19 @private | 18 @private |
| 20 IBOutlet NSTableView* tableView_; | 19 IBOutlet NSTableView* tableView_; |
| 21 IBOutlet NSButton* removeButton_; | 20 IBOutlet NSButton* removeButton_; |
| 22 IBOutlet NSButton* removeAllButton_; | 21 IBOutlet NSButton* removeAllButton_; |
| 23 IBOutlet NSButton* doneButton_; | 22 IBOutlet NSButton* doneButton_; |
| 24 | 23 |
| 25 GeolocationContentSettingsMap* settingsMap_; // weak | 24 scoped_ptr<RemoveRowsTableModel> model_; |
| 26 scoped_ptr<GeolocationExceptionsTableModel> model_; | 25 scoped_ptr<RemoveRowsObserverBridge> tableObserver_; |
| 27 scoped_ptr<GeolocationObserverBridge> tableObserver_; | |
| 28 } | 26 } |
| 29 | 27 |
| 30 // Shows or makes frontmost the geolocation exceptions window. | 28 // Shows or makes frontmost the geolocation exceptions window. |
| 31 // Changes made by the user in the window are persisted in |settingsMap|. | 29 // Changes made by the user in the window are persisted in |model|. |
| 32 + (id)controllerWithSettingsMap:(GeolocationContentSettingsMap*)settingsMap; | 30 // Takes ownership of |model|. |
| 31 + (id)controllerWithTableModel:(RemoveRowsTableModel*)model; |
| 33 | 32 |
| 34 // Sets the minimum width of the sheet and resizes it if necessary. | 33 // Sets the minimum width of the sheet and resizes it if necessary. |
| 35 - (void)setMinWidth:(CGFloat)minWidth; | 34 - (void)setMinWidth:(CGFloat)minWidth; |
| 36 | 35 |
| 37 - (void)attachSheetTo:(NSWindow*)window; | 36 - (void)attachSheetTo:(NSWindow*)window; |
| 38 - (IBAction)closeSheet:(id)sender; | 37 - (IBAction)closeSheet:(id)sender; |
| 39 | 38 |
| 40 - (IBAction)removeRow:(id)sender; | 39 - (IBAction)removeRow:(id)sender; |
| 41 - (IBAction)removeAll:(id)sender; | 40 - (IBAction)removeAll:(id)sender; |
| 42 | 41 |
| 43 @end | 42 @end |
| OLD | NEW |