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