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

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

Issue 2008763002: [Extensions UI] Remove all traces of the chevron (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 7 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 (c) 2011 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_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // Array of toolbar action buttons in the correct order for them to be 42 // Array of toolbar action buttons in the correct order for them to be
43 // displayed (includes both hidden and visible buttons). 43 // displayed (includes both hidden and visible buttons).
44 base::scoped_nsobject<NSMutableArray> buttons_; 44 base::scoped_nsobject<NSMutableArray> buttons_;
45 45
46 // The delegate for the ToolbarActionsBar. 46 // The delegate for the ToolbarActionsBar.
47 std::unique_ptr<ToolbarActionsBarDelegate> toolbarActionsBarBridge_; 47 std::unique_ptr<ToolbarActionsBarDelegate> toolbarActionsBarBridge_;
48 48
49 // The controlling ToolbarActionsBar. 49 // The controlling ToolbarActionsBar.
50 std::unique_ptr<ToolbarActionsBar> toolbarActionsBar_; 50 std::unique_ptr<ToolbarActionsBar> toolbarActionsBar_;
51 51
52 // True if we should supppress the chevron (we do this during drag
53 // animations).
54 BOOL suppressChevron_;
55
56 // True if this is the overflow container for toolbar actions. 52 // True if this is the overflow container for toolbar actions.
57 BOOL isOverflow_; 53 BOOL isOverflow_;
58 54
59 // The currently running chevron animation (fade in/out).
60 base::scoped_nsobject<NSViewAnimation> chevronAnimation_;
61
62 // The chevron button used when Browser Actions are hidden.
63 base::scoped_nsobject<MenuButton> chevronMenuButton_;
64
65 // The Browser Actions overflow menu.
66 base::scoped_nsobject<NSMenu> overflowMenu_;
67
68 // The bubble that is actively showing, if any. 55 // The bubble that is actively showing, if any.
69 ToolbarActionsBarBubbleMac* activeBubble_; 56 ToolbarActionsBarBubbleMac* activeBubble_;
70 57
71 // The index of the currently-focused view in the overflow menu, or -1 if 58 // The index of the currently-focused view in the overflow menu, or -1 if
72 // no view is focused. 59 // no view is focused.
73 NSInteger focusedViewIndex_; 60 NSInteger focusedViewIndex_;
74 } 61 }
75 62
76 @property(readonly, nonatomic) BrowserActionsContainerView* containerView; 63 @property(readonly, nonatomic) BrowserActionsContainerView* containerView;
77 @property(readonly, nonatomic) Browser* browser; 64 @property(readonly, nonatomic) Browser* browser;
(...skipping 20 matching lines...) Expand all
98 // container. 85 // container.
99 - (NSUInteger)visibleButtonCount; 86 - (NSUInteger)visibleButtonCount;
100 87
101 // Returns the preferred size for the container. 88 // Returns the preferred size for the container.
102 - (gfx::Size)preferredSize; 89 - (gfx::Size)preferredSize;
103 90
104 // Returns where the popup arrow should point to for the action with the given 91 // Returns where the popup arrow should point to for the action with the given
105 // |id|. If passed an id with no corresponding button, returns NSZeroPoint. 92 // |id|. If passed an id with no corresponding button, returns NSZeroPoint.
106 - (NSPoint)popupPointForId:(const std::string&)id; 93 - (NSPoint)popupPointForId:(const std::string&)id;
107 94
108 // Returns whether the chevron button is currently hidden or in the process of
109 // being hidden (fading out). Will return NO if it is not hidden or is in the
110 // process of fading in.
111 - (BOOL)chevronIsHidden;
112
113 // Returns the currently-active web contents. 95 // Returns the currently-active web contents.
114 - (content::WebContents*)currentWebContents; 96 - (content::WebContents*)currentWebContents;
115 97
116 // Returns the BrowserActionButton in the main browser actions container (as 98 // Returns the BrowserActionButton in the main browser actions container (as
117 // opposed to the overflow) for the action of the given id. 99 // opposed to the overflow) for the action of the given id.
118 - (BrowserActionButton*)mainButtonForId:(const std::string&)id; 100 - (BrowserActionButton*)mainButtonForId:(const std::string&)id;
119 101
120 // Returns the associated ToolbarActionsBar. 102 // Returns the associated ToolbarActionsBar.
121 - (ToolbarActionsBar*)toolbarActionsBar; 103 - (ToolbarActionsBar*)toolbarActionsBar;
122 104
123 // Sets whether or not the overflow container is focused in the app menu. 105 // Sets whether or not the overflow container is focused in the app menu.
124 - (void)setFocusedInOverflow:(BOOL)focused; 106 - (void)setFocusedInOverflow:(BOOL)focused;
125 107
126 // Returns the size for the provided |maxWidth| of the overflow menu. 108 // Returns the size for the provided |maxWidth| of the overflow menu.
127 - (gfx::Size)sizeForOverflowWidth:(int)maxWidth; 109 - (gfx::Size)sizeForOverflowWidth:(int)maxWidth;
128 110
129 @end // @interface BrowserActionsController 111 @end // @interface BrowserActionsController
130 112
131 @interface BrowserActionsController(TestingAPI) 113 @interface BrowserActionsController(TestingAPI)
132 - (BrowserActionButton*)buttonWithIndex:(NSUInteger)index; 114 - (BrowserActionButton*)buttonWithIndex:(NSUInteger)index;
133 @end 115 @end
134 116
135 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_ 117 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTIONS_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_properties.cc ('k') | chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698