| 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_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_VIEWS_H_ |
| 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_VIEWS_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_VIEWS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // Update the field with |text| and set the selection. | 143 // Update the field with |text| and set the selection. |
| 144 void SetTextAndSelectedRange(const string16& text, | 144 void SetTextAndSelectedRange(const string16& text, |
| 145 const views::TextRange& range); | 145 const views::TextRange& range); |
| 146 | 146 |
| 147 // Returns the selected text. | 147 // Returns the selected text. |
| 148 string16 GetSelectedText() const; | 148 string16 GetSelectedText() const; |
| 149 | 149 |
| 150 // Selects the text given by |caret| and |end|. | 150 // Selects the text given by |caret| and |end|. |
| 151 void SelectRange(size_t caret, size_t end); | 151 void SelectRange(size_t caret, size_t end); |
| 152 | 152 |
| 153 AutocompletePopupView* CreatePopupView(Profile* profile, |
| 154 const View* location_bar); |
| 155 |
| 153 views::Textfield* textfield_; | 156 views::Textfield* textfield_; |
| 154 | 157 |
| 155 scoped_ptr<AutocompleteEditModel> model_; | 158 scoped_ptr<AutocompleteEditModel> model_; |
| 156 scoped_ptr<AutocompletePopupView> popup_view_; | 159 scoped_ptr<AutocompletePopupView> popup_view_; |
| 157 AutocompleteEditController* controller_; | 160 AutocompleteEditController* controller_; |
| 158 ToolbarModel* toolbar_model_; | 161 ToolbarModel* toolbar_model_; |
| 159 | 162 |
| 160 // The object that handles additional command functionality exposed on the | 163 // The object that handles additional command functionality exposed on the |
| 161 // edit, such as invoking the keyword editor. | 164 // edit, such as invoking the keyword editor. |
| 162 CommandUpdater* command_updater_; | 165 CommandUpdater* command_updater_; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 // This flag should be set for changes directly caused by a key press event, | 201 // This flag should be set for changes directly caused by a key press event, |
| 199 // including changes to content text, selection range and preedit string. | 202 // including changes to content text, selection range and preedit string. |
| 200 // Changes caused by function calls like SetUserText() should not affect this | 203 // Changes caused by function calls like SetUserText() should not affect this |
| 201 // flag. | 204 // flag. |
| 202 bool content_maybe_changed_by_key_press_; | 205 bool content_maybe_changed_by_key_press_; |
| 203 | 206 |
| 204 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewViews); | 207 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewViews); |
| 205 }; | 208 }; |
| 206 | 209 |
| 207 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_VIEWS_H_ | 210 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_VIEWS_H_ |
| OLD | NEW |