Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_mac.h

Issue 1858773006: [Extensions UI] Use the ExtensionMessageBubbleBridge for Views platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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_EXTENSIONS_TOOLBAR_ACTIONS_BAR_BUBBLE_MAC_H_ 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_ 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_TOOLBAR_ACTIONS_BAR_BUBBLE_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" 12 #import "chrome/browser/ui/cocoa/base_bubble_controller.h"
13 13
14 class ToolbarActionsBarBubbleDelegate; 14 class ToolbarActionsBarBubbleDelegate;
15 15
16 // A bubble that hangs off the toolbar actions bar, with a minimum of a heading, 16 // A bubble that hangs off the toolbar actions bar, with a minimum of a heading,
17 // some text content, and an "action" button. The bubble can also, optionally, 17 // some text content, and an "action" button. The bubble can also, optionally,
18 // have a learn more link and/or a dismiss button. 18 // have a learn more link and/or a dismiss button.
19 @interface ToolbarActionsBarBubbleMac : BaseBubbleController { 19 @interface ToolbarActionsBarBubbleMac : BaseBubbleController {
20 // Whether or not the bubble has been acknowledged. 20 // Whether or not the bubble has been acknowledged.
21 BOOL acknowledged_; 21 BOOL acknowledged_;
22 22
23 // True if the bubble is anchored to an action in the toolbar actions bar.
24 BOOL anchoredToAction_;
25
23 // The action button. The exact meaning of this is dependent on the bubble. 26 // The action button. The exact meaning of this is dependent on the bubble.
24 // Required. 27 // Required.
25 NSButton* actionButton_; 28 NSButton* actionButton_;
26 29
27 // The list of items to display. Optional. 30 // The list of items to display. Optional.
28 NSTextField* itemList_; 31 NSTextField* itemList_;
29 32
30 // The dismiss button. Optional. 33 // The dismiss button. Optional.
31 NSButton* dismissButton_; 34 NSButton* dismissButton_;
32 35
33 // The "learn more" link-style button. Optional. 36 // The "learn more" link-style button. Optional.
34 NSButton* learnMoreButton_; 37 NSButton* learnMoreButton_;
35 38
36 // This bubble's delegate. 39 // This bubble's delegate.
37 std::unique_ptr<ToolbarActionsBarBubbleDelegate> delegate_; 40 std::unique_ptr<ToolbarActionsBarBubbleDelegate> delegate_;
38 } 41 }
39 42
40 // Creates the bubble for a parent window but does not show it. 43 // Creates the bubble for a parent window but does not show it.
41 - (id)initWithParentWindow:(NSWindow*)parentWindow 44 - (id)initWithParentWindow:(NSWindow*)parentWindow
42 anchorPoint:(NSPoint)anchorPoint 45 anchorPoint:(NSPoint)anchorPoint
46 anchoredToAction:(BOOL)anchoredToAction
43 delegate:(std::unique_ptr<ToolbarActionsBarBubbleDelegate>) 47 delegate:(std::unique_ptr<ToolbarActionsBarBubbleDelegate>)
44 delegate; 48 delegate;
45 49
46 // Toggles animation for testing purposes. 50 // Toggles animation for testing purposes.
47 + (void)setAnimationEnabledForTesting:(BOOL)enabled; 51 + (void)setAnimationEnabledForTesting:(BOOL)enabled;
48 52
49 @property(readonly, nonatomic) NSButton* actionButton; 53 @property(readonly, nonatomic) NSButton* actionButton;
50 @property(readonly, nonatomic) NSTextField* itemList; 54 @property(readonly, nonatomic) NSTextField* itemList;
51 @property(readonly, nonatomic) NSButton* dismissButton; 55 @property(readonly, nonatomic) NSButton* dismissButton;
52 @property(readonly, nonatomic) NSButton* learnMoreButton; 56 @property(readonly, nonatomic) NSButton* learnMoreButton;
53 57
54 @end 58 @end
55 59
56 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_TOOLBAR_ACTIONS_BAR_BUBBLE_MAC_H_ 60 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_TOOLBAR_ACTIONS_BAR_BUBBLE_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698