Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_VIEWS_LOCATION_BAR_LOCATION_BAR_LAYOUT_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_LAYOUT_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_LAYOUT_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_LAYOUT_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
| 9 | 9 |
| 10 namespace gfx { | 10 namespace gfx { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 void LayoutPass2(int* entry_width); | 66 void LayoutPass2(int* entry_width); |
| 67 | 67 |
| 68 // Third and final pass of decoration layout process. Pass the |bounds| | 68 // Third and final pass of decoration layout process. Pass the |bounds| |
| 69 // corresponding to the entire space available in the location bar. This pass | 69 // corresponding to the entire space available in the location bar. This pass |
| 70 // will update it as decorations are laid out. |available_width| measures the | 70 // will update it as decorations are laid out. |available_width| measures the |
| 71 // empty space within the location bar, taking the decorations and text into | 71 // empty space within the location bar, taking the decorations and text into |
| 72 // account. |decorations| must always be ordered from the edge of the location | 72 // account. |decorations| must always be ordered from the edge of the location |
| 73 // bar towards the middle. | 73 // bar towards the middle. |
| 74 void LayoutPass3(gfx::Rect* bounds, int* available_width); | 74 void LayoutPass3(gfx::Rect* bounds, int* available_width); |
| 75 | 75 |
| 76 // Sets the padding between edit and the decoration beside it. | |
|
beaudoin
2013/01/07 17:27:53
Add to comment:
This value must not be modified a
kuan
2013/01/09 19:52:58
Done.
| |
| 77 void set_item_edit_padding(int item_edit_padding) { | |
| 78 item_edit_padding_ = item_edit_padding; | |
| 79 } | |
| 80 | |
| 76 private: | 81 private: |
| 77 // LEFT_EDGE means decorations are added from left to right and stacked on | 82 // LEFT_EDGE means decorations are added from left to right and stacked on |
| 78 // the left of the omnibox, RIGHT_EDGE means the opposite. | 83 // the left of the omnibox, RIGHT_EDGE means the opposite. |
| 79 Position position_; | 84 Position position_; |
| 80 | 85 |
| 81 // The padding between the last decoration and the edit box. | 86 // The padding between the last decoration and the edit box. |
| 82 int item_edit_padding_; | 87 int item_edit_padding_; |
| 83 | 88 |
| 84 // The padding between the edge and the edit box, if there are no decorations. | 89 // The padding between the edge and the edit box, if there are no decorations. |
| 85 int edge_edit_padding_; | 90 int edge_edit_padding_; |
| 86 | 91 |
| 87 // The list of decorations to layout. | 92 // The list of decorations to layout. |
| 88 ScopedVector<LocationBarDecoration> decorations_; | 93 ScopedVector<LocationBarDecoration> decorations_; |
| 89 | 94 |
| 90 DISALLOW_COPY_AND_ASSIGN(LocationBarLayout); | 95 DISALLOW_COPY_AND_ASSIGN(LocationBarLayout); |
| 91 }; | 96 }; |
| 92 | 97 |
| 93 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_LAYOUT_H_ | 98 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_LAYOUT_H_ |
| OLD | NEW |