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.
5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_TREE_BROWSER_CELL_H_
6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_TREE_BROWSER_CELL_H_
8 #import <Cocoa/Cocoa.h>
14 // Provides a custom cell as used in the BookmarkEditor.xib's folder tree
15 // browser view. This cell customization adds target and action support
16 // not provided by the NSBrowserCell as well as contextual information
17 // identifying the bookmark node being edited and the column matrix
18 // control in which is contained the cell.
19 @interface BookmarkTreeBrowserCell
: NSBrowserCell
{
21 const bookmarks::BookmarkNode
* bookmarkNode_
; // weak
22 NSMatrix
* matrix_
; // weak
24 // NSCell does not implement the |target| or |action| properties. Subclasses
25 // that need this functionality are expected to implement this functionality.
30 @
property(nonatomic
, assign
) NSMatrix
* matrix
;
32 #if !defined(MAC_OS_X_VERSION_10_10) || \
33 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10
34 // In OSX SDK <= 10.9, there are setters and getters for target and action in
35 // NSCell, but no properties. In the OSX 10.10 SDK, the properties are defined
36 // as atomic. There is no point in redeclaring the properties if they already
38 @
property(nonatomic
, assign
) id target
;
39 @
property(nonatomic
, assign
) SEL action
;
40 #endif // MAC_OS_X_VERSION_10_10
42 - (const bookmarks::BookmarkNode
*)bookmarkNode
;
43 - (void)setBookmarkNode
:(const bookmarks::BookmarkNode
*)bookmarkNode
;
47 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_TREE_BROWSER_CELL_H_