Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6829)

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 23557004: Save password bubble pops up automatically (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor change Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());
}
}

Powered by Google App Engine
This is Rietveld 408576698