| 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 8b679a0bf1ac91cc392be8af8bf927fa5918d4c8..576fb143a580c7a9fe9594390703db59d42fd772 100644
|
| --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
|
| +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
|
| @@ -61,7 +61,6 @@
|
| #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/toolbar_origin_chip_view.h"
|
| #include "chrome/browser/ui/zoom/zoom_controller.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/pref_names.h"
|
| @@ -204,7 +203,6 @@ LocationBarView::LocationBarView(Browser* browser,
|
| omnibox_view_(NULL),
|
| delegate_(delegate),
|
| origin_chip_view_(NULL),
|
| - toolbar_origin_chip_view_(NULL),
|
| location_icon_view_(NULL),
|
| ev_bubble_view_(NULL),
|
| ime_inline_autocomplete_view_(NULL),
|
| @@ -594,27 +592,13 @@ void LocationBarView::SelectAll() {
|
| omnibox_view_->SelectAll(true);
|
| }
|
|
|
| -views::ImageView* LocationBarView::GetLocationIconView() {
|
| - return toolbar_origin_chip_view_ ?
|
| - toolbar_origin_chip_view_->location_icon_view() : location_icon_view_;
|
| -}
|
| -
|
| -const views::ImageView* LocationBarView::GetLocationIconView() const {
|
| - return toolbar_origin_chip_view_ ?
|
| - toolbar_origin_chip_view_->location_icon_view() : location_icon_view_;
|
| -}
|
| -
|
| -views::View* LocationBarView::GetLocationBarAnchor() {
|
| - return GetLocationIconView();
|
| -}
|
| -
|
| gfx::Point LocationBarView::GetLocationBarAnchorPoint() const {
|
| // The +1 in the next line creates a 1-px gap between icon and arrow tip.
|
| - gfx::Point icon_bottom(0, GetLocationIconView()->GetImageBounds().bottom() -
|
| + gfx::Point icon_bottom(0, location_icon_view_->GetImageBounds().bottom() -
|
| LocationBarView::kIconInternalPadding + 1);
|
| - gfx::Point icon_center(GetLocationIconView()->GetImageBounds().CenterPoint());
|
| + gfx::Point icon_center(location_icon_view_->GetImageBounds().CenterPoint());
|
| gfx::Point point(icon_center.x(), icon_bottom.y());
|
| - ConvertPointToTarget(GetLocationIconView(), this, &point);
|
| + ConvertPointToTarget(location_icon_view_, this, &point);
|
| return point;
|
| }
|
|
|
| @@ -805,8 +789,7 @@ void LocationBarView::Layout() {
|
| selected_keyword_view_->set_is_extension_icon(false);
|
| }
|
| }
|
| - } else if (!toolbar_origin_chip_view_ &&
|
| - !chrome::ShouldDisplayOriginChipV2() &&
|
| + } else if (!chrome::ShouldDisplayOriginChip() &&
|
| (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.
|
| @@ -1023,7 +1006,7 @@ void LocationBarView::Update(const WebContents* contents) {
|
| }
|
|
|
| void LocationBarView::ShowURL() {
|
| - if (chrome::ShouldDisplayOriginChipV2()) {
|
| + if (chrome::ShouldDisplayOriginChip()) {
|
| omnibox_view_->SetVisible(false);
|
| omnibox_view_->ShowURL();
|
| show_url_animation_->Show();
|
| @@ -1198,7 +1181,7 @@ void LocationBarView::ShowFirstRunBubbleInternal() {
|
| if (!browser)
|
| return; // Possible when browser is shutting down.
|
|
|
| - FirstRunBubble::ShowBubble(browser, GetLocationBarAnchor());
|
| + FirstRunBubble::ShowBubble(browser, location_icon_view_);
|
| #endif
|
| }
|
|
|
| @@ -1541,9 +1524,6 @@ void LocationBarView::OnChanged() {
|
| *GetThemeProvider()->GetImageSkiaNamed((icon_id == IDR_OMNIBOX_SEARCH) ?
|
| IDR_OMNIBOX_SEARCH_BUTTON_LOUPE : IDR_OMNIBOX_SEARCH_BUTTON_ARROW));
|
|
|
| - if (toolbar_origin_chip_view_)
|
| - toolbar_origin_chip_view_->OnChanged();
|
| -
|
| if (origin_chip_view_->visible())
|
| origin_chip_view_->OnChanged();
|
|
|
|
|