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

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

Issue 75873002: [SiteChip] Add the basic painting of the site chip button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use constants Created 7 years 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 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 gfx::Point LocationBarView::GetLocationBarAnchorPoint() const { 926 gfx::Point LocationBarView::GetLocationBarAnchorPoint() const {
927 // The +1 in the next line creates a 1-px gap between icon and arrow tip. 927 // The +1 in the next line creates a 1-px gap between icon and arrow tip.
928 gfx::Point icon_bottom(0, GetLocationIconView()->GetImageBounds().bottom() - 928 gfx::Point icon_bottom(0, GetLocationIconView()->GetImageBounds().bottom() -
929 LocationBarView::kIconInternalPadding + 1); 929 LocationBarView::kIconInternalPadding + 1);
930 gfx::Point icon_center(GetLocationIconView()->GetImageBounds().CenterPoint()); 930 gfx::Point icon_center(GetLocationIconView()->GetImageBounds().CenterPoint());
931 gfx::Point point(icon_center.x(), icon_bottom.y()); 931 gfx::Point point(icon_center.x(), icon_bottom.y());
932 ConvertPointToTarget(GetLocationIconView(), this, &point); 932 ConvertPointToTarget(GetLocationIconView(), this, &point);
933 return point; 933 return point;
934 } 934 }
935 935
936 const gfx::FontList& LocationBarView::GetOmniboxFontList() const {
937 return omnibox_view_->font_list();
938 }
939
936 views::View* LocationBarView::generated_credit_card_view() { 940 views::View* LocationBarView::generated_credit_card_view() {
937 return generated_credit_card_view_; 941 return generated_credit_card_view_;
938 } 942 }
939 943
940 void LocationBarView::Update(const WebContents* contents) { 944 void LocationBarView::Update(const WebContents* contents) {
941 mic_search_view_->SetVisible( 945 mic_search_view_->SetVisible(
942 !GetToolbarModel()->input_in_progress() && browser_ && 946 !GetToolbarModel()->input_in_progress() && browser_ &&
943 browser_->search_model()->voice_search_supported()); 947 browser_->search_model()->voice_search_supported());
944 RefreshContentSettingViews(); 948 RefreshContentSettingViews();
945 generated_credit_card_view_->Update(); 949 generated_credit_card_view_->Update();
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 bounds.Inset(-(horizontal_padding + 1) / 2, 0); 1469 bounds.Inset(-(horizontal_padding + 1) / 2, 0);
1466 location_bar_util::PaintExtensionActionBackground( 1470 location_bar_util::PaintExtensionActionBackground(
1467 *(*page_action_view)->image_view()->page_action(), 1471 *(*page_action_view)->image_view()->page_action(),
1468 tab_id, canvas, bounds, text_color, background_color); 1472 tab_id, canvas, bounds, text_color, background_color);
1469 } 1473 }
1470 } 1474 }
1471 1475
1472 void LocationBarView::AccessibilitySetValue(const string16& new_value) { 1476 void LocationBarView::AccessibilitySetValue(const string16& new_value) {
1473 omnibox_view_->SetUserText(new_value, new_value, true); 1477 omnibox_view_->SetUserText(new_value, new_value, true);
1474 } 1478 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698