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

Unified Diff: chrome/browser/cocoa/location_bar_view_mac.mm

Issue 114017: Use Chrome facilities for omnibox state save and restore on Mac. (Closed)
Patch Set: Wordsmithing. Created 11 years, 7 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/cocoa/location_bar_view_mac.mm
diff --git a/chrome/browser/cocoa/location_bar_view_mac.mm b/chrome/browser/cocoa/location_bar_view_mac.mm
index b8c521f0b152a51ae993a46ed5f1dd7d9dbda496..138a5670df51d2a4c2852a8ddc1b369f4956fafe 100644
--- a/chrome/browser/cocoa/location_bar_view_mac.mm
+++ b/chrome/browser/cocoa/location_bar_view_mac.mm
@@ -56,6 +56,12 @@ void LocationBarViewMac::SaveStateToContents(TabContents* contents) {
edit_view_->SaveStateToTab(contents);
}
+void LocationBarViewMac::Update(const TabContents* contents,
+ bool should_restore_state) {
+ // AutocompleteEditView restores state if the tab is non-NULL.
+ edit_view_->Update(should_restore_state ? contents : NULL);
+}
+
void LocationBarViewMac::OnAutocompleteAccept(const GURL& url,
WindowOpenDisposition disposition,
PageTransition::Type transition,

Powered by Google App Engine
This is Rietveld 408576698