OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_UNITTEST_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_UNITTEST_HELPER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_UNITTEST_HELPER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_UNITTEST_HELPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #import <Foundation/Foundation.h> | 9 #import <Foundation/Foundation.h> |
10 | 10 |
11 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" | 11 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" |
12 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h" | 12 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h" |
13 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h" | 13 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h" |
14 | 14 |
15 // Returns the number of items in a given bookmark folder | |
16 NSUInteger GetNumberOfMenuItems(BookmarkBarFolderController* folder); | |
mrossetti
2011/08/04 02:16:27
Nit: How about just 'NumberOfMenuItems'?
Robert Sesek
2011/08/04 15:37:02
Done.
| |
17 | |
18 // Closes a bookmark menu folder after some delay. | |
19 void CloseFolderSoon(BookmarkBarFolderController* folder, NSTimeInterval when); | |
mrossetti
2011/08/04 02:16:27
Nit: 'when' should probably be 'delay' and I'd sug
Robert Sesek
2011/08/04 15:37:02
Done.
| |
20 | |
15 @interface BookmarkBarController (BookmarkBarUnitTestHelper) | 21 @interface BookmarkBarController (BookmarkBarUnitTestHelper) |
16 | 22 |
17 // Return the bookmark button from this bar controller with the given | 23 // Return the bookmark button from this bar controller with the given |
18 // |title|, otherwise nil. This does not recurse into folders. | 24 // |title|, otherwise nil. This does not recurse into folders. |
19 - (BookmarkButton*)buttonWithTitleEqualTo:(NSString*)title; | 25 - (BookmarkButton*)buttonWithTitleEqualTo:(NSString*)title; |
20 | 26 |
21 @end | 27 @end |
22 | 28 |
23 | 29 |
24 @interface BookmarkBarFolderController (BookmarkBarUnitTestHelper) | |
25 | |
26 // Return the bookmark button from this folder controller with the given | |
27 // |title|, otherwise nil. This does not recurse into subfolders. | |
28 - (BookmarkButton*)buttonWithTitleEqualTo:(NSString*)title; | |
29 | |
30 @end | |
31 | |
32 | |
33 @interface BookmarkButton (BookmarkBarUnitTestHelper) | 30 @interface BookmarkButton (BookmarkBarUnitTestHelper) |
34 | 31 |
35 // Return the center of the button in the base coordinate system of the | 32 // Return the center of the button in the base coordinate system of the |
36 // containing window. Useful for simulating mouse clicks or drags. | 33 // containing window. Useful for simulating mouse clicks or drags. |
37 - (NSPoint)center; | 34 - (NSPoint)center; |
38 | 35 |
39 // Return the top of the button in the base coordinate system of the | 36 // Return the top of the button in the base coordinate system of the |
40 // containing window. | 37 // containing window. |
41 - (NSPoint)top; | 38 - (NSPoint)top; |
42 | 39 |
43 // Return the bottom of the button in the base coordinate system of the | 40 // Return the bottom of the button in the base coordinate system of the |
44 // containing window. | 41 // containing window. |
45 - (NSPoint)bottom; | 42 - (NSPoint)bottom; |
46 | 43 |
47 // Return the center-left point of the button in the base coordinate system | 44 // Return the center-left point of the button in the base coordinate system |
48 // of the containing window. | 45 // of the containing window. |
49 - (NSPoint)left; | 46 - (NSPoint)left; |
50 | 47 |
51 // Return the center-right point of the button in the base coordinate system | 48 // Return the center-right point of the button in the base coordinate system |
52 // of the containing window. | 49 // of the containing window. |
53 - (NSPoint)right; | 50 - (NSPoint)right; |
54 | 51 |
55 @end | 52 @end |
56 | 53 |
57 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_UNITTEST_HELPER_H_ | 54 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_UNITTEST_HELPER_H_ |
OLD | NEW |