summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/find_bar_view.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-23 02:49:34 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-23 02:49:34 +0000
commit232d1b83fbcadc744455b9b1615713d54f974499 (patch)
tree385ea2e2fbacc14b1604721da74a0d226609ef97 /chrome/browser/views/find_bar_view.cc
parent51d295b8863dc7e88568c598f908ad4c79ff38b6 (diff)
downloadchromium_src-232d1b83fbcadc744455b9b1615713d54f974499.zip
chromium_src-232d1b83fbcadc744455b9b1615713d54f974499.tar.gz
chromium_src-232d1b83fbcadc744455b9b1615713d54f974499.tar.bz2
Makes FindBarWin buildable on linux. FindBarWin should be renamed to
FindBarViews, but I'm leaving it as is for now. BUG=none TEST=none Review URL: http://codereview.chromium.org/113793 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16830 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/find_bar_view.cc')
-rw-r--r--chrome/browser/views/find_bar_view.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/views/find_bar_view.cc b/chrome/browser/views/find_bar_view.cc
index c2db6d2..8685246 100644
--- a/chrome/browser/views/find_bar_view.cc
+++ b/chrome/browser/views/find_bar_view.cc
@@ -162,12 +162,12 @@ FindBarView::FindBarView(FindBarWin* container)
FindBarView::~FindBarView() {
}
-void FindBarView::SetFindText(const std::wstring& find_text) {
- find_text_->SetText(find_text);
+void FindBarView::SetFindText(const string16& find_text) {
+ find_text_->SetText(UTF16ToWide(find_text));
}
void FindBarView::UpdateForResult(const FindNotificationDetails& result,
- const std::wstring& find_text) {
+ const string16& find_text) {
bool have_valid_range =
result.number_of_matches() != -1 && result.active_match_ordinal() != -1;
@@ -176,7 +176,7 @@ void FindBarView::UpdateForResult(const FindNotificationDetails& result,
// repopulate the Find box with what was passed in.
std::wstring search_string = find_text_->GetText();
if (search_string.empty() && !find_text.empty()) {
- find_text_->SetText(find_text);
+ find_text_->SetText(UTF16ToWide(find_text));
find_text_->SelectAll();
}
@@ -400,7 +400,7 @@ void FindBarView::ButtonPressed(views::Button* sender) {
case FIND_NEXT_TAG:
if (!find_text_->GetText().empty()) {
container_->GetFindBarController()->tab_contents()->StartFinding(
- find_text_->GetText(),
+ WideToUTF16(find_text_->GetText()),
sender->tag() == FIND_NEXT_TAG,
false); // Not case sensitive.
}
@@ -437,11 +437,11 @@ void FindBarView::ContentsChanged(views::TextField* sender,
// 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).
- controller->tab_contents()->StartFinding(new_contents, true, false);
+ controller->tab_contents()->StartFinding(WideToUTF16(new_contents), true, false);
} else {
// The textbox is empty so we reset. true = clear selection on page.
controller->tab_contents()->StopFinding(true);
- UpdateForResult(controller->tab_contents()->find_result(), std::wstring());
+ UpdateForResult(controller->tab_contents()->find_result(), string16());
}
}