[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / bookmarks / bookmark_bar_unittest_helper.h
blob0d3ebd795b8dd07d257194f80cf66b5432eb41d4
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_UNITTEST_HELPER_H_
6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_UNITTEST_HELPER_H_
8 #import <Foundation/Foundation.h>
10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
11 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h"
12 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h"
14 @interface BookmarkBarController (BookmarkBarUnitTestHelper)
16 // Return the bookmark button from this bar controller with the given
17 // |title|, otherwise nil. This does not recurse into folders.
18 - (BookmarkButton*)buttonWithTitleEqualTo:(NSString*)title;
20 @end
23 @interface BookmarkBarFolderController (BookmarkBarUnitTestHelper)
25 // Return the bookmark button from this folder controller with the given
26 // |title|, otherwise nil. This does not recurse into subfolders.
27 - (BookmarkButton*)buttonWithTitleEqualTo:(NSString*)title;
29 @end
32 @interface BookmarkButton (BookmarkBarUnitTestHelper)
34 // Return the center of the button in the base coordinate system of the
35 // containing window. Useful for simulating mouse clicks or drags.
36 - (NSPoint)center;
38 // Return the top of the button in the base coordinate system of the
39 // containing window.
40 - (NSPoint)top;
42 // Return the bottom of the button in the base coordinate system of the
43 // containing window.
44 - (NSPoint)bottom;
46 // Return the center-left point of the button in the base coordinate system
47 // of the containing window.
48 - (NSPoint)left;
50 // Return the center-right point of the button in the base coordinate system
51 // of the containing window.
52 - (NSPoint)right;
54 @end
56 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_UNITTEST_HELPER_H_