| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 virtual void GetSelectionBounds(size_t* start, size_t* end) const = 0; | 130 virtual void GetSelectionBounds(size_t* start, size_t* end) const = 0; |
| 131 | 131 |
| 132 // Selects all the text in the edit. Use this in place of SetSelAll() to | 132 // Selects all the text in the edit. Use this in place of SetSelAll() to |
| 133 // avoid selecting the "phantom newline" at the end of the edit. | 133 // avoid selecting the "phantom newline" at the end of the edit. |
| 134 virtual void SelectAll(bool reversed) = 0; | 134 virtual void SelectAll(bool reversed) = 0; |
| 135 | 135 |
| 136 // Sets focus, disables search term replacement, reverts the omnibox, and | 136 // Sets focus, disables search term replacement, reverts the omnibox, and |
| 137 // selects all. | 137 // selects all. |
| 138 void ShowURL(); | 138 void ShowURL(); |
| 139 | 139 |
| 140 // Enables search term replacement and reverts the omnibox. |
| 141 void HideURL(); |
| 142 |
| 140 // Re-enables search term replacement on the ToolbarModel, and reverts the | 143 // Re-enables search term replacement on the ToolbarModel, and reverts the |
| 141 // edit and popup back to their unedited state (permanent text showing, popup | 144 // edit and popup back to their unedited state (permanent text showing, popup |
| 142 // closed, no user input in progress). | 145 // closed, no user input in progress). |
| 143 virtual void RevertAll(); | 146 virtual void RevertAll(); |
| 144 | 147 |
| 145 // Like RevertAll(), but does not touch the search term replacement state. | 148 // Like RevertAll(), but does not touch the search term replacement state. |
| 146 void RevertWithoutResettingSearchTermReplacement(); | 149 void RevertWithoutResettingSearchTermReplacement(); |
| 147 | 150 |
| 148 // Updates the autocomplete popup and other state after the text has been | 151 // Updates the autocomplete popup and other state after the text has been |
| 149 // changed by the user. | 152 // changed by the user. |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 // |model_| can be NULL in tests. | 278 // |model_| can be NULL in tests. |
| 276 scoped_ptr<OmniboxEditModel> model_; | 279 scoped_ptr<OmniboxEditModel> model_; |
| 277 OmniboxEditController* controller_; | 280 OmniboxEditController* controller_; |
| 278 | 281 |
| 279 // The object that handles additional command functionality exposed on the | 282 // The object that handles additional command functionality exposed on the |
| 280 // edit, such as invoking the keyword editor. | 283 // edit, such as invoking the keyword editor. |
| 281 CommandUpdater* command_updater_; | 284 CommandUpdater* command_updater_; |
| 282 }; | 285 }; |
| 283 | 286 |
| 284 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_ | 287 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_ |
| OLD | NEW |