| 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 #import "base/mac/cocoa_protocols.h" | 7 #import "base/mac/cocoa_protocols.h" |
| 8 #include "net/base/cookie_monster.h" | 8 #include "net/base/cookie_monster.h" |
| 9 | 9 |
| 10 @class CocoaCookieTreeNode; | 10 @class CocoaCookieTreeNode; |
| 11 @class GTMUILocalizerAndLayoutTweaker; | 11 @class GTMUILocalizerAndLayoutTweaker; |
| 12 | 12 |
| 13 // Controller for the view that displays the details of a cookie, | 13 // Controller for the view that displays the details of a cookie, |
| 14 // used both in the cookie prompt dialog as well as the | 14 // used both in the cookie prompt dialog as well as the |
| 15 // show cookies preference sheet of content settings preferences. | 15 // show cookies preference sheet of content settings preferences. |
| 16 @interface CookieDetailsViewController : NSViewController { | 16 @interface CookieDetailsViewController : NSViewController { |
| 17 @private | 17 @private |
| 18 // Allows direct access to the object controller for | 18 // Allows direct access to the object controller for |
| 19 // the displayed cookie information. | 19 // the displayed cookie information. |
| 20 IBOutlet NSObjectController* objectController_; | 20 IBOutlet NSObjectController* objectController_; |
| 21 | 21 |
| 22 // This explicit reference to the layout tweaker is | 22 // This explicit reference to the layout tweaker is |
| 23 // required because it's necessary to reformat the view when | 23 // required because it's necessary to reformat the view when |
| 24 // the content object changes, since the content object may | 24 // the content object changes, since the content object may |
| 25 // alter the widths of some of the fields displayed in the view. | 25 // alter the widths of some of the fields displayed in the view. |
| 26 IBOutlet GTMUILocalizerAndLayoutTweaker* tweaker_; | 26 IBOutlet GTMUILocalizerAndLayoutTweaker* tweaker_; |
| 27 } | 27 } |
| 28 | 28 |
| 29 @property (nonatomic, readonly) BOOL hasExpiration; | 29 @property(nonatomic, readonly) BOOL hasExpiration; |
| 30 | 30 |
| 31 - (id)init; | 31 - (id)init; |
| 32 | 32 |
| 33 // Configures the cookie detail view that is managed by the controller | 33 // Configures the cookie detail view that is managed by the controller |
| 34 // to display the information about a single cookie, the information | 34 // to display the information about a single cookie, the information |
| 35 // for which is explicitly passed in the parameter |content|. | 35 // for which is explicitly passed in the parameter |content|. |
| 36 - (void)setContentObject:(id)content; | 36 - (void)setContentObject:(id)content; |
| 37 | 37 |
| 38 // Adjust the size of the view to exactly fix the information text fields | 38 // Adjust the size of the view to exactly fix the information text fields |
| 39 // that are visible inside it. | 39 // that are visible inside it. |
| 40 - (void)shrinkViewToFit; | 40 - (void)shrinkViewToFit; |
| 41 | 41 |
| 42 // Called by the cookie tree dialog to establish a binding between | 42 // Called by the cookie tree dialog to establish a binding between |
| 43 // the the detail view's object controller and the tree controller. | 43 // the the detail view's object controller and the tree controller. |
| 44 // This binding allows the cookie tree to use the detail view unmodified. | 44 // This binding allows the cookie tree to use the detail view unmodified. |
| 45 - (void)configureBindingsForTreeController:(NSTreeController*)controller; | 45 - (void)configureBindingsForTreeController:(NSTreeController*)controller; |
| 46 | 46 |
| 47 // Action sent by the expiration date popup when the user | 47 // Action sent by the expiration date popup when the user |
| 48 // selects the menu item "When I close my browser". | 48 // selects the menu item "When I close my browser". |
| 49 - (IBAction)setCookieDoesntHaveExplicitExpiration:(id)sender; | 49 - (IBAction)setCookieDoesntHaveExplicitExpiration:(id)sender; |
| 50 | 50 |
| 51 // Action sent by the expiration date popup when the user | 51 // Action sent by the expiration date popup when the user |
| 52 // selects the menu item with an explicit date/time of expiration. | 52 // selects the menu item with an explicit date/time of expiration. |
| 53 - (IBAction)setCookieHasExplicitExpiration:(id)sender; | 53 - (IBAction)setCookieHasExplicitExpiration:(id)sender; |
| 54 | 54 |
| 55 @end | 55 @end |
| 56 | 56 |
| OLD | NEW |