| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 164   bool prefer_keyword() const { return prefer_keyword_; } | 164   bool prefer_keyword() const { return prefer_keyword_; } | 
| 165 | 165 | 
| 166   // Returns whether this input is allowed to be treated as an exact | 166   // Returns whether this input is allowed to be treated as an exact | 
| 167   // keyword match.  If not, the default result is guaranteed not to be a | 167   // keyword match.  If not, the default result is guaranteed not to be a | 
| 168   // keyword search, even if the input is "<keyword> <search string>". | 168   // keyword search, even if the input is "<keyword> <search string>". | 
| 169   bool allow_exact_keyword_match() const { return allow_exact_keyword_match_; } | 169   bool allow_exact_keyword_match() const { return allow_exact_keyword_match_; } | 
| 170 | 170 | 
| 171   // See description of enum for details. | 171   // See description of enum for details. | 
| 172   MatchesRequested matches_requested() const { return matches_requested_; } | 172   MatchesRequested matches_requested() const { return matches_requested_; } | 
| 173 | 173 | 
| 174   // operator==() by another name. |  | 
| 175   bool Equals(const AutocompleteInput& other) const; |  | 
| 176 |  | 
| 177   // Resets all internal variables to the null-constructed state. | 174   // Resets all internal variables to the null-constructed state. | 
| 178   void Clear(); | 175   void Clear(); | 
| 179 | 176 | 
| 180  private: | 177  private: | 
|  | 178   // NOTE: Whenever adding a new field here, please make sure to update Clear() | 
|  | 179   // method. | 
| 181   string16 text_; | 180   string16 text_; | 
| 182   size_t cursor_position_; | 181   size_t cursor_position_; | 
| 183   string16 desired_tld_; | 182   string16 desired_tld_; | 
| 184   Type type_; | 183   Type type_; | 
| 185   url_parse::Parsed parts_; | 184   url_parse::Parsed parts_; | 
| 186   string16 scheme_; | 185   string16 scheme_; | 
| 187   GURL canonicalized_url_; | 186   GURL canonicalized_url_; | 
| 188   bool prevent_inline_autocomplete_; | 187   bool prevent_inline_autocomplete_; | 
| 189   bool prefer_keyword_; | 188   bool prefer_keyword_; | 
| 190   bool allow_exact_keyword_match_; | 189   bool allow_exact_keyword_match_; | 
| 191   MatchesRequested matches_requested_; | 190   MatchesRequested matches_requested_; | 
| 192 }; | 191 }; | 
| 193 | 192 | 
| 194 #endif  // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_INPUT_H_ | 193 #endif  // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_INPUT_H_ | 
| OLD | NEW | 
|---|