OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_COCOA_APPLESCRIPT_BOOKMARK_FOLDER_APPLESCRIPT_H_ | 5 #ifndef CHROME_BROWSER_COCOA_APPLESCRIPT_BOOKMARK_FOLDER_APPLESCRIPT_H_ |
6 #define CHROME_BROWSER_COCOA_APPLESCRIPT_BOOKMARK_FOLDER_APPLESCRIPT_H_ | 6 #define CHROME_BROWSER_COCOA_APPLESCRIPT_BOOKMARK_FOLDER_APPLESCRIPT_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #import "chrome/browser/cocoa/applescript/bookmark_node_applescript.h" | 10 #import "chrome/browser/cocoa/applescript/bookmark_node_applescript.h" |
11 | 11 |
| 12 @class BookmarkItemAppleScript; |
| 13 |
12 // Represent a bookmark folder scriptable object in applescript. | 14 // Represent a bookmark folder scriptable object in applescript. |
13 @interface BookmarkFolderAppleScript : BookmarkNodeAppleScript { | 15 @interface BookmarkFolderAppleScript : BookmarkNodeAppleScript { |
14 | 16 |
15 } | 17 } |
16 | 18 |
17 // Bookmark folder manipulation methods. | 19 // Bookmark folder manipulation methods. |
18 // Returns an array of |BookmarkFolderAppleScript*| of all the bookmark folders | 20 // Returns an array of |BookmarkFolderAppleScript*| of all the bookmark folders |
19 // contained within this particular folder. | 21 // contained within this particular folder. |
20 - (NSArray*)bookmarkFolders; | 22 - (NSArray*)bookmarkFolders; |
21 | 23 |
22 // Inserts a bookmark folder at the end. | 24 // Inserts a bookmark folder at the end. |
23 - (void)insertInBookmarkFolders:(id)aBookmarkFolder; | 25 - (void)insertInBookmarkFolders:(id)aBookmarkFolder; |
24 | 26 |
25 // Inserts a bookmark folder at some position in the list. | 27 // Inserts a bookmark folder at some position in the list. |
26 // Called by applescript which takes care of bounds checking, make sure of it | 28 // Called by applescript which takes care of bounds checking, make sure of it |
27 // before calling directly. | 29 // before calling directly. |
28 - (void)insertInBookmarkFolders:(id)aBookmarkFolder atIndex:(int)index; | 30 - (void)insertInBookmarkFolders:(id)aBookmarkFolder atIndex:(int)index; |
29 | 31 |
30 // Remove a bookmark folder from the list. | 32 // Remove a bookmark folder from the list. |
31 // Called by applescript which takes care of bounds checking, make sure of it | 33 // Called by applescript which takes care of bounds checking, make sure of it |
32 // before calling directly. | 34 // before calling directly. |
33 - (void)removeFromBookmarkFoldersAtIndex:(int)index; | 35 - (void)removeFromBookmarkFoldersAtIndex:(int)index; |
34 | 36 |
35 // Bookmark item manipulation methods. | 37 // Bookmark item manipulation methods. |
36 // Returns an array of |BookmarkItemAppleScript*| of all the bookmark items | 38 // Returns an array of |BookmarkItemAppleScript*| of all the bookmark items |
37 // contained within this particular folder. | 39 // contained within this particular folder. |
38 - (NSArray*)bookmarkItems; | 40 - (NSArray*)bookmarkItems; |
39 | 41 |
40 // Inserts a bookmark item at the end. | 42 // Inserts a bookmark item at the end. |
41 - (void)insertInBookmarkItems:(id)aBookmarkItem; | 43 - (void)insertInBookmarkItems:(BookmarkItemAppleScript*)aBookmarkItem; |
42 | 44 |
43 // Inserts a bookmark item at some position in the list. | 45 // Inserts a bookmark item at some position in the list. |
44 // Called by applescript which takes care of bounds checking, make sure of it | 46 // Called by applescript which takes care of bounds checking, make sure of it |
45 // before calling directly. | 47 // before calling directly. |
46 - (void)insertInBookmarkItems:(id)aBookmarkItem atIndex:(int)index; | 48 - (void)insertInBookmarkItems:(BookmarkItemAppleScript*)aBookmarkItem |
| 49 atIndex:(int)index; |
47 | 50 |
48 // Removes a bookmarks folder from the list. | 51 // Removes a bookmarks folder from the list. |
49 // Called by applescript which takes care of bounds checking, make sure of it | 52 // Called by applescript which takes care of bounds checking, make sure of it |
50 // before calling directly. | 53 // before calling directly. |
51 - (void)removeFromBookmarkItemsAtIndex:(int)index; | 54 - (void)removeFromBookmarkItemsAtIndex:(int)index; |
52 | 55 |
53 // Returns the position of a bookmark folder within the current bookmark folder | 56 // Returns the position of a bookmark folder within the current bookmark folder |
54 // which consists of bookmark folders as well as bookmark items. | 57 // which consists of bookmark folders as well as bookmark items. |
55 // AppleScript makes sure that there is a bookmark folder before calling this | 58 // AppleScript makes sure that there is a bookmark folder before calling this |
56 // method, make sure of that before calling directly. | 59 // method, make sure of that before calling directly. |
57 - (int)calculatePositionOfBookmarkFolderAt:(int)index; | 60 - (int)calculatePositionOfBookmarkFolderAt:(int)index; |
58 | 61 |
59 // Returns the position of a bookmark item within the current bookmark folder | 62 // Returns the position of a bookmark item within the current bookmark folder |
60 // which consists of bookmark folders as well as bookmark items. | 63 // which consists of bookmark folders as well as bookmark items. |
61 // AppleScript makes sure that there is a bookmark item before calling this | 64 // AppleScript makes sure that there is a bookmark item before calling this |
62 // method, make sure of that before calling directly. | 65 // method, make sure of that before calling directly. |
63 - (int)calculatePositionOfBookmarkItemAt:(int)index; | 66 - (int)calculatePositionOfBookmarkItemAt:(int)index; |
64 | 67 |
65 @end | 68 @end |
66 | 69 |
67 #endif // CHROME_BROWSER_COCOA_APPLESCRIPT_BOOKMARK_FOLDER_APPLESCRIPT_H_ | 70 #endif // CHROME_BROWSER_COCOA_APPLESCRIPT_BOOKMARK_FOLDER_APPLESCRIPT_H_ |
OLD | NEW |