From 21d179b334e59e9a3bfcaed4c4430bef1bc5759d Mon Sep 17 00:00:00 2001 From: Kristian Monsen Date: Wed, 11 May 2011 20:53:37 +0100 Subject: Merge Chromium at 10.0.621.0: Initial merge by git. Change-Id: I070cc91c608dfa4a968a5a54c173260765ac8097 --- chrome/browser/ui/views/find_bar_host.cc | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'chrome/browser/ui/views/find_bar_host.cc') diff --git a/chrome/browser/ui/views/find_bar_host.cc b/chrome/browser/ui/views/find_bar_host.cc index e86e435..0eabaaf 100644 --- a/chrome/browser/ui/views/find_bar_host.cc +++ b/chrome/browser/ui/views/find_bar_host.cc @@ -5,15 +5,14 @@ #include "chrome/browser/views/find_bar_host.h" #include "app/keyboard_codes.h" -#include "chrome/browser/browser_process.h" -#include "chrome/browser/find_bar_controller.h" #include "chrome/browser/renderer_host/render_view_host.h" -#include "chrome/browser/ui/browser.h" -#include "chrome/browser/view_ids.h" -#include "chrome/browser/views/find_bar_view.h" -#include "chrome/browser/views/frame/browser_view.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/tab_contents/tab_contents_view.h" +#include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/find_bar/find_bar_controller.h" +#include "chrome/browser/ui/view_ids.h" +#include "chrome/browser/ui/views/find_bar_view.h" +#include "chrome/browser/ui/views/frame/browser_view.h" #include "views/focus/external_focus_tracker.h" #include "views/focus/view_storage.h" #include "views/widget/root_view.h" @@ -126,7 +125,11 @@ void FindBarHost::SetFindText(const string16& find_text) { } void FindBarHost::UpdateUIForFindResult(const FindNotificationDetails& result, - const string16& find_text) { + const string16& find_text) { + // Make sure match count is clear. It may get set again in UpdateForResult + // if enough data is available. + find_bar_view()->ClearMatchCount(); + if (!find_text.empty()) find_bar_view()->UpdateForResult(result, find_text); @@ -211,6 +214,14 @@ string16 FindBarHost::GetFindText() { return find_bar_view()->GetFindText(); } +string16 FindBarHost::GetFindSelectedText() { + return find_bar_view()->GetFindSelectedText(); +} + +string16 FindBarHost::GetMatchCountText() { + return find_bar_view()->GetMatchCountText(); +} + //////////////////////////////////////////////////////////////////////////////// // Overridden from DropdownBarHost: -- cgit v1.1