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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 11095008: New action box button images and supporting code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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::kTopBorderOverlapThickness));
835 action_box_button_view_->SetClickableHeight(location_height);
832 offset -= GetItemPadding(); 836 offset -= GetItemPadding();
833 } else { 837 } else {
834 offset -= GetEdgeItemPadding(); 838 offset -= GetEdgeItemPadding();
835 } 839 }
836 840
837 if (star_view_ && star_view_->visible()) { 841 if (star_view_ && star_view_->visible()) {
838 offset += star_view_->GetBuiltInHorizontalPadding(); 842 offset += star_view_->GetBuiltInHorizontalPadding();
839 int star_width = star_view_->GetPreferredSize().width(); 843 int star_width = star_view_->GetPreferredSize().width();
840 offset -= star_width; 844 offset -= star_width;
841 star_view_->SetBounds(offset, location_y, star_width, location_height); 845 star_view_->SetBounds(offset, location_y, star_width, location_height);
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 } 1691 }
1688 1692
1689 void LocationBarView::CleanupFadeAnimation() { 1693 void LocationBarView::CleanupFadeAnimation() {
1690 // Since we're no longer animating we don't need our layer. 1694 // Since we're no longer animating we don't need our layer.
1691 SetPaintToLayer(false); 1695 SetPaintToLayer(false);
1692 // Bubble labels don't need a transparent background anymore. 1696 // Bubble labels don't need a transparent background anymore.
1693 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE); 1697 ev_bubble_view_->SetLabelBackgroundColor(SK_ColorWHITE);
1694 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE); 1698 selected_keyword_view_->SetLabelBackgroundColor(SK_ColorWHITE);
1695 } 1699 }
1696 #endif // USE_AURA 1700 #endif // USE_AURA
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698