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_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ |
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 // AutocompleteController but resides here for now. This method is used by | 375 // AutocompleteController but resides here for now. This method is used by |
376 // AutomationProvider::AutocompleteEditIsQueryInProgress. | 376 // AutomationProvider::AutocompleteEditIsQueryInProgress. |
377 bool query_in_progress() const; | 377 bool query_in_progress() const; |
378 | 378 |
379 // Called whenever user_text_ should change. | 379 // Called whenever user_text_ should change. |
380 void InternalSetUserText(const string16& text); | 380 void InternalSetUserText(const string16& text); |
381 | 381 |
382 // Returns true if a keyword is selected. | 382 // Returns true if a keyword is selected. |
383 bool KeywordIsSelected() const; | 383 bool KeywordIsSelected() const; |
384 | 384 |
| 385 // Turns off keyword mode for the current match. |
| 386 void ResetCurrentMatchKeywordMode() const; |
| 387 |
385 // Conversion between user text and display text. User text is the text the | 388 // Conversion between user text and display text. User text is the text the |
386 // user has input. Display text is the text being shown in the edit. The | 389 // user has input. Display text is the text being shown in the edit. The |
387 // two are different if a keyword is selected. | 390 // two are different if a keyword is selected. |
388 string16 DisplayTextFromUserText(const string16& text) const; | 391 string16 DisplayTextFromUserText(const string16& text) const; |
389 string16 UserTextFromDisplayText(const string16& text) const; | 392 string16 UserTextFromDisplayText(const string16& text) const; |
390 | 393 |
391 // Copies the selected match into |match|. If an update is in progress, | 394 // Copies the selected match into |match|. If an update is in progress, |
392 // "selected" means "default in the latest matches". If there are no matches, | 395 // "selected" means "default in the latest matches". If there are no matches, |
393 // does not update |match|. | 396 // does not update |match|. |
394 // | 397 // |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 // It has no effect if a keyword is already selected. | 558 // It has no effect if a keyword is already selected. |
556 bool allow_exact_keyword_match_; | 559 bool allow_exact_keyword_match_; |
557 | 560 |
558 // Last value of InstantCompleteBehavior supplied to |SetSuggestedText|. | 561 // Last value of InstantCompleteBehavior supplied to |SetSuggestedText|. |
559 InstantCompleteBehavior instant_complete_behavior_; | 562 InstantCompleteBehavior instant_complete_behavior_; |
560 | 563 |
561 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel); | 564 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel); |
562 }; | 565 }; |
563 | 566 |
564 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ | 567 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ |
OLD | NEW |