summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/find_bar_host.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 19:10:58 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 19:10:58 +0000
commitb492c117d70294e8c418b304b16620e4a6e88f0e (patch)
tree94e1ac182c13180066194709ed182561468f736f /chrome/browser/views/find_bar_host.cc
parent2b79be4d4cc515e8ab45901fb5a95a2980a45585 (diff)
downloadchromium_src-b492c117d70294e8c418b304b16620e4a6e88f0e.zip
chromium_src-b492c117d70294e8c418b304b16620e4a6e88f0e.tar.gz
chromium_src-b492c117d70294e8c418b304b16620e4a6e88f0e.tar.bz2
This CL cleans-up the FindBarHost and fixes an assert that happens on the focus manager when closing Chrome (linux toolkit views).
See original review at: http://codereview.chromium.org/220036/show BUG=None TEST=Make sure find works as expected on Chrome Linux toolkit views. TBR=ben Review URL: http://codereview.chromium.org/243035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27524 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/find_bar_host.cc')
-rw-r--r--chrome/browser/views/find_bar_host.cc18
1 files changed, 2 insertions, 16 deletions
diff --git a/chrome/browser/views/find_bar_host.cc b/chrome/browser/views/find_bar_host.cc
index 2d8c27b..a87edc2 100644
--- a/chrome/browser/views/find_bar_host.cc
+++ b/chrome/browser/views/find_bar_host.cc
@@ -69,6 +69,8 @@ FindBarHost::FindBarHost(BrowserView* browser_view)
}
FindBarHost::~FindBarHost() {
+ focus_manager_->RemoveFocusChangeListener(this);
+ focus_tracker_.reset(NULL);
}
void FindBarHost::Show() {
@@ -131,20 +133,6 @@ void FindBarHost::MoveWindowIfNecessary(const gfx::Rect& selection_rect,
view_->SchedulePaint();
}
-void FindBarHost::OnFinalMessage() {
- // TODO(beng): Destroy the RootView before destroying the Focus Manager will
- // allow us to remove this method.
-
- // We are exiting, so we no longer need to monitor focus changes.
- focus_manager_->RemoveFocusChangeListener(this);
-
- // Destroy the focus tracker now, otherwise by the time we're destroyed the
- // focus manager the focus tracker is referencing may have already been
- // destroyed resulting in the focus tracker trying to reference a deleted
- // focus manager.
- focus_tracker_.reset(NULL);
-};
-
bool FindBarHost::IsVisible() {
return host_->IsVisible();
}
@@ -392,5 +380,3 @@ bool FindBarHost::MaybeForwardKeystrokeToWebpage(
render_view_host->ForwardKeyboardEvent(event);
return true;
}
-
-