| Index: chrome/browser/autocomplete/autocomplete_edit_view_mac.h
|
| diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.h b/chrome/browser/autocomplete/autocomplete_edit_view_mac.h
|
| index a6713939a02616be26c1098d37d8f7f2059a6ce7..3ba59635317127132d59d77c78a2885e6e03af21 100644
|
| --- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.h
|
| +++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.h
|
| @@ -84,6 +84,7 @@ class AutocompleteEditViewMac : public AutocompleteEditView,
|
| virtual gfx::NativeView GetNativeView() const;
|
| virtual CommandUpdater* GetCommandUpdater();
|
| virtual void SetInstantSuggestion(const string16& input);
|
| + virtual string16 GetInstantSuggestion() const;
|
| virtual int TextWidth() const;
|
| virtual bool IsImeComposing() const;
|
|
|
| @@ -104,8 +105,6 @@ class AutocompleteEditViewMac : public AutocompleteEditView,
|
| virtual void OnSetFocus(bool control_down);
|
| virtual void OnKillFocus();
|
|
|
| - bool CommitSuggestText();
|
| -
|
| // Helper for LocationBarViewMac. Optionally selects all in |field_|.
|
| void FocusLocation(bool select_all);
|
|
|
| @@ -160,6 +159,9 @@ class AutocompleteEditViewMac : public AutocompleteEditView,
|
| // Returns the non-suggest portion of |field_|'s string value.
|
| NSString* GetNonSuggestTextSubstring() const;
|
|
|
| + // Returns the suggest portion of |field_|'s string value.
|
| + NSString* GetSuggestTextSubstring() const;
|
| +
|
| // Pass the current content of |field_| to SetText(), maintaining
|
| // any selection. Named to be consistent with GTK and Windows,
|
| // though here we cannot really do the in-place operation they do.
|
| @@ -170,6 +172,16 @@ class AutocompleteEditViewMac : public AutocompleteEditView,
|
| void ApplyTextAttributes(const string16& display_text,
|
| NSMutableAttributedString* as);
|
|
|
| + // Return the number of UTF-16 units in the current buffer, excluding the
|
| + // suggested text.
|
| + NSUInteger GetTextLength() const;
|
| +
|
| + // Places the caret at the given position. This clears any selection.
|
| + void PlaceCaretAt(NSUInteger pos);
|
| +
|
| + // Returns true if the caret is at the end of the content.
|
| + bool IsCaretAtEnd() const;
|
| +
|
| scoped_ptr<AutocompleteEditModel> model_;
|
| scoped_ptr<AutocompletePopupViewMac> popup_view_;
|
|
|
|
|