diff options
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/browser.cc | 2 | ||||
-rw-r--r-- | chrome/browser/find_bar.h | 5 | ||||
-rw-r--r-- | chrome/browser/gtk/find_bar_gtk.cc | 6 | ||||
-rw-r--r-- | chrome/browser/gtk/find_bar_gtk.h | 6 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_view_host.cc | 2 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_view_host.h | 2 | ||||
-rw-r--r-- | chrome/browser/tab_contents/web_contents.cc | 2 | ||||
-rw-r--r-- | chrome/browser/tab_contents/web_contents.h | 6 | ||||
-rw-r--r-- | chrome/browser/views/find_bar_win.cc | 4 | ||||
-rw-r--r-- | chrome/browser/views/find_bar_win.h | 4 |
10 files changed, 19 insertions, 20 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index ff5f52e..b45ab43 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -2456,7 +2456,7 @@ void Browser::FindInPage(bool find_next, bool forward_direction) { window_->ShowFindBar(); if (find_next) { GetSelectedTabContents()->AsWebContents()->StartFinding( - std::wstring(), + string16(), forward_direction); } } diff --git a/chrome/browser/find_bar.h b/chrome/browser/find_bar.h index 5ebb188..4b4ee715 100644 --- a/chrome/browser/find_bar.h +++ b/chrome/browser/find_bar.h @@ -10,6 +10,7 @@ #define CHROME_BROWSER_FIND_BAR_H_ #include "base/gfx/rect.h" +#include "base/string16.h" class FindNotificationDetails; class WebContents; @@ -35,12 +36,12 @@ class FindBar { virtual void StopAnimation() = 0; // Set the text in the find box. - virtual void SetFindText(const std::wstring& find_text) = 0; + virtual void SetFindText(const string16& find_text) = 0; // Updates the FindBar with the find result details contained within the // specified |result|. virtual void UpdateUIForFindResult(const FindNotificationDetails& result, - const std::wstring& find_text) = 0; + const string16& find_text) = 0; // Returns the rectangle representing where to position the find bar. It uses // GetDialogBounds and positions itself within that, either to the left (if an diff --git a/chrome/browser/gtk/find_bar_gtk.cc b/chrome/browser/gtk/find_bar_gtk.cc index f4dc247..a779a2b8 100644 --- a/chrome/browser/gtk/find_bar_gtk.cc +++ b/chrome/browser/gtk/find_bar_gtk.cc @@ -66,11 +66,11 @@ void FindBarGtk::StopAnimation() { // No animation yet, so do nothing. } -void FindBarGtk::SetFindText(const std::wstring& find_text) { +void FindBarGtk::SetFindText(const string16& find_text) { } void FindBarGtk::UpdateUIForFindResult(const FindNotificationDetails& result, - const std::wstring& find_text) { + const string16& find_text) { } gfx::Rect FindBarGtk::GetDialogPosition(gfx::Rect avoid_overlapping_rect) { @@ -95,7 +95,7 @@ void FindBarGtk::ContentsChanged() { std::string new_contents(gtk_entry_get_text(GTK_ENTRY(find_text_))); if (new_contents.length() > 0) { - web_contents->StartFinding(UTF8ToWide(new_contents), true); + web_contents->StartFinding(UTF8ToUTF16(new_contents), true); } else { // The textbox is empty so we reset. web_contents->StopFinding(true); // true = clear selection on page. diff --git a/chrome/browser/gtk/find_bar_gtk.h b/chrome/browser/gtk/find_bar_gtk.h index a9f0ca7..73b87ee 100644 --- a/chrome/browser/gtk/find_bar_gtk.h +++ b/chrome/browser/gtk/find_bar_gtk.h @@ -7,8 +7,6 @@ #include <gtk/gtk.h> -#include <string> - #include "base/basictypes.h" #include "chrome/browser/find_bar.h" #include "chrome/common/owned_widget_gtk.h" @@ -42,9 +40,9 @@ class FindBarGtk : public FindBar { virtual void SetFocusAndSelection(); virtual void ClearResults(const FindNotificationDetails& results); virtual void StopAnimation(); - virtual void SetFindText(const std::wstring& find_text); + virtual void SetFindText(const string16& find_text); virtual void UpdateUIForFindResult(const FindNotificationDetails& result, - const std::wstring& find_text); + const string16& find_text); virtual gfx::Rect GetDialogPosition(gfx::Rect avoid_overlapping_rect); virtual void SetDialogPosition(const gfx::Rect& new_pos, bool no_redraw); virtual bool IsFindBarVisible(); diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index 8ce2568..39f0648 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -342,7 +342,7 @@ bool RenderViewHost::PrintPages() { } void RenderViewHost::StartFinding(int request_id, - const std::wstring& search_string, + const string16& search_string, bool forward, bool match_case, bool find_next) { diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h index 273d1e3..92599ba 100644 --- a/chrome/browser/renderer_host/render_view_host.h +++ b/chrome/browser/renderer_host/render_view_host.h @@ -186,7 +186,7 @@ class RenderViewHost : public RenderWidgetHost { // Start looking for a string within the content of the page, with the // specified options. void StartFinding(int request_id, - const std::wstring& search_string, + const string16& search_string, bool forward, bool match_case, bool find_next); diff --git a/chrome/browser/tab_contents/web_contents.cc b/chrome/browser/tab_contents/web_contents.cc index a6fc32c..d0edfa9 100644 --- a/chrome/browser/tab_contents/web_contents.cc +++ b/chrome/browser/tab_contents/web_contents.cc @@ -584,7 +584,7 @@ void WebContents::CreateShortcut() { render_view_host()->GetApplicationInfo(pending_install_.page_id); } -void WebContents::StartFinding(const std::wstring& find_text, +void WebContents::StartFinding(const string16& find_text, bool forward_direction) { // If find_text is empty, it means FindNext was pressed with a keyboard // shortcut so unless we have something to search for we return early. diff --git a/chrome/browser/tab_contents/web_contents.h b/chrome/browser/tab_contents/web_contents.h index c6c4a26..6e86268 100644 --- a/chrome/browser/tab_contents/web_contents.h +++ b/chrome/browser/tab_contents/web_contents.h @@ -195,7 +195,7 @@ class WebContents : public TabContents, // function does not block while a search is in progress. The controller will // receive the results through the notification mechanism. See Observe(...) // for details. - void StartFinding(const std::wstring& find_text, bool forward_direction); + void StartFinding(const string16& find_text, bool forward_direction); // Stops the current Find operation. If |clear_selection| is true, it will // also clear the selection on the focused frame. @@ -216,7 +216,7 @@ class WebContents : public TabContents, // Accessor for find_text_. Used to determine if this WebContents has any // active searches. - std::wstring find_text() const { return find_text_; } + string16 find_text() const { return find_text_; } // Accessor for find_result_. const FindNotificationDetails& find_result() const { return find_result_; } @@ -685,7 +685,7 @@ class WebContents : public TabContents, // The last string we searched for. This is used to figure out if this is a // Find or a FindNext operation (FindNext should not increase the request id). - std::wstring find_text_; + string16 find_text_; // The last find result. This object contains details about the number of // matches, the find selection rectangle, etc. The UI can access this diff --git a/chrome/browser/views/find_bar_win.cc b/chrome/browser/views/find_bar_win.cc index d653df4..3a9fe05 100644 --- a/chrome/browser/views/find_bar_win.cc +++ b/chrome/browser/views/find_bar_win.cc @@ -207,7 +207,7 @@ void FindBarWin::StopAnimation() { animation_->End(); } -void FindBarWin::SetFindText(const std::wstring& find_text) { +void FindBarWin::SetFindText(const string16& find_text) { view_->SetFindText(find_text); } @@ -477,7 +477,7 @@ void FindBarWin::UnregisterEscAccelerator() { } void FindBarWin::UpdateUIForFindResult(const FindNotificationDetails& result, - const std::wstring& find_text) { + const string16& find_text) { view_->UpdateForResult(result, find_text); // We now need to check if the window is obscuring the search results. diff --git a/chrome/browser/views/find_bar_win.h b/chrome/browser/views/find_bar_win.h index ed53212..99eb1cb 100644 --- a/chrome/browser/views/find_bar_win.h +++ b/chrome/browser/views/find_bar_win.h @@ -82,9 +82,9 @@ class FindBarWin : public views::FocusChangeListener, virtual void SetFocusAndSelection(); virtual void ClearResults(const FindNotificationDetails& results); virtual void StopAnimation(); - virtual void SetFindText(const std::wstring& find_text); + virtual void SetFindText(const string16& find_text); virtual void UpdateUIForFindResult(const FindNotificationDetails& result, - const std::wstring& find_text); + const string16& find_text); virtual gfx::Rect GetDialogPosition(gfx::Rect avoid_overlapping_rect); virtual void SetDialogPosition(const gfx::Rect& new_pos, bool no_redraw); virtual bool IsFindBarVisible(); |