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

Unified Diff: chrome/browser/cocoa/translate/translate_infobar_base.h

Issue 2804035: Clean up mac translate bars. (Closed)
Patch Set: Fixes. Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/translate/translate_infobar_base.h
diff --git a/chrome/browser/cocoa/translate/translate_infobar_base.h b/chrome/browser/cocoa/translate/translate_infobar_base.h
index 8d15e3862b0586b71dd939af770157416eba846a..befa37c6e5595abf3a230168b4cedfd2de617f41 100644
--- a/chrome/browser/cocoa/translate/translate_infobar_base.h
+++ b/chrome/browser/cocoa/translate/translate_infobar_base.h
@@ -83,6 +83,12 @@ void AddMenuItem(NSMenu *menu, id target, SEL selector, NSString* title,
@interface TranslateInfoBarControllerBase (ProtectedAPI)
+// Resizes or hides the options button based on how much space is available
+// so that it doesn't overlap other buttons.
+// lastView is the rightmost view, the first one that the options button
+// would overlap with.
+- (void)adjustOptionsButtonSizeAndVisibilityForView:(NSView*)lastView;
+
// Move all the currently visible views into the correct place for the
// current mode.
// Must be implemented by the subclass.
@@ -118,8 +124,10 @@ void AddMenuItem(NSMenu *menu, id target, SEL selector, NSString* title,
- (void)languageMenuChanged:(id)item;
- (void)optionsMenuChanged:(id)item;
-// Teardown and rebuild the options menu.
-- (void)rebuildOptionsMenu;
+// Teardown and rebuild the options menu. When the infobar is small, the
+// options menu is shrunk to just a drop down arrow, so the title needs
+// to be empty.
+- (void)rebuildOptionsMenu:(BOOL)hideTitle;
@end // TranslateInfoBarControllerBase (ProtectedAPI)
@@ -127,6 +135,11 @@ void AddMenuItem(NSMenu *menu, id target, SEL selector, NSString* title,
@interface TranslateInfoBarControllerBase (TestingAPI)
+// All the controls used in any of the translate states.
+// This is used for verifying layout and for setting the
+// correct styles on each button.
+- (NSArray*)allControls;
+
// Verifies that the layout of the infobar is correct.
// Must be implmented by the subclass.
- (bool)verifyLayout;

Powered by Google App Engine
This is Rietveld 408576698