| 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_view.h" | 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 } | 821 } |
| 822 } else if (show_keyword_hint) { | 822 } else if (show_keyword_hint) { |
| 823 if (keyword_hint_view_->keyword() != keyword) | 823 if (keyword_hint_view_->keyword() != keyword) |
| 824 keyword_hint_view_->SetKeyword(keyword); | 824 keyword_hint_view_->SetKeyword(keyword); |
| 825 } | 825 } |
| 826 | 826 |
| 827 // Lay out items to the right of the edit field. | 827 // Lay out items to the right of the edit field. |
| 828 int offset = width() - kEdgeThickness; | 828 int offset = width() - kEdgeThickness; |
| 829 if (action_box_button_view_) { | 829 if (action_box_button_view_) { |
| 830 offset -= action_box_button_view_->width(); | 830 offset -= action_box_button_view_->width(); |
| 831 action_box_button_view_->SetPosition(gfx::Point(offset, location_y)); | 831 action_box_button_view_->SetPosition( |
| 832 gfx::Point(offset, |
| 833 kVerticalEdgeThickness - |
| 834 ActionBoxButtonView::kBorderOverlap)); |
| 832 offset -= GetItemPadding(); | 835 offset -= GetItemPadding(); |
| 833 } else { | 836 } else { |
| 834 offset -= GetEdgeItemPadding(); | 837 offset -= GetEdgeItemPadding(); |
| 835 } | 838 } |
| 836 | 839 |
| 837 if (star_view_ && star_view_->visible()) { | 840 if (star_view_ && star_view_->visible()) { |
| 838 offset += star_view_->GetBuiltInHorizontalPadding(); | 841 offset += star_view_->GetBuiltInHorizontalPadding(); |
| 839 int star_width = star_view_->GetPreferredSize().width(); | 842 int star_width = star_view_->GetPreferredSize().width(); |
| 840 offset -= star_width; | 843 offset -= star_width; |
| 841 star_view_->SetBounds(offset, location_y, star_width, location_height); | 844 star_view_->SetBounds(offset, location_y, star_width, location_height); |
| (...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1687 } | 1690 } |
| 1688 | 1691 |
| 1689 void LocationBarView::CleanupFadeAnimation() { | 1692 void LocationBarView::CleanupFadeAnimation() { |
| 1690 // Since we're no longer animating we don't need our layer. | 1693 // Since we're no longer animating we don't need our layer. |
| 1691 SetPaintToLayer(false); | 1694 SetPaintToLayer(false); |
| 1692 // Bubble labels don't need a transparent background anymore. | 1695 // Bubble labels don't need a transparent background anymore. |
| 1693 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); | 1696 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); |
| 1694 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); | 1697 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); |
| 1695 } | 1698 } |
| 1696 #endif // USE_AURA | 1699 #endif // USE_AURA |
| OLD | NEW |