diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-16 20:11:38 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-16 20:11:38 +0000 |
commit | c90c6ca59378d7e86d1a2f28fe96bada35df1508 (patch) | |
tree | e09032ecfe1b14974733c92d717d094559c67ef5 /chrome/browser/ui/views/find_bar_view.cc | |
parent | 8d61f1c281dd3490e482c63eba56f4787acf42f1 (diff) | |
download | chromium_src-c90c6ca59378d7e86d1a2f28fe96bada35df1508.zip chromium_src-c90c6ca59378d7e86d1a2f28fe96bada35df1508.tar.gz chromium_src-c90c6ca59378d7e86d1a2f28fe96bada35df1508.tar.bz2 |
Rename the TabContentWrapper pieces to be "TabHelper"s. (Except for the PasswordManager... for now.) Also, just pre-create them up-front. It saves us effort, as they're all going to be eventually created anyway, so being lazy saves us nothing and creates headaches since the rules about what can be lazy differ from feature to feature.
BUG=71097
TEST=zero visible change
Review URL: http://codereview.chromium.org/6480117
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75170 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views/find_bar_view.cc')
-rw-r--r-- | chrome/browser/ui/views/find_bar_view.cc | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/chrome/browser/ui/views/find_bar_view.cc b/chrome/browser/ui/views/find_bar_view.cc index 52e7f53..36e8868 100644 --- a/chrome/browser/ui/views/find_bar_view.cc +++ b/chrome/browser/ui/views/find_bar_view.cc @@ -14,7 +14,7 @@ #include "chrome/browser/themes/browser_theme_provider.h" #include "chrome/browser/ui/find_bar/find_bar_controller.h" #include "chrome/browser/ui/find_bar/find_bar_state.h" -#include "chrome/browser/ui/find_bar/find_manager.h" +#include "chrome/browser/ui/find_bar/find_tab_helper.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "chrome/browser/ui/view_ids.h" #include "chrome/browser/ui/views/find_bar_host.h" @@ -441,9 +441,9 @@ void FindBarView::ButtonPressed( case FIND_NEXT_TAG: if (!find_text_->text().empty()) { find_bar_host()->GetFindBarController()->tab_contents()-> - GetFindManager()->StartFinding(find_text_->text(), - sender->tag() == FIND_NEXT_TAG, - false); // Not case sensitive. + find_tab_helper()->StartFinding(find_text_->text(), + sender->tag() == FIND_NEXT_TAG, + false); // Not case sensitive. } if (event.IsMouseEvent()) { // If mouse event, we move the focus back to the text-field, so that the @@ -482,17 +482,18 @@ void FindBarView::ContentsChanged(views::Textfield* sender, // can lead to crashes, as exposed by automation testing in issue 8048. if (!controller->tab_contents()) return; - FindManager* find_manager = controller->tab_contents()->GetFindManager(); + FindTabHelper* find_tab_helper = + controller->tab_contents()->find_tab_helper(); // When the user changes something in the text box we check the contents and // if the textbox contains something we set it as the new search string and // initiate search (even though old searches might be in progress). if (!new_contents.empty()) { // The last two params here are forward (true) and case sensitive (false). - find_manager->StartFinding(new_contents, true, false); + find_tab_helper->StartFinding(new_contents, true, false); } else { - find_manager->StopFinding(FindBarController::kClearSelection); - UpdateForResult(find_manager->find_result(), string16()); + find_tab_helper->StopFinding(FindBarController::kClearSelection); + UpdateForResult(find_tab_helper->find_result(), string16()); // Clearing the text box should clear the prepopulate state so that when // we close and reopen the Find box it doesn't show the search we just @@ -519,11 +520,12 @@ bool FindBarView::HandleKeyEvent(views::Textfield* sender, string16 find_string = find_text_->text(); if (!find_string.empty()) { FindBarController* controller = find_bar_host()->GetFindBarController(); - FindManager* find_manager = controller->tab_contents()->GetFindManager(); + FindTabHelper* find_tab_helper = + controller->tab_contents()->find_tab_helper(); // Search forwards for enter, backwards for shift-enter. - find_manager->StartFinding(find_string, - !key_event.IsShiftDown(), - false); // Not case sensitive. + find_tab_helper->StartFinding(find_string, + !key_event.IsShiftDown(), + false); // Not case sensitive. } } |