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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
145 virtual void UpdatePopup() = 0; | 145 virtual void UpdatePopup() = 0; |
146 | 146 |
147 // Closes the autocomplete popup, if it's open. The name |ClosePopup| | 147 // Closes the autocomplete popup, if it's open. The name |ClosePopup| |
148 // conflicts with the OSX class override as that has a base class that also | 148 // conflicts with the OSX class override as that has a base class that also |
149 // defines a method with that name. | 149 // defines a method with that name. |
150 virtual void CloseOmniboxPopup(); | 150 virtual void CloseOmniboxPopup(); |
151 | 151 |
152 // Sets the focus to the autocomplete view. | 152 // Sets the focus to the autocomplete view. |
153 virtual void SetFocus() = 0; | 153 virtual void SetFocus() = 0; |
154 | 154 |
155 // Sets the focus to the autocomplete view but doesn't visibly show focus to | |
156 // the user (i.e. no blinking caret or border highlight). | |
Mathieu
2012/11/28 17:56:10
nit: On Aura, Windows and Gtk, I have not seen bor
samarth
2012/11/28 19:42:43
The highlight only exists on Mac afaik. I'll take
| |
157 virtual void SetInvisibleFocus() = 0; | |
158 | |
155 // Called when the temporary text in the model may have changed. | 159 // Called when the temporary text in the model may have changed. |
156 // |display_text| is the new text to show; |save_original_selection| is true | 160 // |display_text| is the new text to show; |save_original_selection| is true |
157 // when there wasn't previously a temporary text and thus we need to save off | 161 // when there wasn't previously a temporary text and thus we need to save off |
158 // the user's existing selection. | 162 // the user's existing selection. |
159 virtual void OnTemporaryTextMaybeChanged(const string16& display_text, | 163 virtual void OnTemporaryTextMaybeChanged(const string16& display_text, |
160 bool save_original_selection) = 0; | 164 bool save_original_selection) = 0; |
161 | 165 |
162 // Called when the inline autocomplete text in the model may have changed. | 166 // Called when the inline autocomplete text in the model may have changed. |
163 // |display_text| is the new text to show; |user_text_length| is the length of | 167 // |display_text| is the new text to show; |user_text_length| is the length of |
164 // the user input portion of that (so, up to but not including the inline | 168 // the user input portion of that (so, up to but not including the inline |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
251 scoped_ptr<OmniboxEditModel> model_; | 255 scoped_ptr<OmniboxEditModel> model_; |
252 OmniboxEditController* controller_; | 256 OmniboxEditController* controller_; |
253 ToolbarModel* toolbar_model_; | 257 ToolbarModel* toolbar_model_; |
254 | 258 |
255 // The object that handles additional command functionality exposed on the | 259 // The object that handles additional command functionality exposed on the |
256 // edit, such as invoking the keyword editor. | 260 // edit, such as invoking the keyword editor. |
257 CommandUpdater* command_updater_; | 261 CommandUpdater* command_updater_; |
258 }; | 262 }; |
259 | 263 |
260 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_ | 264 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_ |
OLD | NEW |