Index: chrome/browser/ui/views/find_bar_view.cc |
diff --git a/chrome/browser/ui/views/find_bar_view.cc b/chrome/browser/ui/views/find_bar_view.cc |
index d426235dc2df94b557a51e9d37b240651a2a3a8e..87e489c52d8d8775a0af678f6b5190d51c21cd45 100644 |
--- a/chrome/browser/ui/views/find_bar_view.cc |
+++ b/chrome/browser/ui/views/find_bar_view.cc |
@@ -111,7 +111,7 @@ class FocusForwarderView : public views::View { |
// FindBarView, public: |
FindBarView::FindBarView(FindBarHost* host) |
- : DropdownBarView(host), |
+ : find_bar_host_(host), |
find_text_(new views::Textfield), |
match_count_text_(new MatchCountLabel()), |
focus_forwarder_view_(new FocusForwarderView(find_text_)), |
@@ -285,7 +285,7 @@ void FindBarView::ButtonPressed( |
case VIEW_ID_FIND_IN_PAGE_NEXT_BUTTON: |
if (!find_text_->text().empty()) { |
FindTabHelper* find_tab_helper = FindTabHelper::FromWebContents( |
- find_bar_host()->GetFindBarController()->web_contents()); |
+ find_bar_host_->GetFindBarController()->web_contents()); |
find_tab_helper->StartFinding( |
find_text_->text(), |
sender->id() == VIEW_ID_FIND_IN_PAGE_NEXT_BUTTON, |
@@ -293,7 +293,7 @@ void FindBarView::ButtonPressed( |
} |
break; |
case VIEW_ID_FIND_IN_PAGE_CLOSE_BUTTON: |
- find_bar_host()->GetFindBarController()->EndFindSession( |
+ find_bar_host_->GetFindBarController()->EndFindSession( |
FindBarController::kKeepSelectionOnPage, |
FindBarController::kKeepResultsInFindBox); |
break; |
@@ -314,10 +314,10 @@ SkColor FindBarView::GetVectorIconBaseColor() const { |
bool FindBarView::HandleKeyEvent(views::Textfield* sender, |
const ui::KeyEvent& key_event) { |
// If the dialog is not visible, there is no reason to process keyboard input. |
- if (!host()->IsVisible()) |
+ if (!find_bar_host_->IsVisible()) |
return false; |
- if (find_bar_host()->MaybeForwardKeyEventToWebpage(key_event)) |
+ if (find_bar_host_->MaybeForwardKeyEventToWebpage(key_event)) |
return true; // Handled, we are done! |
if (key_event.key_code() == ui::VKEY_RETURN && |
@@ -325,7 +325,7 @@ bool FindBarView::HandleKeyEvent(views::Textfield* sender, |
// Pressing Return/Enter starts the search (unless text box is empty). |
base::string16 find_string = find_text_->text(); |
if (!find_string.empty()) { |
- FindBarController* controller = find_bar_host()->GetFindBarController(); |
+ FindBarController* controller = find_bar_host_->GetFindBarController(); |
FindTabHelper* find_tab_helper = |
FindTabHelper::FromWebContents(controller->web_contents()); |
// Search forwards for enter, backwards for shift-enter. |
@@ -359,7 +359,7 @@ views::View* FindBarView::TargetForRect(View* root, const gfx::Rect& rect) { |
} |
void FindBarView::Find(const base::string16& search_text) { |
- FindBarController* controller = find_bar_host()->GetFindBarController(); |
+ FindBarController* controller = find_bar_host_->GetFindBarController(); |
DCHECK(controller); |
content::WebContents* web_contents = controller->web_contents(); |
// We must guard against a NULL web_contents, which can happen if the text |
@@ -380,7 +380,7 @@ void FindBarView::Find(const base::string16& search_text) { |
} else { |
find_tab_helper->StopFinding(FindBarController::kClearSelectionOnPage); |
UpdateForResult(find_tab_helper->find_result(), base::string16()); |
- find_bar_host()->MoveWindowIfNecessary(gfx::Rect()); |
+ find_bar_host_->MoveWindowIfNecessary(gfx::Rect()); |
// 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 |
@@ -400,10 +400,6 @@ void FindBarView::UpdateMatchCountAppearance(bool no_match) { |
find_next_button_->SetEnabled(enable_buttons); |
} |
-FindBarHost* FindBarView::find_bar_host() const { |
- return static_cast<FindBarHost*>(host()); |
-} |
- |
const char* FindBarView::GetClassName() const { |
return "FindBarView"; |
} |