Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file defines the interface class OmniboxView. Each toolkit will | 5 // This file defines the interface class OmniboxView. Each toolkit will |
| 6 // implement the edit view differently, so that code is inherently platform | 6 // implement the edit view differently, so that code is inherently platform |
| 7 // specific. However, the OmniboxEditModel needs to do some communication with | 7 // specific. However, the OmniboxEditModel needs to do some communication with |
| 8 // the view. Since the model is shared between platforms, we need to define an | 8 // the view. Since the model is shared between platforms, we need to define an |
| 9 // interface that all view implementations will share. | 9 // interface that all view implementations will share. |
| 10 | 10 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 168 bool save_original_selection, | 168 bool save_original_selection, |
| 169 bool notify_text_changed) = 0; | 169 bool notify_text_changed) = 0; |
| 170 | 170 |
| 171 // Called when the inline autocomplete text in the model may have changed. | 171 // Called when the inline autocomplete text in the model may have changed. |
| 172 // |display_text| is the new text to show; |user_text_length| is the length of | 172 // |display_text| is the new text to show; |user_text_length| is the length of |
| 173 // the user input portion of that (so, up to but not including the inline | 173 // the user input portion of that (so, up to but not including the inline |
| 174 // autocompletion). Returns whether the display text actually changed. | 174 // autocompletion). Returns whether the display text actually changed. |
| 175 virtual bool OnInlineAutocompleteTextMaybeChanged( | 175 virtual bool OnInlineAutocompleteTextMaybeChanged( |
| 176 const string16& display_text, size_t user_text_length) = 0; | 176 const string16& display_text, size_t user_text_length) = 0; |
| 177 | 177 |
| 178 // Called when the inline autocomplete text in the model has cleared. | |
|
Peter Kasting
2013/11/15 23:23:05
Nit: has been cleared
Yuki
2013/11/18 06:10:36
Done.
| |
| 179 virtual void OnInlineAutocompleteTextCleared() = 0; | |
| 180 | |
| 178 // Called when the temporary text has been reverted by the user. This will | 181 // Called when the temporary text has been reverted by the user. This will |
| 179 // reset the user's original selection. | 182 // reset the user's original selection. |
| 180 virtual void OnRevertTemporaryText() = 0; | 183 virtual void OnRevertTemporaryText() = 0; |
| 181 | 184 |
| 182 // Checkpoints the current edit state before an operation that might trigger | 185 // Checkpoints the current edit state before an operation that might trigger |
| 183 // a new autocomplete run to open or modify the popup. Call this before | 186 // a new autocomplete run to open or modify the popup. Call this before |
| 184 // user-initiated edit actions that trigger autocomplete, but *not* for | 187 // user-initiated edit actions that trigger autocomplete, but *not* for |
| 185 // automatic changes to the textfield that should not affect autocomplete. | 188 // automatic changes to the textfield that should not affect autocomplete. |
| 186 virtual void OnBeforePossibleChange() = 0; | 189 virtual void OnBeforePossibleChange() = 0; |
| 187 // OnAfterPossibleChange() returns true if there was a change that caused it | 190 // OnAfterPossibleChange() returns true if there was a change that caused it |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 274 // |model_| can be NULL in tests. | 277 // |model_| can be NULL in tests. |
| 275 scoped_ptr<OmniboxEditModel> model_; | 278 scoped_ptr<OmniboxEditModel> model_; |
| 276 OmniboxEditController* controller_; | 279 OmniboxEditController* controller_; |
| 277 | 280 |
| 278 // The object that handles additional command functionality exposed on the | 281 // The object that handles additional command functionality exposed on the |
| 279 // edit, such as invoking the keyword editor. | 282 // edit, such as invoking the keyword editor. |
| 280 CommandUpdater* command_updater_; | 283 CommandUpdater* command_updater_; |
| 281 }; | 284 }; |
| 282 | 285 |
| 283 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_ | 286 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_ |
| OLD | NEW |