Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Unified Diff: chrome/browser/cocoa/cookie_tree_node.h

Issue 523025: [Mac] Implement the cookie manager (Closed)
Patch Set: Address all comments Created 10 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/nibs/Preferences.xib ('k') | chrome/browser/cocoa/cookie_tree_node.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/cookie_tree_node.h
diff --git a/chrome/browser/cocoa/cookie_tree_node.h b/chrome/browser/cocoa/cookie_tree_node.h
new file mode 100644
index 0000000000000000000000000000000000000000..5ff66958a3fc5fde366cddf51ae51ddcc872a806
--- /dev/null
+++ b/chrome/browser/cocoa/cookie_tree_node.h
@@ -0,0 +1,56 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/scoped_nsobject.h"
+#include "chrome/browser/cookies_tree_model.h"
+
+// This class is used by CookiesWindowController and represents a node in the
+// cookie tree view.
+@interface CocoaCookieTreeNode : NSObject {
+ scoped_nsobject<NSString> title_;
+ scoped_nsobject<NSMutableArray> children_;
+
+ // The platform-independent model node.
+ CookieTreeNode* treeNode_; // weak
+
+ // These members are only set for true cookie nodes.
+ BOOL isCookie_;
+ scoped_nsobject<NSString> name_;
+ scoped_nsobject<NSString> content_;
+ scoped_nsobject<NSString> domain_;
+ scoped_nsobject<NSString> path_;
+ scoped_nsobject<NSString> sendFor_;
+ // Stringifed dates.
+ scoped_nsobject<NSString> created_;
+ scoped_nsobject<NSString> expires_;
+}
+
+// Designated initializer.
+- (id)initWithNode:(CookieTreeNode*)node;
+
+// Re-sets all the members of the node based on |treeNode_|.
+- (void)rebuild;
+
+- (BOOL)isLeaf;
+
+// Getters.
+- (NSString*)title;
+// |-children| is mutable so that the CookiesTreeModelObserverBridge can
+// operate on the children.
+- (NSMutableArray*)children;
+- (TreeModelNode*)treeNode;
+
+// Used only by cookies. Nil for non-cookie nodes.
+- (BOOL)isCookie;
+- (NSString*)name;
+- (NSString*)content;
+- (NSString*)domain;
+- (NSString*)path;
+- (NSString*)sendFor;
+- (NSString*)created;
+- (NSString*)expires;
+
+@end
« no previous file with comments | « chrome/app/nibs/Preferences.xib ('k') | chrome/browser/cocoa/cookie_tree_node.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698