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