OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_VIEWS_H_ |
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_VIEWS_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_VIEWS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 virtual void SetFocus(); | 104 virtual void SetFocus(); |
105 virtual void OnTemporaryTextMaybeChanged(const string16& display_text, | 105 virtual void OnTemporaryTextMaybeChanged(const string16& display_text, |
106 bool save_original_selection); | 106 bool save_original_selection); |
107 virtual bool OnInlineAutocompleteTextMaybeChanged( | 107 virtual bool OnInlineAutocompleteTextMaybeChanged( |
108 const string16& display_text, size_t user_text_length); | 108 const string16& display_text, size_t user_text_length); |
109 virtual void OnRevertTemporaryText(); | 109 virtual void OnRevertTemporaryText(); |
110 virtual void OnBeforePossibleChange(); | 110 virtual void OnBeforePossibleChange(); |
111 virtual bool OnAfterPossibleChange(); | 111 virtual bool OnAfterPossibleChange(); |
112 virtual gfx::NativeView GetNativeView() const; | 112 virtual gfx::NativeView GetNativeView() const; |
113 virtual CommandUpdater* GetCommandUpdater(); | 113 virtual CommandUpdater* GetCommandUpdater(); |
114 virtual views::View* AddToView(views::View* parent); | 114 virtual void SetInstantSuggestion(const string16& input); |
| 115 virtual string16 GetInstantSuggestion() const; |
115 virtual int TextWidth() const; | 116 virtual int TextWidth() const; |
116 virtual bool IsImeComposing() const; | 117 virtual bool IsImeComposing() const; |
117 virtual bool CommitInstantSuggestion(const string16& typed_text, | 118 virtual views::View* AddToView(views::View* parent); |
118 const string16& suggested_text); | |
119 virtual void SetInstantSuggestion(const string16& input); | |
120 | 119 |
121 // Overridden from NotificationObserver: | 120 // Overridden from NotificationObserver: |
122 virtual void Observe(NotificationType type, | 121 virtual void Observe(NotificationType type, |
123 const NotificationSource& source, | 122 const NotificationSource& source, |
124 const NotificationDetails& details); | 123 const NotificationDetails& details); |
125 | 124 |
126 // Overridden from Textfield::Controller | 125 // Overridden from Textfield::Controller |
127 virtual void ContentsChanged(views::Textfield* sender, | 126 virtual void ContentsChanged(views::Textfield* sender, |
128 const string16& new_contents); | 127 const string16& new_contents); |
129 virtual bool HandleKeyEvent(views::Textfield* sender, | 128 virtual bool HandleKeyEvent(views::Textfield* sender, |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 // This flag should be set for changes directly caused by a key press event, | 196 // This flag should be set for changes directly caused by a key press event, |
198 // including changes to content text, selection range and preedit string. | 197 // including changes to content text, selection range and preedit string. |
199 // Changes caused by function calls like SetUserText() should not affect this | 198 // Changes caused by function calls like SetUserText() should not affect this |
200 // flag. | 199 // flag. |
201 bool content_maybe_changed_by_key_press_; | 200 bool content_maybe_changed_by_key_press_; |
202 | 201 |
203 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewViews); | 202 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewViews); |
204 }; | 203 }; |
205 | 204 |
206 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_VIEWS_H_ | 205 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_VIEWS_H_ |
OLD | NEW |