summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-29 20:35:37 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-29 20:35:37 +0000
commit24db8a07affa9456337a9b7eb1c22dffff2c0458 (patch)
tree41f2a49c5909bf54fb706628956310993c912912 /chrome/browser/browser.cc
parent9eabdd09a7af3be5341e4ff2627fe4023aaa0ab6 (diff)
downloadchromium_src-24db8a07affa9456337a9b7eb1c22dffff2c0458.zip
chromium_src-24db8a07affa9456337a9b7eb1c22dffff2c0458.tar.gz
chromium_src-24db8a07affa9456337a9b7eb1c22dffff2c0458.tar.bz2
Fix and re-enable a test I broke with the find bar changes I made last night.
Remove Browser::find_bar(), make everyone use either Browser::GetFindBarController() which creates the FindBarController on demand, or a new method HasFindBarController(), which can be used to check for its existence (so as to avoid creating it unnecessarily). http://crbug.com/26231 TEST=interactive ui tests, standard find tests Review URL: http://codereview.chromium.org/348015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30507 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r--chrome/browser/browser.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 74e3987..619e855 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -271,6 +271,10 @@ FindBarController* Browser::GetFindBarController() {
return find_bar_controller_.get();
}
+bool Browser::HasFindBarController() const {
+ return find_bar_controller_.get() != NULL;
+}
+
///////////////////////////////////////////////////////////////////////////////
// Browser, Creation Helpers:
@@ -1777,7 +1781,7 @@ void Browser::TabSelectedAt(TabContents* old_contents,
status_bubble->SetStatus(GetSelectedTabContents()->GetStatusText());
}
- if (find_bar_controller_.get()) {
+ if (HasFindBarController()) {
find_bar_controller_->ChangeTabContents(new_contents);
find_bar_controller_->find_bar()->MoveWindowIfNecessary(gfx::Rect(), true);
}