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_APPLESCRIPT_BOOKMARK_NODE_APPLESCRIPT_H_
6 #define CHROME_BROWSER_UI_COCOA_APPLESCRIPT_BOOKMARK_NODE_APPLESCRIPT_H_
8 #import <Cocoa/Cocoa.h>
10 #import "chrome/browser/ui/cocoa/applescript/element_applescript.h"
17 // Contains all the elements that are common to both a bookmark folder and
19 @interface BookmarkNodeAppleScript
: ElementAppleScript
{
21 const bookmarks::BookmarkNode
* bookmarkNode_
; // weak.
22 // Contains the temporary title when a scripter creates a new folder/item with
23 // title specified like
24 // |make new bookmark folder with properties {title:"foo"}|.
28 // Does not actually create a folder/item but just sets its ID, the folder is
29 // created in insertInBookmarksFolder: in the corresponding bookmarks folder.
32 // Does not make a folder/item but instead uses an existing one.
33 - (id
)initWithBookmarkNode
:(const bookmarks::BookmarkNode
*)aBookmarkNode
;
35 // Assigns a node, sets its unique ID and also copies temporary values.
36 - (void)setBookmarkNode
:(const bookmarks::BookmarkNode
*)aBookmarkNode
;
40 - (void)setTitle
:(NSString
*)aTitle
;
42 // Returns the index with respect to its parent bookmark folder.
45 // Returns the bookmark model of the browser, returns NULL if there is an error.
46 - (bookmarks::BookmarkModel
*)bookmarkModel
;
50 #endif // CHROME_BROWSER_UI_COCOA_APPLESCRIPT_BOOKMARK_NODE_APPLESCRIPT_H_