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 4b2dbd2e88f0ae63b660051489ca93acfe3f9197..40776f9d60aca7dbb467ab23cc96560c63d76a7f 100644 |
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc |
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
@@ -385,8 +385,6 @@ void LocationBarView::Init() { |
// Initialize the location entry. We do this to avoid a black flash which is |
// visible when the location entry has just been initialized. |
Update(NULL); |
- |
- OnChanged(); |
} |
bool LocationBarView::IsInitialized() const { |
@@ -498,7 +496,7 @@ void LocationBarView::Update(const WebContents* contents) { |
mic_search_view_->SetVisible( |
!GetToolbarModel()->input_in_progress() && browser_ && |
browser_->search_model()->voice_search_supported()); |
- RefreshContentSettingViews(); |
+ UpdateContentSettingViewsPreLayout(); |
generated_credit_card_view_->Update(); |
ZoomBubbleView::CloseBubble(); |
RefreshZoomView(); |
@@ -523,12 +521,14 @@ void LocationBarView::Update(const WebContents* contents) { |
location_entry_->Update(); |
OnChanged(); |
Peter Kasting
2013/09/05 06:55:19
Nit: Add EOL comment: // NOTE: Calls Layout().
npentrel
2013/09/05 08:28:09
Done.
|
+ UpdateContentSettingViewsPostLayout(); |
} |
void LocationBarView::UpdateContentSettingsIcons() { |
- RefreshContentSettingViews(); |
+ UpdateContentSettingViewsPreLayout(); |
Peter Kasting
2013/09/05 06:55:19
Nit: Remove blank line
npentrel
2013/09/05 08:28:09
Done.
|
Layout(); |
+ UpdateContentSettingViewsPostLayout(); |
SchedulePaint(); |
} |
@@ -1134,10 +1134,18 @@ int LocationBarView::GetHorizontalEdgeThickness() const { |
browser_->window()->IsMaximized()) ? 0 : vertical_edge_thickness(); |
} |
-void LocationBarView::RefreshContentSettingViews() { |
+void LocationBarView::UpdateContentSettingViewsPreLayout() { |
+ for (ContentSettingViews::const_iterator i(content_setting_views_.begin()); |
+ i != content_setting_views_.end(); ++i) { |
+ (*i)->UpdatePreLayout(GetToolbarModel()->input_in_progress() ? |
+ NULL : GetWebContents()); |
+ } |
+} |
+ |
+void LocationBarView::UpdateContentSettingViewsPostLayout() { |
for (ContentSettingViews::const_iterator i(content_setting_views_.begin()); |
i != content_setting_views_.end(); ++i) { |
- (*i)->Update(GetToolbarModel()->input_in_progress() ? |
+ (*i)->UpdatePostLayout(GetToolbarModel()->input_in_progress() ? |
NULL : GetWebContents()); |
} |
} |