diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-19 21:04:11 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-19 21:04:11 +0000 |
commit | ba2bd157297d9e5fac3f781ab9951736e9e29eb8 (patch) | |
tree | 6ffc8322c5fb83d7dcd620bb14f860bb1568797a /webkit | |
parent | 1fff4a0530c3ef7d2ea5a8af727100ec04a0e3e9 (diff) | |
download | chromium_src-ba2bd157297d9e5fac3f781ab9951736e9e29eb8.zip chromium_src-ba2bd157297d9e5fac3f781ab9951736e9e29eb8.tar.gz chromium_src-ba2bd157297d9e5fac3f781ab9951736e9e29eb8.tar.bz2 |
Convert FindInPage wstrings to string16.
Review URL: http://codereview.chromium.org/42408
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12158 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/find_in_page_request.h | 4 | ||||
-rw-r--r-- | webkit/glue/webframe_impl.cc | 8 | ||||
-rw-r--r-- | webkit/glue/webframe_impl.h | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/webkit/glue/find_in_page_request.h b/webkit/glue/find_in_page_request.h index a10ca80..8594f05 100644 --- a/webkit/glue/find_in_page_request.h +++ b/webkit/glue/find_in_page_request.h @@ -5,7 +5,7 @@ #ifndef WEBKIT_GLUE_FIND_IN_PAGE_REQUEST_H__ #define WEBKIT_GLUE_FIND_IN_PAGE_REQUEST_H__ -#include <string> +#include "base/string16.h" // Parameters for a find in page request. struct FindInPageRequest { @@ -15,7 +15,7 @@ struct FindInPageRequest { int request_id; // The word(s) to find on the page. - std::wstring search_string; + string16 search_string; // Whether to search forward or backward within the page. bool forward; diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc index c6f8c4c..49a6a08 100644 --- a/webkit/glue/webframe_impl.cc +++ b/webkit/glue/webframe_impl.cc @@ -926,7 +926,7 @@ bool WebFrameImpl::Find(const FindInPageRequest& request, bool wrap_within_frame, gfx::Rect* selection_rect) { WebCore::String webcore_string = - webkit_glue::StdWStringToString(request.search_string); + webkit_glue::String16ToString(request.search_string); WebFrameImpl* const main_frame_impl = static_cast<WebFrameImpl*>(GetView()->GetMainFrame()); @@ -1045,9 +1045,9 @@ bool WebFrameImpl::ShouldScopeMatches(FindInPageRequest request) { // time it was searched, then we don't have to search it again if the user is // just adding to the search string or sending the same search string again. if (scoping_complete_ && - last_search_string_ != std::wstring(L"") && last_match_count_ == 0) { + !last_search_string_.empty() && last_match_count_ == 0) { // Check to see if the search string prefixes match. - std::wstring previous_search_prefix = + string16 previous_search_prefix = request.search_string.substr(0, last_search_string_.length()); if (previous_search_prefix == last_search_string_) { @@ -1142,7 +1142,7 @@ void WebFrameImpl::ScopeStringMatches(FindInPageRequest request, } WebCore::String webcore_string = - webkit_glue::StdWStringToString(request.search_string); + webkit_glue::String16ToString(request.search_string); RefPtr<Range> search_range(rangeOfContents(frame()->document())); diff --git a/webkit/glue/webframe_impl.h b/webkit/glue/webframe_impl.h index 8684cb7..004c5ad 100644 --- a/webkit/glue/webframe_impl.h +++ b/webkit/glue/webframe_impl.h @@ -335,7 +335,7 @@ class WebFrameImpl : public WebFrame, public base::RefCounted<WebFrameImpl> { // short-circuiting searches in the following scenarios: When a frame has // been searched and returned 0 results, we don't need to search that frame // again if the user is just adding to the search (making it more specific). - std::wstring last_search_string_; + string16 last_search_string_; // Keeps track of how many matches this frame has found so far, so that we // don't loose count between scoping efforts, and is also used (in conjunction |