Chromium Code Reviews| Index: chrome/browser/ui/views/location_bar/location_bar_view.cc |
| diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
| index 4001583a77450e3abad626e977ec86a285b96b82..ef183ac5f723d426b5d46d333821225eb85e7ee1 100644 |
| --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc |
| +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
| @@ -55,6 +55,7 @@ |
| #include "chrome/browser/ui/views/location_bar/zoom_view.h" |
| #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" |
| #include "chrome/browser/ui/views/passwords/manage_passwords_icon_view.h" |
| +#include "chrome/browser/ui/views/toolbar/site_chip_view.h" |
| #include "chrome/browser/ui/zoom/zoom_controller.h" |
| #include "chrome/common/chrome_switches.h" |
| #include "chrome/common/pref_names.h" |
| @@ -180,6 +181,7 @@ LocationBarView::LocationBarView(Browser* browser, |
| open_pdf_in_reader_view_(NULL), |
| manage_passwords_icon_view_(NULL), |
| script_bubble_icon_view_(NULL), |
| + site_chip_view_(NULL), |
| translate_icon_view_(NULL), |
| star_view_(NULL), |
| is_popup_mode_(is_popup_mode), |
| @@ -675,7 +677,7 @@ void LocationBarView::Layout() { |
| } |
| } |
| } else if (GetToolbarModel()->GetSecurityLevel(false) == |
| - ToolbarModel::EV_SECURE) { |
| + ToolbarModel::EV_SECURE && !site_chip_view_) { |
|
Peter Kasting
2013/12/06 02:16:52
Nit: Parens around binary subexprs
If you put the
Greg Billock
2013/12/06 19:54:26
won't quite. :-( But I think it's better re-ordere
|
| ev_bubble_view_->SetLabel(GetToolbarModel()->GetEVCertName()); |
| // The largest fraction of the omnibox that can be taken by the EV bubble. |
| const double kMaxBubbleFraction = 0.5; |
| @@ -912,10 +914,16 @@ void LocationBarView::SelectAll() { |
| } |
| views::ImageView* LocationBarView::GetLocationIconView() { |
| + if (site_chip_view_) |
| + return site_chip_view_->location_icon_view(); |
| + |
| return location_icon_view_; |
| } |
| const views::ImageView* LocationBarView::GetLocationIconView() const { |
| + if (site_chip_view_) |
| + return site_chip_view_->location_icon_view(); |
| + |
| return location_icon_view_; |
| } |
| @@ -975,6 +983,9 @@ void LocationBarView::OnChanged() { |
| GetThemeProvider()->GetImageSkiaNamed(omnibox_view_->GetIcon())); |
| location_icon_view_->ShowTooltip(!GetOmniboxView()->IsEditingOrEmpty()); |
| + if (site_chip_view_) |
| + site_chip_view_->OnChanged(); |
| + |
| Layout(); |
| SchedulePaint(); |
| } |