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

Unified Diff: chrome/browser/browser.cc

Issue 338022: Reverting 30062. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 2 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/browser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser.cc
===================================================================
--- chrome/browser/browser.cc (revision 30067)
+++ chrome/browser/browser.cc (working copy)
@@ -246,6 +246,10 @@
local_state->ClearPref(prefs::kShouldShowFirstRunBubble);
window_->GetLocationBar()->ShowFirstRunBubble(show_OEM_bubble);
}
+
+ FindBar* find_bar = BrowserWindow::CreateFindBar(this);
+ find_bar_controller_.reset(new FindBarController(find_bar));
+ find_bar->SetFindBarController(find_bar_controller_.get());
}
///////////////////////////////////////////////////////////////////////////////
@@ -260,17 +264,6 @@
g_browser_process->user_data_dir_profiles() = profiles;
}
-FindBarController* Browser::GetFindBarController() {
- if (!find_bar_controller_.get()) {
- FindBar* find_bar = BrowserWindow::CreateFindBar(this);
- find_bar_controller_.reset(new FindBarController(find_bar));
- find_bar->SetFindBarController(find_bar_controller_.get());
- find_bar_controller_->ChangeTabContents(GetSelectedTabContents());
- find_bar_controller_->find_bar()->MoveWindowIfNecessary(gfx::Rect(), true);
- }
- return find_bar_controller_.get();
-}
-
///////////////////////////////////////////////////////////////////////////////
// Browser, Creation Helpers:
@@ -942,7 +935,7 @@
}
void Browser::ShowFindBar() {
- GetFindBarController()->Show();
+ find_bar_controller_->Show();
}
bool Browser::SupportsWindowFeature(WindowFeature feature) const {
@@ -1765,7 +1758,8 @@
if (find_bar_controller_.get()) {
find_bar_controller_->ChangeTabContents(new_contents);
- find_bar_controller_->find_bar()->MoveWindowIfNecessary(gfx::Rect(), true);
+ find_bar_controller_->find_bar()->MoveWindowIfNecessary(gfx::Rect(),
+ true);
}
// Update sessions. Don't force creation of sessions. If sessions doesn't
« no previous file with comments | « chrome/browser/browser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698