Index: chrome/browser/autocomplete/autocomplete_edit_view.h |
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view.h b/chrome/browser/autocomplete/autocomplete_edit_view.h |
index 439b2edce7b6cb36baa3a94efebf4392095694e7..a69e1805593703f7d1e8a8d04db2a2d7363dd39d 100644 |
--- a/chrome/browser/autocomplete/autocomplete_edit_view.h |
+++ b/chrome/browser/autocomplete/autocomplete_edit_view.h |
@@ -24,6 +24,12 @@ class CommandUpdater; |
class GURL; |
class TabContents; |
+#if defined(TOOLKIT_VIEWS) |
+namespace views { |
+class View; |
+} // namespace views |
+#endif |
+ |
class AutocompleteEditView { |
public: |
// Used by the automation system for getting at the model from the view. |
@@ -152,7 +158,23 @@ class AutocompleteEditView { |
// Returns the command updater for this view. |
virtual CommandUpdater* GetCommandUpdater() = 0; |
- protected: |
+#if defined(TOOLKIT_VIEWS) |
+ // Adds the autocomplete edit view to view hierarchy and |
+ // returns the views::View of the edit view. |
+ virtual views::View* AddToView(views::View* parent) = 0; |
+ |
+ // Returns the width in pixels needed to display the current text. The |
Peter Kasting
2011/01/06 20:51:38
Nit: Might want to move this to the end so that th
oshima
2011/01/06 21:39:27
Done. moved implementation as well.
|
+ // returned value includes margins. |
+ virtual int TextWidth() const = 0; |
+ |
+ // Commits the suggested text. |
+ virtual bool CommitInstantSuggestion(const std::wstring& typed_text, |
+ const std::wstring& suggested_text) = 0; |
+ |
+ // Shows the instant suggestion text. |
+ virtual void SetInstantSuggestion(const string16& input) = 0; |
+#endif |
+ |
virtual ~AutocompleteEditView() {} |
}; |