| OLD | NEW |
| 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 #include "chrome/browser/ui/views/location_bar/location_bar_layout.h" | 5 #include "chrome/browser/ui/views/location_bar/location_bar_layout.h" |
| 6 | 6 |
| 7 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 7 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 8 #include "ui/gfx/rect.h" | 8 #include "ui/gfx/geometry/rect.h" |
| 9 #include "ui/views/view.h" | 9 #include "ui/views/view.h" |
| 10 | 10 |
| 11 | 11 |
| 12 // Description of a decoration to be added inside the location bar, either to | 12 // Description of a decoration to be added inside the location bar, either to |
| 13 // the left or to the right. | 13 // the left or to the right. |
| 14 struct LocationBarDecoration { | 14 struct LocationBarDecoration { |
| 15 LocationBarDecoration(int y, | 15 LocationBarDecoration(int y, |
| 16 int height, | 16 int height, |
| 17 bool auto_collapse, | 17 bool auto_collapse, |
| 18 double max_fraction, | 18 double max_fraction, |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 (bounds->right() - padding - (*i)->computed_width); | 163 (bounds->right() - padding - (*i)->computed_width); |
| 164 (*i)->view->SetBounds(x, (*i)->y, (*i)->computed_width, (*i)->height); | 164 (*i)->view->SetBounds(x, (*i)->y, (*i)->computed_width, (*i)->height); |
| 165 bounds->set_width(bounds->width() - padding - (*i)->computed_width); | 165 bounds->set_width(bounds->width() - padding - (*i)->computed_width); |
| 166 if (position_ == LEFT_EDGE) | 166 if (position_ == LEFT_EDGE) |
| 167 bounds->set_x(bounds->x() + padding + (*i)->computed_width); | 167 bounds->set_x(bounds->x() + padding + (*i)->computed_width); |
| 168 } | 168 } |
| 169 bounds->set_width(bounds->width() - item_edit_padding_); | 169 bounds->set_width(bounds->width() - item_edit_padding_); |
| 170 if (position_ == LEFT_EDGE) | 170 if (position_ == LEFT_EDGE) |
| 171 bounds->set_x(bounds->x() + item_edit_padding_); | 171 bounds->set_x(bounds->x() + item_edit_padding_); |
| 172 } | 172 } |
| OLD | NEW |