Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6385)

Unified Diff: chrome/browser/instant/instant_loader.cc

Issue 6363001: Makes chrome pass down the length of text as the end of the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add support for selection_end and fix selectionStart Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/instant/instant_browsertest.cc ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_loader.cc
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc
index 9f730255502bccb2fd8a56ae8966a32594835790..d337df5641a502a806b32d19e4a909b834abf636 100644
--- a/chrome/browser/instant/instant_loader.cc
+++ b/chrome/browser/instant/instant_loader.cc
@@ -96,8 +96,10 @@ class InstantLoader::FrameLoadObserver : public NotificationObserver {
return;
}
loader_->SendBoundsToPage(true);
+ // TODO: support real cursor position.
+ int text_length = static_cast<int>(text_.size());
tab_contents_->render_view_host()->DetermineIfPageSupportsInstant(
- text_, verbatim_);
+ text_, verbatim_, text_length, text_length);
break;
}
default:
@@ -478,8 +480,10 @@ void InstantLoader::Update(TabContentsWrapper* tab_contents,
preview_tab_contents_delegate_->set_user_typed_before_load();
return;
}
+ // TODO: support real cursor position.
+ int text_length = static_cast<int>(user_text_.size());
preview_contents_->render_view_host()->SearchBoxChange(
- user_text_, verbatim, 0, 0);
+ user_text_, verbatim, text_length, text_length);
string16 complete_suggested_text_lower = l10n_util::ToLower(
complete_suggested_text_);
« no previous file with comments | « chrome/browser/instant/instant_browsertest.cc ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698