| 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/host_content_settings_map.h" | 9 #include "chrome/browser/host_content_settings_map.h" |
| 10 #include "chrome/common/content_settings_types.h" | 10 #include "chrome/common/content_settings_types.h" |
| 11 | 11 |
| 12 class ContentExceptionsTableModel; | 12 class ContentExceptionsTableModel; |
| 13 class ContentSettingComboModel; |
| 13 class UpdatingContentSettingsObserver; | 14 class UpdatingContentSettingsObserver; |
| 14 | 15 |
| 15 // Controller for the content exception dialogs. | 16 // Controller for the content exception dialogs. |
| 16 @interface ContentExceptionsWindowController : NSWindowController | 17 @interface ContentExceptionsWindowController : NSWindowController |
| 17 <NSWindowDelegate, | 18 <NSWindowDelegate, |
| 18 NSTableViewDataSource, | 19 NSTableViewDataSource, |
| 19 NSTableViewDelegate> { | 20 NSTableViewDelegate> { |
| 20 @private | 21 @private |
| 21 IBOutlet NSTableView* tableView_; | 22 IBOutlet NSTableView* tableView_; |
| 22 IBOutlet NSButton* addButton_; | 23 IBOutlet NSButton* addButton_; |
| 23 IBOutlet NSButton* removeButton_; | 24 IBOutlet NSButton* removeButton_; |
| 24 IBOutlet NSButton* removeAllButton_; | 25 IBOutlet NSButton* removeAllButton_; |
| 25 IBOutlet NSButton* doneButton_; | 26 IBOutlet NSButton* doneButton_; |
| 26 | 27 |
| 27 ContentSettingsType settingsType_; | 28 ContentSettingsType settingsType_; |
| 28 HostContentSettingsMap* settingsMap_; // weak | 29 HostContentSettingsMap* settingsMap_; // weak |
| 29 HostContentSettingsMap* otrSettingsMap_; // weak | 30 HostContentSettingsMap* otrSettingsMap_; // weak |
| 30 scoped_ptr<ContentExceptionsTableModel> model_; | 31 scoped_ptr<ContentExceptionsTableModel> model_; |
| 31 | 32 scoped_ptr<ContentSettingComboModel> popup_model_; |
| 32 // Is set if "Session" should be a valid option in the "action" popup. | |
| 33 BOOL showSession_; | |
| 34 | 33 |
| 35 // Is set if adding and editing exceptions for the current OTR session should | 34 // Is set if adding and editing exceptions for the current OTR session should |
| 36 // be allowed. | 35 // be allowed. |
| 37 BOOL otrAllowed_; | 36 BOOL otrAllowed_; |
| 38 | 37 |
| 39 // Listens for changes to the content settings and reloads the data when they | 38 // Listens for changes to the content settings and reloads the data when they |
| 40 // change. See comment in -modelDidChange in the mm file for details. | 39 // change. See comment in -modelDidChange in the mm file for details. |
| 41 scoped_ptr<UpdatingContentSettingsObserver> tableObserver_; | 40 scoped_ptr<UpdatingContentSettingsObserver> tableObserver_; |
| 42 | 41 |
| 43 // If this is set to NO, notifications by |tableObserver_| are ignored. This | 42 // If this is set to NO, notifications by |tableObserver_| are ignored. This |
| (...skipping 22 matching lines...) Expand all Loading... |
| 66 - (IBAction)removeAllExceptions:(id)sender; | 65 - (IBAction)removeAllExceptions:(id)sender; |
| 67 // Closes the sheet and ends the modal loop. | 66 // Closes the sheet and ends the modal loop. |
| 68 - (IBAction)closeSheet:(id)sender; | 67 - (IBAction)closeSheet:(id)sender; |
| 69 | 68 |
| 70 @end | 69 @end |
| 71 | 70 |
| 72 @interface ContentExceptionsWindowController(VisibleForTesting) | 71 @interface ContentExceptionsWindowController(VisibleForTesting) |
| 73 - (void)cancel:(id)sender; | 72 - (void)cancel:(id)sender; |
| 74 - (BOOL)editingNewException; | 73 - (BOOL)editingNewException; |
| 75 @end | 74 @end |
| OLD | NEW |