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_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
146 // Internally invoked whenever the text changes in some way. | 146 // Internally invoked whenever the text changes in some way. |
147 void TextChanged(); | 147 void TextChanged(); |
148 | 148 |
149 // Update the field with |text| and set the selection. | 149 // Update the field with |text| and set the selection. |
150 void SetTextAndSelectedRange(const string16& text, | 150 void SetTextAndSelectedRange(const string16& text, |
151 const ui::Range& range); | 151 const ui::Range& range); |
152 | 152 |
153 // Returns the selected text. | 153 // Returns the selected text. |
154 string16 GetSelectedText() const; | 154 string16 GetSelectedText() const; |
155 | 155 |
156 // Selects the text given by |caret| and |end|. | |
157 void SelectRange(size_t caret, size_t end); | |
msw
2011/10/04 07:25:41
Please use |start| to match range and |end|, updat
xji
2011/10/05 01:23:42
removed.
| |
158 | |
156 AutocompletePopupView* CreatePopupView(View* location_bar); | 159 AutocompletePopupView* CreatePopupView(View* location_bar); |
157 | 160 |
158 views::Textfield* textfield_; | 161 views::Textfield* textfield_; |
159 | 162 |
160 scoped_ptr<AutocompleteEditModel> model_; | 163 scoped_ptr<AutocompleteEditModel> model_; |
161 scoped_ptr<AutocompletePopupView> popup_view_; | 164 scoped_ptr<AutocompletePopupView> popup_view_; |
162 AutocompleteEditController* controller_; | 165 AutocompleteEditController* controller_; |
163 ToolbarModel* toolbar_model_; | 166 ToolbarModel* toolbar_model_; |
164 | 167 |
165 // The object that handles additional command functionality exposed on the | 168 // The object that handles additional command functionality exposed on the |
(...skipping 15 matching lines...) Expand all Loading... | |
181 ui::Range sel_before_change_; | 184 ui::Range sel_before_change_; |
182 bool ime_composing_before_change_; | 185 bool ime_composing_before_change_; |
183 | 186 |
184 // Was the delete key pressed with an empty selection at the end of the edit? | 187 // Was the delete key pressed with an empty selection at the end of the edit? |
185 bool delete_at_end_pressed_; | 188 bool delete_at_end_pressed_; |
186 | 189 |
187 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); | 190 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); |
188 }; | 191 }; |
189 | 192 |
190 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 193 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
OLD | NEW |