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

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

Issue 151283006: Mac OS X: Show the Translate icon on Omnibox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue-307352-translate-bubble-2
Patch Set: Use kAnimateNone Created 6 years, 9 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) 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 "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 - (void)focusLocationBar:(BOOL)selectAll; 115 - (void)focusLocationBar:(BOOL)selectAll;
116 116
117 // Forces the toolbar (and transitively the location bar) to update its current 117 // Forces the toolbar (and transitively the location bar) to update its current
118 // state. If |tab| is non-NULL, we're switching (back?) to this tab and should 118 // state. If |tab| is non-NULL, we're switching (back?) to this tab and should
119 // restore any previous location bar state (such as user editing) as well. 119 // restore any previous location bar state (such as user editing) as well.
120 - (void)updateToolbarWithContents:(content::WebContents*)tab; 120 - (void)updateToolbarWithContents:(content::WebContents*)tab;
121 121
122 // Sets whether or not the current page in the frontmost tab is bookmarked. 122 // Sets whether or not the current page in the frontmost tab is bookmarked.
123 - (void)setStarredState:(BOOL)isStarred; 123 - (void)setStarredState:(BOOL)isStarred;
124 124
125 // Sets whether or not the current page is translated.
126 - (void)setTranslateIconLit:(BOOL)on;
127
125 // Happens when the zoom for the active tab changes, the active tab switches, or 128 // Happens when the zoom for the active tab changes, the active tab switches, or
126 // a new tab or browser window is created. |canShowBubble| indicates if it is 129 // a new tab or browser window is created. |canShowBubble| indicates if it is
127 // appropriate to show a zoom bubble for the change. 130 // appropriate to show a zoom bubble for the change.
128 - (void)zoomChangedForActiveTab:(BOOL)canShowBubble; 131 - (void)zoomChangedForActiveTab:(BOOL)canShowBubble;
129 132
130 // Called to update the loading state. Handles updating the go/stop 133 // Called to update the loading state. Handles updating the go/stop
131 // button state. |force| is set if the update is due to changing 134 // button state. |force| is set if the update is due to changing
132 // tabs, as opposed to the page-load finishing. See comment in 135 // tabs, as opposed to the page-load finishing. See comment in
133 // reload_button.h. 136 // reload_button.h.
134 - (void)setIsLoading:(BOOL)isLoading force:(BOOL)force; 137 - (void)setIsLoading:(BOOL)isLoading force:(BOOL)force;
135 138
136 // Allow turning off the toolbar (but we may keep the location bar without a 139 // Allow turning off the toolbar (but we may keep the location bar without a
137 // surrounding toolbar). If |toolbar| is YES, the value of |hasLocationBar| is 140 // surrounding toolbar). If |toolbar| is YES, the value of |hasLocationBar| is
138 // ignored. This changes the behavior of other methods, like |-view|. 141 // ignored. This changes the behavior of other methods, like |-view|.
139 - (void)setHasToolbar:(BOOL)toolbar hasLocationBar:(BOOL)locBar; 142 - (void)setHasToolbar:(BOOL)toolbar hasLocationBar:(BOOL)locBar;
140 143
141 // Point on the star icon for the bookmark bubble to be - in the 144 // Point on the star icon for the bookmark bubble to be - in the
142 // associated window's coordinate system. 145 // associated window's coordinate system.
143 - (NSPoint)bookmarkBubblePoint; 146 - (NSPoint)bookmarkBubblePoint;
144 147
148 // Point on the translate icon fot the Translate bubble.
149 - (NSPoint)translateBubblePoint;
150
145 // Returns the desired toolbar height for the given compression factor. 151 // Returns the desired toolbar height for the given compression factor.
146 - (CGFloat)desiredHeightForCompression:(CGFloat)compressByHeight; 152 - (CGFloat)desiredHeightForCompression:(CGFloat)compressByHeight;
147 153
148 // Set the opacity of the divider (the line at the bottom) *if* we have a 154 // Set the opacity of the divider (the line at the bottom) *if* we have a
149 // |ToolbarView| (0 means don't show it); no-op otherwise. 155 // |ToolbarView| (0 means don't show it); no-op otherwise.
150 - (void)setDividerOpacity:(CGFloat)opacity; 156 - (void)setDividerOpacity:(CGFloat)opacity;
151 157
152 // Create and add the Browser Action buttons to the toolbar view. 158 // Create and add the Browser Action buttons to the toolbar view.
153 - (void)createBrowserActionButtons; 159 - (void)createBrowserActionButtons;
154 160
(...skipping 28 matching lines...) Expand all
183 // Returns an array of views in the order of the outlets above. 189 // Returns an array of views in the order of the outlets above.
184 - (NSArray*)toolbarViews; 190 - (NSArray*)toolbarViews;
185 - (void)showOptionalHomeButton; 191 - (void)showOptionalHomeButton;
186 - (void)installWrenchMenu; 192 - (void)installWrenchMenu;
187 - (WrenchMenuController*)wrenchMenuController; 193 - (WrenchMenuController*)wrenchMenuController;
188 // Return a hover button for the current event. 194 // Return a hover button for the current event.
189 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent; 195 - (NSButton*)hoverButtonForEvent:(NSEvent*)theEvent;
190 @end 196 @end
191 197
192 #endif // CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_ 198 #endif // CHROME_BROWSER_UI_COCOA_TOOLBAR_TOOLBAR_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/translate_decoration.mm ('k') | chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698