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