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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h

Issue 12042002: Alternate NTP: Add search token to omnibox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 7 years, 11 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/ui/cocoa/location_bar/location_bar_decoration.h
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h b/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h
index 75ce64d2711b57275e5b0693168bfdb599267c11..c525285003b19cba6602bdf83540aa2ab1a62410 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h
@@ -10,6 +10,7 @@
#import "base/basictypes.h"
class ButtonDecoration;
+class SeparatorDecoration;
// Base class for decorations at the left and right of the location
// bar. For instance, the location icon.
@@ -86,10 +87,22 @@ class LocationBarDecoration {
// inherits from that class (i.e. if it needs to act as a button).
virtual ButtonDecoration* AsButtonDecoration();
+ // Returns true if the decoration should be hidden to make space for omnibox
+ // text.
+ virtual bool ShouldAutoCollapse() const;
+
+ // Returns the current |LocationBarDecoration| as a |SeparatorDecoration|, if
+ // it inherits from that class (i.e. if it needs to act as a button).
+ virtual SeparatorDecoration* AsSeparatorDecoration();
+
// Width returned by |GetWidthForSpace()| when the item should be
// omitted for this width;
static const CGFloat kOmittedWidth;
+ // How far to inset the hint text area from the top and bottom. This
kuan 2013/01/28 18:02:00 nit: is it for any text or just hint text?
sail 2013/01/29 22:31:08 Done. Removed the reference to hint text.
+ // vertically centers the text.
+ static const CGFloat kTextYInset;
+
private:
bool visible_;

Powered by Google App Engine
This is Rietveld 408576698