1 // Copyright 2015 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_EXTENSIONS_TOOLBAR_ACTIONS_BAR_BUBBLE_MAC_H_
6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_TOOLBAR_ACTIONS_BAR_BUBBLE_MAC_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/memory/scoped_ptr.h"
11 #import "chrome/browser/ui/cocoa/base_bubble_controller.h"
13 class ToolbarActionsBarBubbleDelegate
;
15 // A bubble that hangs off the toolbar actions bar, with a minimum of a heading,
16 // some text content, and an "action" button. The bubble can also, optionally,
17 // have a learn more link and/or a dismiss button.
18 @interface ToolbarActionsBarBubbleMac
: BaseBubbleController
{
19 // Whether or not the bubble has been acknowledged.
22 // The action button. The exact meaning of this is dependent on the bubble.
24 NSButton
* actionButton_
;
26 // The list of items to display. Optional.
27 NSTextField
* itemList_
;
29 // The dismiss button. Optional.
30 NSButton
* dismissButton_
;
32 // The "learn more" link-style button. Optional.
33 NSButton
* learnMoreButton_
;
35 // This bubble's delegate.
36 scoped_ptr
<ToolbarActionsBarBubbleDelegate
> delegate_
;
39 // Creates the bubble for a parent window but does not show it.
40 - (id
)initWithParentWindow
:(NSWindow
*)parentWindow
41 anchorPoint
:(NSPoint
)anchorPoint
42 delegate
:(scoped_ptr
<ToolbarActionsBarBubbleDelegate
>)
45 // Toggles animation for testing purposes.
46 + (void)setAnimationEnabledForTesting
:(BOOL
)enabled
;
48 @
property(readonly
, nonatomic
) NSButton
* actionButton
;
49 @
property(readonly
, nonatomic
) NSTextField
* itemList
;
50 @
property(readonly
, nonatomic
) NSButton
* dismissButton
;
51 @
property(readonly
, nonatomic
) NSButton
* learnMoreButton
;
55 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_TOOLBAR_ACTIONS_BAR_BUBBLE_MAC_H_