| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 // created a |new_text| that looks like "<keyword> <search phrase>". | 360 // created a |new_text| that looks like "<keyword> <search phrase>". |
| 361 bool CreatedKeywordSearchByInsertingSpaceInMiddle( | 361 bool CreatedKeywordSearchByInsertingSpaceInMiddle( |
| 362 const string16& old_text, | 362 const string16& old_text, |
| 363 const string16& new_text, | 363 const string16& new_text, |
| 364 size_t caret_position) const; | 364 size_t caret_position) const; |
| 365 | 365 |
| 366 // Notifies the SearchTabHelper that autocomplete state has changed. | 366 // Notifies the SearchTabHelper that autocomplete state has changed. |
| 367 void NotifySearchTabHelper(); | 367 void NotifySearchTabHelper(); |
| 368 | 368 |
| 369 // Tries to start an Instant preview for |match|. Returns true if Instant | 369 // Tries to start an Instant preview for |match|. Returns true if Instant |
| 370 // processed the match. |suggested_text| should initially contain the current | 370 // processed the match. |
| 371 // inline autocomplete text. Instant will replace it with new suggested text | 371 bool DoInstant(const AutocompleteMatch& match); |
| 372 // and set |complete_behavior| accordingly. | |
| 373 bool DoInstant(const AutocompleteMatch& match, | |
| 374 string16* suggested_text, | |
| 375 InstantCompleteBehavior* complete_behavior); | |
| 376 | 372 |
| 377 // Starts a prerender for the given |match|. | 373 // Starts a prerender for the given |match|. |
| 378 void DoPrerender(const AutocompleteMatch& match); | 374 void DoPrerender(const AutocompleteMatch& match); |
| 379 | 375 |
| 380 // Starts a DNS prefetch for the given |match|. | 376 // Starts a DNS prefetch for the given |match|. |
| 381 void DoPreconnect(const AutocompleteMatch& match); | 377 void DoPreconnect(const AutocompleteMatch& match); |
| 382 | 378 |
| 383 // Checks if a given character is a valid space character for accepting | 379 // Checks if a given character is a valid space character for accepting |
| 384 // keyword. | 380 // keyword. |
| 385 static bool IsSpaceCharForAcceptingKeyword(wchar_t c); | 381 static bool IsSpaceCharForAcceptingKeyword(wchar_t c); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 // an exact keyword match. If this is true then keyword mode will be | 498 // an exact keyword match. If this is true then keyword mode will be |
| 503 // triggered automatically if the input is "<keyword> <search string>". We | 499 // triggered automatically if the input is "<keyword> <search string>". We |
| 504 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. | 500 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. |
| 505 // This has no effect if we're already in keyword mode. | 501 // This has no effect if we're already in keyword mode. |
| 506 bool allow_exact_keyword_match_; | 502 bool allow_exact_keyword_match_; |
| 507 | 503 |
| 508 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); | 504 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); |
| 509 }; | 505 }; |
| 510 | 506 |
| 511 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ | 507 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ |
| OLD | NEW |