Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / bookmarks / bookmark_tree_browser_cell.h
blob483270ed120a8a2415c4a8e62bfcdac8e82161b5
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>
10 namespace bookmarks {
11 class BookmarkNode;
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 {
20 @private
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.
26 id target_; // weak
27 SEL action_;
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
37 // exist.
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;
45 @end
47 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_TREE_BROWSER_CELL_H_