| OLD | NEW |
| 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/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 std::min(width, entry_width), location_bounds.height()); | 632 std::min(width, entry_width), location_bounds.height()); |
| 633 } | 633 } |
| 634 omnibox_view_->SetBoundsRect(location_bounds); | 634 omnibox_view_->SetBoundsRect(location_bounds); |
| 635 } | 635 } |
| 636 | 636 |
| 637 void LocationBarView::OnNativeThemeChanged(const ui::NativeTheme* theme) { | 637 void LocationBarView::OnNativeThemeChanged(const ui::NativeTheme* theme) { |
| 638 RefreshLocationIcon(); | 638 RefreshLocationIcon(); |
| 639 if (!is_popup_mode_) { | 639 if (!is_popup_mode_) { |
| 640 set_background( | 640 set_background( |
| 641 new BackgroundWith1PxBorder(GetColor(BACKGROUND), kBorderColor)); | 641 new BackgroundWith1PxBorder(GetColor(BACKGROUND), kBorderColor)); |
| 642 SchedulePaint(); |
| 642 } | 643 } |
| 643 } | 644 } |
| 644 | 645 |
| 645 void LocationBarView::Update(const WebContents* contents) { | 646 void LocationBarView::Update(const WebContents* contents) { |
| 646 RefreshContentSettingViews(); | 647 RefreshContentSettingViews(); |
| 647 RefreshZoomView(); | 648 RefreshZoomView(); |
| 648 RefreshPageActionViews(); | 649 RefreshPageActionViews(); |
| 649 RefreshTranslateIcon(); | 650 RefreshTranslateIcon(); |
| 650 RefreshSaveCreditCardIconView(); | 651 RefreshSaveCreditCardIconView(); |
| 651 RefreshManagePasswordsIconView(); | 652 RefreshManagePasswordsIconView(); |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1230 // LocationBarView, private TemplateURLServiceObserver implementation: | 1231 // LocationBarView, private TemplateURLServiceObserver implementation: |
| 1231 | 1232 |
| 1232 void LocationBarView::OnTemplateURLServiceChanged() { | 1233 void LocationBarView::OnTemplateURLServiceChanged() { |
| 1233 template_url_service_->RemoveObserver(this); | 1234 template_url_service_->RemoveObserver(this); |
| 1234 template_url_service_ = nullptr; | 1235 template_url_service_ = nullptr; |
| 1235 // If the browser is no longer active, let's not show the info bubble, as this | 1236 // If the browser is no longer active, let's not show the info bubble, as this |
| 1236 // would make the browser the active window again. | 1237 // would make the browser the active window again. |
| 1237 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) | 1238 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) |
| 1238 ShowFirstRunBubble(); | 1239 ShowFirstRunBubble(); |
| 1239 } | 1240 } |
| OLD | NEW |