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

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
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..84363351d003e0be73c3ed04c044ec6a30036a7f 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();
@@ -522,13 +520,14 @@ void LocationBarView::Update(const WebContents* contents) {
else
location_entry_->Update();
- OnChanged();
+ OnChanged(); // NOTE: Calls Layout().
+ UpdateContentSettingViewsPostLayout();
}
void LocationBarView::UpdateContentSettingsIcons() {
- RefreshContentSettingViews();
-
+ UpdateContentSettingViewsPreLayout();
Layout();
+ UpdateContentSettingViewsPostLayout();
SchedulePaint();
}
@@ -1134,10 +1133,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());
}
}
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698