blob: 818b8ba49bff401c6752ed20ae76dfa421dfbd6c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
// Copyright (c) 2010 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.
#ifndef CHROME_BROWSER_COCOA_APPLESCRIPT_BOOKMARK_NODE_APPLESCRIPT_H_
#define CHROME_BROWSER_COCOA_APPLESCRIPT_BOOKMARK_NODE_APPLESCRIPT_H_
#import <Cocoa/Cocoa.h>
#import "chrome/browser/cocoa/applescript/element_applescript.h"
class BookmarkModel;
class BookmarkNode;
// Contains all the elements that are common to both a bookmark folder and
// bookmark item.
@interface BookmarkNodeAppleScript : ElementAppleScript {
@protected
const BookmarkNode* bookmarkNode_; // weak.
// Contains the temporary title when a scripter creates a new folder/item with
// title specified like
// |make new bookmark folder with properties {title:"foo"}|.
NSString* tempTitle_;
}
// Does not actually create a folder/item but just sets its ID, the folder is
// created in insertInBookmarksFolder: in the corresponding bookmarks folder.
- (id)init;
// Does not make a folder/item but instead uses an existing one.
- (id)initWithBookmarkNode:(const BookmarkNode*)aBookmarkNode;
// Assigns a node, sets its unique ID and also copies temporary values.
- (void)setBookmarkNode:(const BookmarkNode*)aBookmarkNode;
// Get and Set title.
- (NSString*)title;
- (void)setTitle:(NSString*)aTitle;
// Returns the bookmark model of the browser, returns NULL if there is an error.
- (BookmarkModel*)bookmarkModel;
@end
#endif // CHROME_BROWSER_COCOA_APPLESCRIPT_BOOKMARK_NODE_APPLESCRIPT_H_
|