summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc10
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_gtk.h2
2 files changed, 8 insertions, 4 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc
index cae7c6e..4c21fc3 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc
@@ -100,9 +100,8 @@ void AutocompleteEditViewGtk::Init() {
G_CALLBACK(&HandleViewMoveCursorThunk), this);
}
-void AutocompleteEditViewGtk::FocusLocation() {
+void AutocompleteEditViewGtk::SetFocus() {
gtk_widget_grab_focus(text_view_);
- SelectAll(false);
}
void AutocompleteEditViewGtk::SaveStateToTab(TabContents* tab) {
@@ -160,7 +159,12 @@ std::wstring AutocompleteEditViewGtk::GetText() const {
void AutocompleteEditViewGtk::SetUserText(const std::wstring& text,
const std::wstring& display_text,
bool update_popup) {
- NOTIMPLEMENTED();
+ model_->SetUserText(text);
+ // TODO(deanm): something about selection / focus change here.
+ SetWindowTextAndCaretPos(display_text, display_text.length());
+ if (update_popup)
+ UpdatePopup();
+ TextChanged();
}
void AutocompleteEditViewGtk::SetWindowTextAndCaretPos(const std::wstring& text,
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
index 85d16ae..f3f1d9f 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h
@@ -37,7 +37,7 @@ class AutocompleteEditViewGtk : public AutocompleteEditView {
GtkWidget* widget() { return text_view_; }
// Grab keyboard input focus, putting focus on the location widget.
- void FocusLocation();
+ void SetFocus();
// Implement the AutocompleteEditView interface.
virtual AutocompleteEditModel* model() { return model_.get(); }