| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #import <Cocoa/Cocoa.h> | |
| 6 | |
| 7 #include "base/cocoa_protocols_mac.h" | |
| 8 #include "base/scoped_nsobject.h" | |
| 9 | |
| 10 class CookiePromptModalDialog; | |
| 11 class CookieTreeNode; | |
| 12 | |
| 13 @class CookieDetailsViewController; | |
| 14 @class CocoaCookieTreeNode; | |
| 15 | |
| 16 // This class is the controller for the window displayed | |
| 17 // to the user as a modal dialog prompting them to accept or | |
| 18 // block new cookies and other browser data. | |
| 19 @interface CookiePromptWindowController : NSWindowController { | |
| 20 @private | |
| 21 // Provides access to platform independent information for | |
| 22 // the cookie prompt dialog. | |
| 23 CookiePromptModalDialog* dialog_; // weak; | |
| 24 | |
| 25 // The controller managing the instances of the cookies details view | |
| 26 // embedded in the prompt window. | |
| 27 scoped_nsobject<CookieDetailsViewController> detailsViewController_; | |
| 28 | |
| 29 // The adapter object that supplies the methods expected by | |
| 30 // the cookie details view. | |
| 31 scoped_nsobject<NSObject> selectionAdapterObject_; | |
| 32 | |
| 33 // Outlets to provide quick access to subviews | |
| 34 // in the prompt window. | |
| 35 IBOutlet NSTextField* description_; | |
| 36 IBOutlet NSView* disclosedViewPlaceholder_; | |
| 37 IBOutlet NSButton* disclosureButton_; | |
| 38 IBOutlet NSView* disclosureButtonSuperView_; | |
| 39 IBOutlet NSMatrix* radioGroupMatrix_; | |
| 40 IBOutlet NSButtonCell* rememberChoiceCell_; | |
| 41 } | |
| 42 | |
| 43 // Designated initializer. | |
| 44 - (id)initWithDialog:(CookiePromptModalDialog*)bridge; | |
| 45 | |
| 46 // Performs the modal dialog loop for the cookie prompt dialog | |
| 47 // and processes the result. | |
| 48 - (void)doModalDialog:(void*)context; | |
| 49 | |
| 50 // Handles the toggling of the disclosure triangle | |
| 51 // to reveal cookie data | |
| 52 - (IBAction)disclosureButtonPressed:(id)sender; | |
| 53 | |
| 54 // Callback for "block" button. | |
| 55 - (IBAction)block:(id)sender; | |
| 56 | |
| 57 // Callback for "accept" button. | |
| 58 - (IBAction)accept:(id)sender; | |
| 59 | |
| 60 // Processes the selection result code made in the cookie prompt. | |
| 61 // Part of the public interface for the tests. | |
| 62 - (void)processModalDialogResult:(void*)contextInfo | |
| 63 returnCode:(int)returnCode; | |
| 64 | |
| 65 @end | |
| OLD | NEW |