Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(497)

Side by Side Diff: components/omnibox/browser/autocomplete_input.h

Issue 1855423003: Interpret '?' and Ctrl-K or Ctrl-E as putting omnibox in keyword search mode for Default Search Pro… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add includes for mac tests Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_INPUT_H_ 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_INPUT_H_
6 #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_INPUT_H_ 6 #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_INPUT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 current_page_classification, 76 current_page_classification,
77 bool prevent_inline_autocomplete, 77 bool prevent_inline_autocomplete,
78 bool prefer_keyword, 78 bool prefer_keyword,
79 bool allow_exact_keyword_match, 79 bool allow_exact_keyword_match,
80 bool want_asynchronous_matches, 80 bool want_asynchronous_matches,
81 bool from_omnibox_focus, 81 bool from_omnibox_focus,
82 const AutocompleteSchemeClassifier& scheme_classifier); 82 const AutocompleteSchemeClassifier& scheme_classifier);
83 AutocompleteInput(const AutocompleteInput& other); 83 AutocompleteInput(const AutocompleteInput& other);
84 ~AutocompleteInput(); 84 ~AutocompleteInput();
85 85
86 // If type is |FORCED_QUERY| and |text| starts with '?', it is removed.
87 // Returns number of leading characters removed.
88 static size_t RemoveForcedQueryStringIfNecessary(
89 metrics::OmniboxInputType::Type type,
90 base::string16* text);
91
92 // Converts |type| to a string representation. Used in logging. 86 // Converts |type| to a string representation. Used in logging.
93 static std::string TypeToString(metrics::OmniboxInputType::Type type); 87 static std::string TypeToString(metrics::OmniboxInputType::Type type);
94 88
95 // Parses |text| (including an optional |desired_tld|) and returns the type of 89 // Parses |text| (including an optional |desired_tld|) and returns the type of
96 // input this will be interpreted as. |scheme_classifier| is used to check 90 // input this will be interpreted as. |scheme_classifier| is used to check
97 // the scheme in |text| is known and registered in the current environment. 91 // the scheme in |text| is known and registered in the current environment.
98 // The components of the input are stored in the output parameter |parts|, if 92 // The components of the input are stored in the output parameter |parts|, if
99 // it is non-NULL. The scheme is stored in |scheme| if it is non-NULL. The 93 // it is non-NULL. The scheme is stored in |scheme| if it is non-NULL. The
100 // canonicalized URL is stored in |canonicalized_url|; however, this URL is 94 // canonicalized URL is stored in |canonicalized_url|; however, this URL is
101 // not guaranteed to be valid, especially if the parsed type is, e.g., QUERY. 95 // not guaranteed to be valid, especially if the parsed type is, e.g., QUERY.
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 GURL canonicalized_url_; 216 GURL canonicalized_url_;
223 bool prevent_inline_autocomplete_; 217 bool prevent_inline_autocomplete_;
224 bool prefer_keyword_; 218 bool prefer_keyword_;
225 bool allow_exact_keyword_match_; 219 bool allow_exact_keyword_match_;
226 bool want_asynchronous_matches_; 220 bool want_asynchronous_matches_;
227 bool from_omnibox_focus_; 221 bool from_omnibox_focus_;
228 std::vector<base::string16> terms_prefixed_by_http_or_https_; 222 std::vector<base::string16> terms_prefixed_by_http_or_https_;
229 }; 223 };
230 224
231 #endif // COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_INPUT_H_ 225 #endif // COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_INPUT_H_
OLDNEW
« no previous file with comments | « components/metrics/proto/omnibox_input_type.proto ('k') | components/omnibox/browser/autocomplete_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698