| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 AutocompleteEditView. Each toolkit | 5 // This file defines the interface class AutocompleteEditView. Each toolkit |
| 6 // will implement the edit view differently, so that code is inherently | 6 // will implement the edit view differently, so that code is inherently |
| 7 // platform specific. However, the AutocompleteEditModel needs to do some | 7 // platform specific. However, the AutocompleteEditModel needs to do some |
| 8 // communication with the view. Since the model is shared between platforms, | 8 // communication with the view. Since the model is shared between platforms, |
| 9 // we need to define an interface that all view implementations will share. | 9 // we need to define an interface that all view implementations will share. |
| 10 | 10 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 // Sets the edit to forced query mode. Practically speaking, this means that | 73 // Sets the edit to forced query mode. Practically speaking, this means that |
| 74 // if the edit is not in forced query mode, its text is set to "?" with the | 74 // if the edit is not in forced query mode, its text is set to "?" with the |
| 75 // cursor at the end, and if the edit is in forced query mode (its first | 75 // cursor at the end, and if the edit is in forced query mode (its first |
| 76 // character is '?'), the text after the '?' is selected. | 76 // character is '?'), the text after the '?' is selected. |
| 77 // | 77 // |
| 78 // In the future we should display the search engine UI for the default engine | 78 // In the future we should display the search engine UI for the default engine |
| 79 // rather than '?'. | 79 // rather than '?'. |
| 80 virtual void SetForcedQuery() = 0; | 80 virtual void SetForcedQuery() = 0; |
| 81 | 81 |
| 82 // Returns true if all text is selected. | 82 // Returns true if all text is selected or there is no text at all. |
| 83 virtual bool IsSelectAll() = 0; | 83 virtual bool IsSelectAll() = 0; |
| 84 | 84 |
| 85 // Selects all the text in the edit. Use this in place of SetSelAll() to | 85 // Selects all the text in the edit. Use this in place of SetSelAll() to |
| 86 // avoid selecting the "phantom newline" at the end of the edit. | 86 // avoid selecting the "phantom newline" at the end of the edit. |
| 87 virtual void SelectAll(bool reversed) = 0; | 87 virtual void SelectAll(bool reversed) = 0; |
| 88 | 88 |
| 89 // Reverts the edit and popup back to their unedited state (permanent text | 89 // Reverts the edit and popup back to their unedited state (permanent text |
| 90 // showing, popup closed, no user input in progress). | 90 // showing, popup closed, no user input in progress). |
| 91 virtual void RevertAll() = 0; | 91 virtual void RevertAll() = 0; |
| 92 | 92 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 121 virtual void OnBeforePossibleChange() = 0; | 121 virtual void OnBeforePossibleChange() = 0; |
| 122 // OnAfterPossibleChange() returns true if there was a change that caused it | 122 // OnAfterPossibleChange() returns true if there was a change that caused it |
| 123 // to call UpdatePopup(). | 123 // to call UpdatePopup(). |
| 124 virtual bool OnAfterPossibleChange() = 0; | 124 virtual bool OnAfterPossibleChange() = 0; |
| 125 | 125 |
| 126 // Returns the gfx::NativeView of the edit view. | 126 // Returns the gfx::NativeView of the edit view. |
| 127 virtual gfx::NativeView GetNativeView() const = 0; | 127 virtual gfx::NativeView GetNativeView() const = 0; |
| 128 }; | 128 }; |
| 129 | 129 |
| 130 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_H_ | 130 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_H_ |
| OLD | NEW |