Chromium Code Reviews| Index: chrome/browser/ui/views/location_bar/location_bar_layout.h |
| diff --git a/chrome/browser/ui/views/location_bar/location_bar_layout.h b/chrome/browser/ui/views/location_bar/location_bar_layout.h |
| index 35c4d43bab06faaa4c821f01283dc24acfb3c3d4..9b89f85629d4cc98dced248a26190d9e96e6cb68 100644 |
| --- a/chrome/browser/ui/views/location_bar/location_bar_layout.h |
| +++ b/chrome/browser/ui/views/location_bar/location_bar_layout.h |
| @@ -55,6 +55,13 @@ class LocationBarLayout { |
| // Add a non-resizable decoration with standard padding. |
| void AddDecoration(int height, int builtin_padding, views::View* view); |
| + // Add a separator, specifying: |
| + // - The |y| position inside its parent; |
| + // - The |height| in pixel; |
|
Peter Kasting
2013/01/17 04:14:22
Nit: pixels. Though, it's weird to note that only
kuan
2013/01/17 17:57:43
Done.
|
| + // - |padding|, the padding between the previous item and this separator; |
| + // - The |view| corresponding to this separator, a weak pointer. |
| + void AddSeparator(int y, int height, int padding, views::View* view); |
| + |
| // First pass of decoration layout process. Pass the full width of the |
| // location bar in |entry_width|. This pass will adjust it to account for |
| // non-collapsible and non-resizable decorations. |
| @@ -73,7 +80,17 @@ class LocationBarLayout { |
| // bar towards the middle. |
| void LayoutPass3(gfx::Rect* bounds, int* available_width); |
| + // Sets the padding between edit and the decoration beside it. |
| + // This value must not be modified after LayoutPass1 has been called. |
| + void set_item_edit_padding(int item_edit_padding) { |
| + item_edit_padding_ = item_edit_padding; |
| + } |
| + |
| private: |
| + void SetVisibilityForDecorations(int* available_width); |
| + void HideUnneededSeparators(int* available_width); |
| + void SetBoundsForDecorations(gfx::Rect* bounds); |
| + |
| // LEFT_EDGE means decorations are added from left to right and stacked on |
| // the left of the omnibox, RIGHT_EDGE means the opposite. |
| Position position_; |