Chromium Code Reviews| 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_AUTOCOMPLETE_AUTOCOMPLETE_INPUT_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_INPUT_H_ |
| 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_INPUT_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_INPUT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 37 // higher-level "synchronous" query. | 37 // higher-level "synchronous" query. |
| 38 BEST_MATCH, | 38 BEST_MATCH, |
| 39 | 39 |
| 40 // Only synchronous matches should be returned. | 40 // Only synchronous matches should be returned. |
| 41 SYNCHRONOUS_MATCHES, | 41 SYNCHRONOUS_MATCHES, |
| 42 | 42 |
| 43 // All matches should be fetched. | 43 // All matches should be fetched. |
| 44 ALL_MATCHES, | 44 ALL_MATCHES, |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 // The type of page currently displayed. | |
| 48 // Note: when adding an element to this enum, please add it at the end | |
| 49 // and update omnibox_event.proto::PageClassification and | |
| 50 // omnibox_edit_model.cc::ClassifyPage() too. | |
| 51 enum PageClassification { | |
| 52 INVALID_SPEC = 0, // invalid URI; shouldn't happen | |
|
Peter Kasting
2013/07/26 18:06:38
Nit: I think you mean URL. (Generally we don't wo
Mark P
2013/07/26 18:45:39
I'd rather do this cleanup in a separate changelis
| |
| 53 NEW_TAB_PAGE = 1, // chrome://newtab/ | |
| 54 // Note that chrome://newtab/ doesn't have to be the built-in | |
| 55 // version; it could be replaced by an extension. | |
| 56 BLANK = 2, // about:blank | |
| 57 HOMEPAGE = 3, // user switched settings to "open this page" mode. | |
| 58 // Note that if the homepage is set to the new tab page or about blank, | |
| 59 // then we'll classify the web page into those categories, not HOMEPAGE. | |
| 60 OTHER = 4, // everything not included somewhere else on this list | |
| 61 INSTANT_NEW_TAB_PAGE = 5, // new tab page rendered by Instant | |
|
Peter Kasting
2013/07/26 18:06:38
Nit: Might want to note the instant exception on N
Mark P
2013/07/26 18:45:39
ditto.
| |
| 62 // The user is on a search result page that's doing search term | |
| 63 // replacement, meaning the search terms should've appeared in the omnibox | |
| 64 // before the user started editing it, not the URL of the page. | |
| 65 SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT = 6 | |
| 66 // Please duplicate all changes to this enum in omnibox_event.proto; | |
| 67 // see note at the top of this enum. | |
|
Peter Kasting
2013/07/26 18:06:38
Nit: Don't duplicate this comment from above.
Mark P
2013/07/26 18:45:39
Removed.
| |
| 68 }; | |
| 69 | |
| 47 AutocompleteInput(); | 70 AutocompleteInput(); |
| 48 // |text| and |cursor_position| represent the input query and location of | 71 // |text| and |cursor_position| represent the input query and location of |
| 49 // the cursor with the query respectively. |cursor_position| may be set to | 72 // the cursor with the query respectively. |cursor_position| may be set to |
| 50 // string16::npos if the input |text| doesn't come directly from the user's | 73 // string16::npos if the input |text| doesn't come directly from the user's |
| 51 // typing. | 74 // typing. |
| 52 // | 75 // |
| 53 // |desired_tld| is the user's desired TLD, if one is not already present in | 76 // |desired_tld| is the user's desired TLD, if one is not already present in |
| 54 // the text to autocomplete. When this is non-empty, it also implies that | 77 // the text to autocomplete. When this is non-empty, it also implies that |
| 55 // "www." should be prepended to the domain where possible. The |desired_tld| | 78 // "www." should be prepended to the domain where possible. The |desired_tld| |
| 56 // should not contain a leading '.' (use "com" instead of ".com"). | 79 // should not contain a leading '.' (use "com" instead of ".com"). |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 188 url_parse::Parsed parts_; | 211 url_parse::Parsed parts_; |
| 189 string16 scheme_; | 212 string16 scheme_; |
| 190 GURL canonicalized_url_; | 213 GURL canonicalized_url_; |
| 191 bool prevent_inline_autocomplete_; | 214 bool prevent_inline_autocomplete_; |
| 192 bool prefer_keyword_; | 215 bool prefer_keyword_; |
| 193 bool allow_exact_keyword_match_; | 216 bool allow_exact_keyword_match_; |
| 194 MatchesRequested matches_requested_; | 217 MatchesRequested matches_requested_; |
| 195 }; | 218 }; |
| 196 | 219 |
| 197 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_INPUT_H_ | 220 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_INPUT_H_ |
| OLD | NEW |