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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/toolbar_controller.h

Issue 2511043002: [Mac] Omnibox icons active states (Closed)
Patch Set: Cleaned up Created 4 years, 1 month 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_TOOLBAR_TOOLBAR_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/mac/scoped_nsobject.h" 12 #include "base/mac/scoped_nsobject.h"
13 #import "chrome/browser/ui/cocoa/has_weak_browser_pointer.h" 13 #import "chrome/browser/ui/cocoa/has_weak_browser_pointer.h"
14 #import "chrome/browser/ui/cocoa/url_drop_target.h" 14 #import "chrome/browser/ui/cocoa/url_drop_target.h"
15 #import "chrome/browser/ui/cocoa/view_resizer.h" 15 #import "chrome/browser/ui/cocoa/view_resizer.h"
16 #include "components/prefs/pref_member.h" 16 #include "components/prefs/pref_member.h"
17 #import "ui/base/cocoa/tracking_area.h" 17 #import "ui/base/cocoa/tracking_area.h"
18 18
19 @class AutocompleteTextField; 19 @class AutocompleteTextField;
20 @class AutocompleteTextFieldEditor; 20 @class AutocompleteTextFieldEditor;
21 @class BackForwardMenuController; 21 @class BackForwardMenuController;
22 class Browser; 22 class Browser;
23 @class BrowserActionsContainerView; 23 @class BrowserActionsContainerView;
24 class BrowserActionsContainerViewSizeDelegate; 24 class BrowserActionsContainerViewSizeDelegate;
25 @class BrowserActionsController; 25 @class BrowserActionsController;
26 class CommandUpdater; 26 class CommandUpdater;
27 class LocationBarDecoration;
27 class LocationBarViewMac; 28 class LocationBarViewMac;
28 @class MenuButton; 29 @class MenuButton;
29 class Profile; 30 class Profile;
30 @class ReloadButton; 31 @class ReloadButton;
31 @class ToolbarButton; 32 @class ToolbarButton;
32 @class AppMenuController; 33 @class AppMenuController;
33 34
34 namespace content { 35 namespace content {
35 class WebContents; 36 class WebContents;
36 } 37 }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // ignored. This changes the behavior of other methods, like |-view|. 159 // ignored. This changes the behavior of other methods, like |-view|.
159 - (void)setHasToolbar:(BOOL)toolbar hasLocationBar:(BOOL)locBar; 160 - (void)setHasToolbar:(BOOL)toolbar hasLocationBar:(BOOL)locBar;
160 161
161 // Point on the star icon for the bookmark bubble to be - in the 162 // Point on the star icon for the bookmark bubble to be - in the
162 // associated window's coordinate system. 163 // associated window's coordinate system.
163 - (NSPoint)bookmarkBubblePoint; 164 - (NSPoint)bookmarkBubblePoint;
164 165
165 // Point on the save credit card icon for the save credit card bubble. 166 // Point on the save credit card icon for the save credit card bubble.
166 - (NSPoint)saveCreditCardBubblePoint; 167 - (NSPoint)saveCreditCardBubblePoint;
167 168
168 // Point on the translate icon for the Translate bubble. 169 // Point on the given |decoration| for its associated bubble.
169 - (NSPoint)translateBubblePoint; 170 - (NSPoint)bubblePointForDecoration:(LocationBarDecoration*)decoration;
171
172 // Returns the star icon decoration in the omnibox.
173 - (LocationBarDecoration*)bookmarkDecoration;
Robert Sesek 2016/11/21 19:28:23 Per the previous comment, by injecting the Locatio
spqchan 2016/11/23 22:58:54 The bubble classes still need to access the decora
174
175 // Returns the translate icon decoration in the omnibox.
176 - (LocationBarDecoration*)translateDecoration;
170 177
171 // Returns the desired toolbar height for the given compression factor. 178 // Returns the desired toolbar height for the given compression factor.
172 - (CGFloat)desiredHeightForCompression:(CGFloat)compressByHeight; 179 - (CGFloat)desiredHeightForCompression:(CGFloat)compressByHeight;
173 180
174 // Set the opacity of the divider (the line at the bottom) *if* we have a 181 // Set the opacity of the divider (the line at the bottom) *if* we have a
175 // |ToolbarView| (0 means don't show it); no-op otherwise. 182 // |ToolbarView| (0 means don't show it); no-op otherwise.
176 - (void)setDividerOpacity:(CGFloat)opacity; 183 - (void)setDividerOpacity:(CGFloat)opacity;
177 184
178 // Create and add the Browser Action buttons to the toolbar view. 185 // Create and add the Browser Action buttons to the toolbar view.
179 - (void)createBrowserActionButtons; 186 - (void)createBrowserActionButtons;
(...skipping 19 matching lines...) Expand all
199 @interface ToolbarController(PrivateTestMethods) 206 @interface ToolbarController(PrivateTestMethods)
200 // Returns an array of views in the order of the outlets above. 207 // Returns an array of views in the order of the outlets above.
201 - (NSArray*)toolbarViews; 208 - (NSArray*)toolbarViews;
202 - (void)showOptionalHomeButton; 209 - (void)showOptionalHomeButton;
203 - (void)installAppMenu; 210 - (void)installAppMenu;
204 // Return a hover button for the current event. 211 // Return a hover button for the current event.
205 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent; 212 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent;
206 @end 213 @end
207 214
208 #endif // CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ 215 #endif // CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698