Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / applescript / browsercrapplication+applescript.h
blob795d198cfbb32e70a1150eed73720a8b4bfd6cf8
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_BROWSERCRAPPLICATION_APPLESCRIPT_H_
6 #define CHROME_BROWSER_UI_COCOA_APPLESCRIPT_BROWSERCRAPPLICATION_APPLESCRIPT_H_
8 #import <Cocoa/Cocoa.h>
10 #import "chrome/browser/chrome_browser_application_mac.h"
12 @class BookmarkFolderAppleScript;
13 @class WindowAppleScript;
15 // Represent the top level application scripting object in applescript.
16 @interface BrowserCrApplication (AppleScriptAdditions)
18 // Application window manipulation methods.
19 // Returns an array of |WindowAppleScript*| of all windows present in the
20 // application.
21 - (NSArray*)appleScriptWindows;
23 // Inserts a window at the beginning.
24 - (void)insertInAppleScriptWindows:(WindowAppleScript*)aWindow;
26 // Inserts a window at some position in the list.
27 // Called by applescript which takes care of bounds checking, make sure of it
28 // before calling directly.
29 - (void)insertInAppleScriptWindows:(WindowAppleScript*)aWindow
30 atIndex:(int)index;
32 // Removes a window from the list.
33 // Called by applescript which takes care of bounds checking, make sure of it
34 // before calling directly.
35 - (void)removeFromAppleScriptWindowsAtIndex:(int)index;
37 // Always returns nil to indicate that it is the root container object.
38 - (NSScriptObjectSpecifier*)objectSpecifier;
40 // Returns the other bookmarks bookmark folder,
41 // returns nil if there is an error.
42 - (BookmarkFolderAppleScript*)otherBookmarks;
44 // Returns the bookmarks bar bookmark folder, return nil if there is an error.
45 - (BookmarkFolderAppleScript*)bookmarksBar;
47 // Returns the Bookmarks Bar and Other Bookmarks Folders, each is of type
48 // |BookmarkFolderAppleScript*|.
49 - (NSArray*)bookmarkFolders;
51 // Required functions, even though bookmarkFolders is declared as
52 // read-only, cocoa scripting does not currently prevent writing.
53 - (void)insertInBookmarksFolders:(id)aBookmarkFolder;
54 - (void)insertInBookmarksFolders:(id)aBookmarkFolder atIndex:(int)index;
55 - (void)removeFromBookmarksFoldersAtIndex:(int)index;
57 @end
59 #endif// CHROME_BROWSER_UI_COCOA_APPLESCRIPT_BROWSERCRAPPLICATION_APPLESCRIPT_H_