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 5905a421a5982840e3fd43515024413cdecfa23a..435bc21b30478d20bae7c12c603d042dc5b34227 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), |
@@ -674,8 +676,8 @@ void LocationBarView::Layout() { |
selected_keyword_view_->set_is_extension_icon(false); |
} |
} |
- } else if (GetToolbarModel()->GetSecurityLevel(false) == |
- ToolbarModel::EV_SECURE) { |
+ } else if (!site_chip_view_ && |
+ (GetToolbarModel()->GetSecurityLevel(false) == ToolbarModel::EV_SECURE)) { |
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; |
@@ -911,11 +913,13 @@ void LocationBarView::SelectAll() { |
} |
views::ImageView* LocationBarView::GetLocationIconView() { |
- return location_icon_view_; |
+ return site_chip_view_ ? site_chip_view_->location_icon_view() |
Peter Kasting
2013/12/10 19:44:31
Nit: Break after '?' instead of before ':' (2 plac
Greg Billock
2013/12/10 20:36:23
Done. Done.
|
+ : location_icon_view_; |
} |
const views::ImageView* LocationBarView::GetLocationIconView() const { |
- return location_icon_view_; |
+ return site_chip_view_ ? site_chip_view_->location_icon_view() |
+ : location_icon_view_; |
} |
views::View* LocationBarView::GetLocationBarAnchor() { |
@@ -974,6 +978,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(); |
} |