summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/cookie_tree_node.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/cocoa/cookie_tree_node.h')
-rw-r--r--chrome/browser/cocoa/cookie_tree_node.h72
1 files changed, 4 insertions, 68 deletions
diff --git a/chrome/browser/cocoa/cookie_tree_node.h b/chrome/browser/cocoa/cookie_tree_node.h
index 66f5851..827c784 100644
--- a/chrome/browser/cocoa/cookie_tree_node.h
+++ b/chrome/browser/cocoa/cookie_tree_node.h
@@ -6,56 +6,13 @@
#include "base/scoped_nsobject.h"
#include "chrome/browser/cookies_tree_model.h"
+#include "chrome/browser/cocoa/cookie_details.h"
-// This enum specifies the type of display node a CocoaCookieTreeNode is. If
-// this system is rewritten to not use bindings, this class should be
-// subclassed and specialized, rather than using an enum to determine type.
-enum CocoaCookieTreeNodeType {
- // Represents grouping data for the actual data.
- kCocoaCookieTreeNodeTypeFolder = 0,
-
- // A cookie node.
- kCocoaCookieTreeNodeTypeCookie = 1,
-
- // A HTML5 database storage node.
- kCocoaCookieTreeNodeTypeDatabaseStorage = 2,
-
- // A local storage node.
- kCocoaCookieTreeNodeTypeLocalStorage = 3
-};
-
-// 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_;
-
- CocoaCookieTreeNodeType nodeType_;
-
- // The platform-independent model node.
+ scoped_nsobject<CocoaCookieDetails> details_;
CookieTreeNode* treeNode_; // weak
-
- // These members are only set for kCocoaCookieTreeNodeTypeCookie nodes.
- scoped_nsobject<NSString> name_;
- scoped_nsobject<NSString> content_;
- scoped_nsobject<NSString> path_;
- scoped_nsobject<NSString> sendFor_;
- // Stringifed dates.
- scoped_nsobject<NSString> created_;
- scoped_nsobject<NSString> expires_;
-
- // These members are only set for kCocoaCookieTreeNodeTypeLocalStorage
- // and kCocoaCookieTreeNodeTypeDatabaseStorage nodes.
- scoped_nsobject<NSString> fileSize_;
- scoped_nsobject<NSString> lastModified_;
-
- // These members are only set for kCocoaCookieTreeNodeTypeCookie and
- // kCocoaCookieTreeNodeTypeLocalStorage nodes.
- scoped_nsobject<NSString> domain_;
-
- // These members are used only for nodes of type
- // kCocoaCookieTreeNodeTypeDatabaseStorage.
- scoped_nsobject<NSString> databaseDescription_;
}
// Designated initializer.
@@ -66,7 +23,7 @@ enum CocoaCookieTreeNodeType {
// Common getters..
- (NSString*)title;
-- (CocoaCookieTreeNodeType)nodeType;
+- (CocoaCookieDetailsType)nodeType;
- (TreeModelNode*)treeNode;
// |-mutableChildren| exists so that the CookiesTreeModelObserverBridge can
@@ -75,27 +32,6 @@ enum CocoaCookieTreeNodeType {
- (NSArray*)children;
- (BOOL)isLeaf;
-- (BOOL)isFolderOrCookieTreeDetails;
-- (BOOL)isLocalStorageTreeDetails;
-- (BOOL)isDatabaseTreeDetails;
-- (BOOL)isLocalStoragePromptDetails;
-- (BOOL)isDatabasePromptDetails;
-
-// Used only by kCocoaCookieTreeNodeTypeCookie. Nil for other types.
-- (NSString*)name;
-- (NSString*)content;
-- (NSString*)domain;
-- (NSString*)path;
-- (NSString*)sendFor;
-- (NSString*)created;
-- (NSString*)expires;
-
-// Used by kCocoaCookieTreeNodeTypeLocalStorage and
-// kCocoaCookieTreeNodeTypeDatabaseStorage nodes. Nil for other types.
-- (NSString*)fileSize;
-- (NSString*)lastModified;
-
-// Used by kCocoaCookieTreeNodeTypeDatabaseStorage nodes. Nil for other types.
-- (NSString*)databaseDescription;
+- (CocoaCookieDetails*)details;
@end