| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ | 6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // change should be immediately user-visible, because either the user is not | 131 // change should be immediately user-visible, because either the user is not |
| 132 // editing or the edit does not have focus. | 132 // editing or the edit does not have focus. |
| 133 bool UpdatePermanentText(const string16& new_permanent_text); | 133 bool UpdatePermanentText(const string16& new_permanent_text); |
| 134 | 134 |
| 135 // Returns the URL corresponding to the permanent text. | 135 // Returns the URL corresponding to the permanent text. |
| 136 GURL PermanentURL(); | 136 GURL PermanentURL(); |
| 137 | 137 |
| 138 // Sets the user_text_ to |text|. Only the View should call this. | 138 // Sets the user_text_ to |text|. Only the View should call this. |
| 139 void SetUserText(const string16& text); | 139 void SetUserText(const string16& text); |
| 140 | 140 |
| 141 // Calls through to SearchProvider::FinalizeInstantQuery. | |
| 142 void FinalizeInstantQuery(const string16& input_text, | |
| 143 const InstantSuggestion& suggestion); | |
| 144 | |
| 145 // Sets the suggestion text. | 141 // Sets the suggestion text. |
| 146 void SetInstantSuggestion(const InstantSuggestion& suggestion); | 142 void SetInstantSuggestion(const InstantSuggestion& suggestion); |
| 147 | 143 |
| 148 // Commits the gray suggested text as if it's been input by the user. | 144 // Commits the gray suggested text as if it's been input by the user. |
| 149 // Returns true if the text was committed. | 145 // Returns true if the text was committed. |
| 150 // TODO: can the return type be void? | 146 // TODO: can the return type be void? |
| 151 bool CommitSuggestedText(); | 147 bool CommitSuggestedText(); |
| 152 | 148 |
| 153 // Invoked any time the text may have changed in the edit. Updates Instant and | 149 // Invoked any time the text may have changed in the edit. Updates Instant and |
| 154 // notifies the controller. | 150 // notifies the controller. |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 // an exact keyword match. If this is true then keyword mode will be | 551 // an exact keyword match. If this is true then keyword mode will be |
| 556 // triggered automatically if the input is "<keyword> <search string>". We | 552 // triggered automatically if the input is "<keyword> <search string>". We |
| 557 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. | 553 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. |
| 558 // This has no effect if we're already in keyword mode. | 554 // This has no effect if we're already in keyword mode. |
| 559 bool allow_exact_keyword_match_; | 555 bool allow_exact_keyword_match_; |
| 560 | 556 |
| 561 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); | 557 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); |
| 562 }; | 558 }; |
| 563 | 559 |
| 564 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ | 560 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ |
| OLD | NEW |